Autorun Macro
Autorun Macro
(OP)
Is there a way to have a macro autorun whenever I open a certain part file?
Thanks,
Todd
Thanks,
Todd
When was the last time you drove down the highway without seeing a commercial truck hauling goods?
Download nowINTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: Autorun Macro
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group
RE: Autorun Macro
"C:\Program Files\SolidWorks\SolidWorks\SLDWORKS.exe" -m "Full Path To Macro"
RE: Autorun Macro
I will just run it from a shortcut key. One other question, please. Why do I get an error message whenever I try to run a macro ...test.swp has wrong format and cannot be converted to VBA macro file? I have never seen this before. Any suggestions?
Thanks,
Todd
RE: Autorun Macro
It might lead to a solution for what you want to do.
http://www
Flores
RE: Autorun Macro
I've never been able to get SW to run (let alone run a macro) with that switch. Maybe I'm doing sumfin wrong.
Matt
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group
RE: Autorun Macro
Did you place the macro path in "" ?
RE: Autorun Macro
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group
RE: Autorun Macro
The switch should have been "/m" (yes, in quotes).
As a test, place "C:\Program Files\SolidWorks\SolidWorks\SLDWORKS.exe" "/d" in the Target section of a SW shortcut.
Open a file or start new document and you should see a Developers Tools tab added to the main toolbar.
Not sure about the multi macro thing yet.
RE: Autorun Macro
CODE
Application.SldWorks.RunMacro("C:\StartupMacro1","Module1","main()")
Application.SldWorks.RunMacro("C:\StartupMacro2","Module1","main()")
Application.SldWorks.RunMacro("C:\StartupMacro3","Module1","main()")
'And on
'and on
'and on.....
End Sub
-handleman, CSWP (The new, easy test)
RE: Autorun Macro
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group