adding module to API stops main() from running?

Dec 21, 2005 1 Replies

So I'm working with a Solidworks macro I inherited.



If I edit the macro in SW: under Modules, I have a Main:



Public Sub main() FormBOM.show() end sub



When I play my macro it shows my form.



Now I add another Module, ECN: I then play the same macro, here's the weird part, the 2nd to last function module ECN is run... and the Main:Main() is never called.



I remove module ECN and rerun the macro, Main() appears to be called again -- my form appears



Can anyone imagine what i'm missing here? Thanks, Derek



"Sub Main" needs to be the last subroutine in the first module. Cut-Paste to switch orders.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required