AnsweredAssumed Answered

How do I write the macro code for Combine feature?

Question asked by Pranjal Jamsandekar on Oct 31, 2014
Latest reply on Nov 10, 2014 by Pranjal Jamsandekar




I want to create the macro code to get the  cavity as shown in the above image.



I tried to create the code ,but I am bit confuse that how should I define the body feature as example below




boolstatus = Part.Extension.SelectByID2("Boss-Extrude1", "SOLIDBODY", 3.29907082439007E-02, -2.47001373908802E-02, 4.99999999998408E-02, True, 0, Nothing, 0)



Is there any other way we can name it , as example "Block" for Body1 and "Cavity" for Body2, instead what they are name in the feature tree while write the code.




If we have use the command  Move,Copy/Body2 feature and we use this Combine Feature it will take the name what is in feature tree as below




boolstatus = Part.Extension.SelectByID2("Body-Move/Copy66", "SOLIDBODY", -8.40723549534659E-02, -7.2976860056732E-03, 3.95765173277017E-03, True, 0, Nothing, 0)



So how should I replace the highlighted name while writing the code as that won't be remain always same .  ["Body-Move/Copy66"]