Hello again, I have a series of sketch with several sketch segments inside. I would like to create a simple macro that, after selecting two sketch segments, let me quickly create a surface loft.
Unfortunately I can't get InsertLoftRefSurface2 to work, no matter what.
At the moment I simply select two sketch segments in the interface, then launch the macro. The macro:
1. Saves the two selected sketch segments in an array
2. Clears the selection
3. Using ModelDoc2 selects the two sketch segments again using SelectByID2 with mark 1 as per InsertLoftRefSurface2 API remarks
4. If both selections are true (and they are) performs a InsertLoftRefSurface2(false, false, false, 1.0, 0, 0)
Solidworks spins for a second then nothing happens. No errors, no clues, nothing.
I registered a macro doing the same within the interface. The main difference is that the macro selects the two sketch segments using SelectByID2("Unknow", "SELOBJGROUP", [etc.]) with mark 1.
I was also trying to create a temporary body by using Modeler.CreateLoftBody2 but I can't get InsertLoftRefSurface2 to work, let alone CreateLoftBody2.
Is there something I'm not aware of?
Could you post your macro's code?