Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Run a macro from a .men file

Status
Not open for further replies.

cmacca

Mechanical
Mar 19, 2008
66
I am trying to write my own .men file to create a command to run a macro. I have run into the same problem as this thread thread561-94732. Is there anyway to do this?

I know you can do this by customising the menus in NX but I would like to write a .men file to easily share between uses over a network rather than each user creating the command in NX.

NX6.0.1.5, TC2007
 
Replies continue below

Recommended for you

John,

I have tried to use ACTIONS as below:

BUTTON TX_DRAFT_DIM_HOLE
LABEL Ho&le...
MESSAGE Creates a single leader diameter dimension for a circular feature.
SYNONYMS diameter, radius
HELP DRF_DIM_HOLE
BITMAP hole_dim
ACTIONS $UGII_SITE_DIR\DiaDim.macro

But get the error message:

"None of the actions specified for this button were registered Use Information->Custom Menubar->Report Tool for more information"


I did this and in the report found this:

Item TX_DRAFT_DIM_HOLE Hole...
Actions:
<actions not registered>

Not sure whats going on?

NX6.0.1.5, TC 2007
 
I tried

BUTTON UG_DRAFT_DIM_HOLE

and the button no longer showed up on the menu. I then tried

BUTTON UG_APP_MODELING

The button showed up but the icon and help message has changed to the "application modeling" button and the button now does nothing.

I'm not sure exactly what you mean by "Try replacing the name of the entry after BUTTON with a valid function". I have created other custom menu buttons that call up .vb files and they run fine eg.

BUTTON INSERT_MATERIAL_NOTE
LABEL Insert &Material Note
MESSAGE Inserts standard Material note.
ACTIONS run_journal $UGII_SITE_DIR\InsertMaterialNote.vb
 
The only way I have managed to get this to work is to define the custom button in a .tbr file first ie

BUTTON TX_DRAFT_DIM_HOLE
LABEL Ho&le...
MESSAGE Creates a single leader diameter dimension for a circular feature.
BITMAP hole_dim
ACTION $UGII_SITE_DIR\DiaDim.macro

And then call this button in the .men file ie

BUTTON TX_DRAFT_DIM_HOLE

Is there a bug with setting up macros in .men files?
 
Perhaps, but I think it's a bit more of a Catch 22 since at one time, you couldn't add anything to a toolbar that didn't already exist somewhere on a drop-down menu. Of course that didn't go over too well so changes were made, but I suspect that there are still some 'links' between the menu code and the toolbar code which can create some problems under the right conditions.

However, that being said, it may still be worth it for you to contact GTAC and have them take a closer look at this.

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor