adding module to API stops main() from running?

Discussion in 'SolidWorks' started by Derek Ciula, Dec 21, 2005.

  1. Derek Ciula

    Derek Ciula Guest

    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
     
    Derek Ciula, Dec 21, 2005
    #1
  2. Derek Ciula

    That70sTick Guest

    "Sub Main" needs to be the last subroutine in the first module.
    Cut-Paste to switch orders.
     
    That70sTick, Dec 21, 2005
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.