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

Open PDF in a ribbon toolbar with the command ACTION

Hello,

 

Does anyone know how to open PDF file with the ACTION command in ribbon toolbar NX10?

 

On NX10 I can´t make it work 

 

Many thanks,

 

Best regards,

8 REPLIES

Re: Open PDF in a ribbon toolbar with the command ACTION

You can specify a windows command script (BAT or CMD) as action.

 

With the following content

start "" "{full path to PDF}"

The NX menuscript documentation contains the various possible executables for the ACTION keyword.

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: Open PDF in a ribbon toolbar with the command ACTION

Hello,

 

This works in your NX?

 

In my case, ACTION start "" "C:\HELP.pdf" doesn´t work...

 

In previus version like NX8.5 with the command ACTIONS works fine but not now...

 

Many thanks,

 

Best regards,

Solution
Solution
Accepted by topic author CristianMiguel
‎10-20-2015 03:29 AM

Re: Open PDF in a ribbon toolbar with the command ACTION

I think you didn't read my first sentence carefully.

 

Content of the MEN file:

ACTION "C:\OpenPDF.cmd"

Content of the CMD file:

start "" "C:\HELP.pdf"
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: Open PDF in a ribbon toolbar with the command ACTION

At Menuscript help for NXOpen C it says that you can run system commands (EXE, BAT or CMD).

START is a shell command, so you need to run a Windows script (BAT or CMD) to use it.

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
Solution
Solution
Accepted by topic author CristianMiguel
‎10-20-2015 03:08 AM

Re: Open PDF in a ribbon toolbar with the command ACTION

Another thing to look at...

 

I was having problems defining a button in an RTB to directly access an OS command.

However, if I add a button to the *menu* using menuscript, then I can use that menu button's name in the RTB file.

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Open PDF in a ribbon toolbar with the command ACTION

I always create a menu file, since you have much more options than with the tool bar files.

In addition you can make a menu entry available only in one specific application easily, where this is nearly impossible for a tool bar entry.

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: Open PDF in a ribbon toolbar with the command ACTION

If you use the ...\Application\profiles\UG_APP_*\... folder structure, you can have RTBs (and I assume other things) be application specific.

 

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Open PDF in a ribbon toolbar with the command ACTION

Hello, 

 

Yes, the problem was in the *.tbr file with the Statement ACTION. In the *.men file with ACTIONS works fine.

 

Many thanks to Ken_A and Stefan_Pendl, without your help, I wouldnt have done it Smiley Happy

 

Best regards,