Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro Question 2

Status
Not open for further replies.

Mitsu50

Mechanical
Jun 26, 2003
204
Can anyone tell me why this macro will run when i press play inside the macro editor, but it i try and do it from SW or a custom macro button i get nothing? I copied from the API help, and made a button just messing around. thanks!
 
Replies continue below

Recommended for you

If the macro works fine in SW, then it's probably the way you set up the button.

[cheers]
 
SW can only start code that resides in a Module. All your code resides in the form "PDMWorks". There is a single sub inside the module "Macro11" that does nothing. This is what gets run when you try to run it from SolidWorks. To show the form, you need to add the line

PDMWorks.Show

to the currently empty Sub main() in module Macro11.

-handleman, CSWP (The new, easy test)
 
Wow that was easy, i never would have guessed it. Thanks Handleman!

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor