×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Macro locations

Macro locations

Macro locations

(OP)
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.

RE: Macro locations

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.

RE: Macro locations

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"

All this machinery making modern music can still be open-hearted.

RE: Macro locations

(OP)
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?

RE: Macro locations

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.

RE: Macro locations

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 )

RE: Macro locations

(OP)
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.

RE: Macro locations

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources