scottmac
Mechanical
- Jan 9, 2002
- 1
I am trying to get my feet wet with API programming. I have recorded a simple macro which mates 3 planes on a part (FRONT, SIDE, TOP) to 3 planes on the assembly which it is contained in (PLANES have same names.)
I am trying to makes this macro generic so that user can select a floating part in a assembly and the macro will get part name and assembly name and take care of the mates accordingly. I am having trouble getting the assembly name for use in selecting the part planes
(i.e. Assy.AndSelectByID "Top@Part1-1@Assem1", "PLANE", 0, 0, 0)
Part1-1 can be found using Component.Name after using GetSelectedObject()
How do I get Assem1?
I ran across one technique but it puts .sldasm extension.
ANy help would be greatly appreciated.
I am trying to makes this macro generic so that user can select a floating part in a assembly and the macro will get part name and assembly name and take care of the mates accordingly. I am having trouble getting the assembly name for use in selecting the part planes
(i.e. Assy.AndSelectByID "Top@Part1-1@Assem1", "PLANE", 0, 0, 0)
Part1-1 can be found using Component.Name after using GetSelectedObject()
How do I get Assem1?
I ran across one technique but it puts .sldasm extension.
ANy help would be greatly appreciated.