Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Macro locations

Status
Not open for further replies.

sdb999

Mechanical
May 1, 2003
96
Has anyone figured out how to get SW to obey the "Tools-Options-File Locations-Macros" setting? It seems to only look at the install directory no matter what path is defined in this field.
 
Replies continue below

Recommended for you

I have not played with it but in the past, SolidWorks looked only in the install directory when you assign a macro to a key on the keyboard.
 
It works fine here. We have 4 seats, and I have them all set to a network location for macros.

What OS are you using?

Also, macros need to be in the install directory if you are trying to place them on the menu using "Tools --> Customize"

[bat]All this machinery making modern music can still be open-hearted.[bat]
 
XP professional 5.1, and yes I am trying to assign them to function keys. Are you saying you maintain five copies of your Macros, one on the network drive and another on each users' local drive?
 
No, I don't do that. I just have the users access macros through "Tools --> Macro --> Run"

I recently acquired VB 6.0 and will be converting macros to exe's and adding them to the main menu.
 
One possibility: create a macro to store locally that kicks off a macro stored on the network. That way, you only have to maintain one "working" macro.

retval = SldWorks.RunMacro ( filePathName, moduleName, procedureName )
 
Ok, so if we want to click thru Tools-Macro-Run we can have one location for all our macros. If we want a single key stroke they have to be duplicated on each user's local drive. As a hybrid we can start each macro via a local that mearly kicks off the network version. It's all starting to make sense (in a SolidWorks kind of way). Thanks All.
 
I put the macros onto everyone’s C:\Program Files\SolidWorks\Macros directory. That macro will start our visual basic Exe program. There is only one copy on the network. Here is an example of what I use.

Option Explicit

Dim swApp As Object
Dim Part As Object
Dim MyAppID, ReturnValue

Sub main()
Set swApp = CreateObject("SldWorks.Application")
Set Part = swApp.ActiveDoc

MyAppID = Shell("\\Athena\Eng\Applications\SolidWorks\Executables\Titleblock.exe", 1)

End Sub


Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor