AnsweredAssumed Answered

Fully-qualified name of subassembly component features

Question asked by Tyler Nichol on Aug 21, 2020
Latest reply on Aug 24, 2020 by Tyler Nichol

I thought this would be an easy one but I can't seem to find the answer anywhere.

I have a macro that needs to select a feature of a component of a subassembly within a main assembly.

I've gotten it to successfully select features of just the subassembly using:

 

boolean = swModel.Extension.SelectByID2("FeatureName@SubAssemblyName-InstanceNumber@AssemblyName", FeatureType, 0, 0, 0, False, 0, Nothing, 0)

 

But now I need to go another level deeper and select a feature belonging the a component in the subassembly. I tried using:

 

boolean = swModel.Extension.SelectByID2("FeatureName@ComponentName-InstanceNumber@SubAssemblyName-InstanceNumber@AssemblyName", FeatureType, 0, 0, 0, False, 0, Nothing, 0)

 

but it does not work, instead it selects a feature in the main assembly with the same name and returns false (i.e. failed)

 

Does anybody know how I can get this to work? I believe what I'm looking for the proper syntax/format of the "fully-qualified name" of a feature two or more levels down the assembly structure.

 

Thanks!

Outcomes