Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

How to call a macro command via the menu?

   How to call a macro command via the menu in the NX8 menu file? Who can give an example to illustrate it?

Thanks!

9 REPLIES

Re: How to call a macro command via the menu?

The programming reference has plenty of examples and it is included in the NX documentation, but you must select it exclusively to be installed.

See the MENUSCRIPT reference for examples and explanations.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: How to call a macro command via the menu?

I write in the menu file in the following format, why  I can not successfully call this macro file?

...

BUTTON TC2
LABEL off
ACTIONS  D:\ott\ot\Z2-OFF.macro

...

Re: How to call a macro command via the menu?

[ Edited ]

In a toolbar or ribbon file, the keyword is ACTION - no "S".

I'm not sure if you can run a macro directly from a .men file. You may need to use a user tool file.

For what are you trying to use a macro? 

 

 

Mark Rief
Retired Siemens

Re: How to call a macro command via the menu?

I want to reduce the repetitive operation.so I use macro.I want to run a macro directly from a .men file.How to write specific the .menu file?Thank you.

Re: How to call a macro command via the menu?

What do you say the user tool file is

Re: How to call a macro command via the menu?

User tool files were the only way to add a custom command dialog in ancient days, I would not use them anymore.

I have never tried to add a macro to a menu entry, but it should be possible, if not I would report it as a bug.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: How to call a macro command via the menu?


Apple wrote:
I want to reduce the repetitive operation.so I use macro.I want to run a macro directly from a .men file.How to write specific the .menu file?Thank you.

Have you looked at using a journal?

Mark Rief
Retired Siemens
Solution
Solution
Accepted by topic author Apple
‎07-16-2016 01:40 AM

Re: How to call a macro command via the menu?

 

The ability to run a macro from a .men file was introduced in NX8.5, so you will not be able to do it in NX8.

 

This works in NX8.5 and later - this is a really simple .MEN file that needs to live in a valid "startup" folder:

 

VERSION 120

EDIT UG_GATEWAY_MAIN_MENUBAR

MODIFY

     BUTTON UG_FILE_SAVE_PART
     ACTIONS/PRE mySavePartPreAction.macro
END_OF_MODIFY

Re: How to call a macro command via the menu?

Hi,SteveLabout

Thank you for your direct and authoritative answer.