Code: Select all
swEntity := SelMgr.GetSelectedObject6(1, 0)
swComponentA := swEntity.GetComponent
'or
swComponentA := SelMgr.GetSelectedObject6(1, 0)
swEntity := SelMgr.GetSelectedObject6(2, 0)
swComponentB := swEntity.GetComponent
'or
swComponentB := SelMgr.GetSelectedObject6(2, 0)
Currently I am hard coding the format of the ID because this macro is used on assemblies where the file structure is known. Now I want to generalize my program for any assembly structure.
How can I build or get the ID of swComponentA with respect to the top assembly for use in SelectByID2? The macro recorder gives something like this
Code: Select all
boolstatus = Part.Extension.SelectByID2("Right Plane@HMC-ADPT1200-NB-1-1@HMC-ADPT1200-1/HMC-PLCD-539-3@HMC-ADPT1200-NB-1", "PLANE", -9.84228209404137E-05, 1.09972117172674E-04, -0.154934245329059, True, 0, Nothing, 0)
Example: myFeature would be all three primary planes.
Code: Select all
id = myFeature & "@HMC-ADPT1200-NB-1-1@HMC-ADPT1200-1/HMC-PLCD-539-3@HMC-ADPT1200-NB-1"