Hi guys,
I'm trying to record a macro;
1) while working with a non .SLDPRT CAD file (like X_T or STP)
and
2) using functions in Direct Editing tab, like moving faces changing diameters.
but unfortunately Solidworks can not follow me and record the very first step. "SelectByID2" function (for selecting faces) doesn't work, So, all other steps are fail.
--Example for "SelectByID2" function in regular macros using SLDPRT files with feature tree:
>> boolstatus = Part.Extension.SelectByID2("Line2", "SKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
or
>> boolstatus = Part.Extension.SelectByID2("D9@Sketch1@MyExample.SLDPRT", "DIMENSION", 0.388868242092195, 0.598798981386682, -0.56327146244613, False, 0, Nothing, 0)
--Example for SelectByID2 when I try to work with X_T files with no feature tree:
>> boolstatus = Part.Extension.SelectByID2("", "FACE", -0.397196525943571, 0.406399999999906, 0.178747848011696, False, 0, Nothing, 0)
Part.FeatEdit
There is no ID for the selected face!
Any suggestions?
Any other functions or examples to start with?
I appreciate if you could help me on this matter.
Best Regards,
Sina
SolidworksApi macros