Run a macro from a .men file
Run a macro from a .men file
(OP)
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: .tbr files. 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
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





RE: Run a macro from a .men file
ACTION
In a .men file, it starts with:
ACTIONS
John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Run a macro from a .men file
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
RE: Run a macro from a .men file
John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Run a macro from a .men file
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
RE: Run a macro from a .men file
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?
RE: Run a macro from a .men file
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
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Run a macro from a .men file
A way to accomplish this is by converting the .men to a .journal format. Journals can run from a menu and toolbar.
-Dave Tolsma
http://Tolsnet.com/jobs
http://groups.google.com/group/NX_CAX/
http://groups.google.com/group/plm-exchange/