How do I change my macro default search location?

How do I change my macro default search location?

rip2A4H8
Enthusiast Enthusiast
330 Views
4 Replies
Message 1 of 5

How do I change my macro default search location?

rip2A4H8
Enthusiast
Enthusiast

Hi!

 

I've tried searching for this, but I'm wondering if I'm not using the correct terminology.  When I'm in Inventor and want to run/edit/create a macro, the dialogue box pops up with the drop-down menu for "Macros in:" pointing to a location that I don't want.  How do I change that?

For additional information, it used to point to the correct location where I keep my macros, but I must have changed something recently that changed it.  I can still access the correct location in the drop-down menu, but I have to select it every time, even within the same session of Inventor.

 

Thanks!

 

0 Likes
331 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Hi @rip2A4H8.  There is a place within the Application Options > File tab, to enter (or browse for) the location of your "Default VBA project".  If you are creating your VBA macros within that default VBA project file, then that is where they will be.  Of course you can also create other application level VBA projects, but those should also likely be in the same location, and you can also create VBA macros within documents.  If you created the macro in a document project, it will be saved within the document itself, instead of an external file.  However, if you are talking about external iLogic rules, instead of VBA macros, that is specified here:  Tools tab > Options panel > iLogic Configuration (you may have to expand the Options panel to see this button).  When you click that button, it brings up a dialog.  You would need to specify 1 or more directories in the upper portion of that.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

rip2A4H8
Enthusiast
Enthusiast

@WCrihfield, thank you for the reply.  I realized that I might not have been clear enough in my question.  In the Macros dialogue box, in the drop-down for "Macros in:," I get three options:  DocumentProject, ApplicationProject, and All Application Projects and Active Documents.  It's the DocumentProject that keeps showing up first, but since I don't store macros there (and I'm still trying to figure out where the actual .VB file is, but that's another issue), I have to select one of the other two options each time I want to run/create/edit a macro; I'm trying to eliminate this last step.

0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor

OK.  I understand now.  I do not know how to change the behavior of that drop down list, but I have another tip that might help out some.  What I often do when I want to be able to run some macros quickly & easily is add a button to the ribbon for it, that way I can just click it once to run it.  To do this, just right click anywhere on an existing ribbon button, then choose "Customize User Commands..." from the right-click menu.  This will bring up the 'Customize' dialog.  (You can also get to this dialog from the Tools tab > Options panel > Customize)  On the right side, choose which ribbon you want to add these macro buttons to from the drop-down list at the top.  Then on the left side, choose 'Macros' from the top drop-down list, under 'Choose commands from:.  Then you can either drag-n-drop them, or select them, then click the center directional buttons to move them over.  Once you click Apply, you will see a ribbon panel called "User Commands" at the end of your other panels with your macro buttons shown within.  Now you can simply left click the button to run the macro.

 

PS.  Just an additional tip...if your macro is set up as a Function, instead of a Sub; or if it is set-up to receive 'input' variables, those will not be recognized as true macros that you can run this way.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 5 of 5

rip2A4H8
Enthusiast
Enthusiast

Thanks again for the quick reply.  No worries on not knowing the exact answer; your suggestion for creating a button (or hot key, as I sometimes do) is great since that eliminates a step while I want to repeatedly access a macro in development.

0 Likes