Showing results for 
Search instead for 
Do you mean 
Reply

How to launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

I need to launch a .dll file that would ususally be launched interactively in NXs File>Execute>NXOpen menu programmatically. Can this done in a journal?

17 REPLIES

Re: How to launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

Do you like to launch it from a menu or tool bar button, or do you really need to launch it from another NX Open executable?

 

Launching from a menu or custom button is easy, launching it from a NX Open executable of any kind forces you to use the abilities of the underlying programming language used for the calling source code.

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 launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

[ Edited ]

Well I am developing an Excel Based Application that requires NX to run a specific .dll. It is for launching a server process so that my Excel App can connect to NX remotely.

 

I want to be able to run the .dll programmatically because I don't want my users to have to concern themselves with running the file interactively. It isn't a big inconvenience if they have to do it, but is ideal for maing the app more user friendly. The less they have to do get the App up and running the better. Plus, not everybody is all that computer savvy, so it will help.

 

So, I mentioned previously I wanted to run it in a journal, but really I am going to run it in Excel through a remote connection. Which, is similar to running it in a journal.

 

I am coding in VB.NET.

 

Any ideas?

Re: How to launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

Does the NX session need user interaction?

If not I would create an EXE instead of a DLL, which will run NX in batch mode without any user interaction.

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 launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

Yea actually user interaction will be required. I am not really sure what Language calls to use in VB.NET to run either a .exe or .dll file through NX. Could I run a batch file in interactive mode?

Re: How to launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

Couldn't you just add your dll to run on NX startup?  I believe there is a user exit for this.

Re: How to launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

I don't think that is the best solution.  If I can't figure out how to get it done within the application then maybe I will consider it. Thank you though.

 

Re: How to launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

Is the NX session already open?

or would Excel API start NX & run the code?

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: How to launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

NX Open doesn't offer any specific methods to run executables, since every programming language does include those already.

 

From my point of view it would be much easier to launch Excel from NX or skip using Excel entirely.

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 launch a .dll file in NXs File>Execute>NXOpen menu programmatically?

The NX Session would already be open. My desire is, that when you open the Excel App, Excel will initiate the remote connection programmatically so that the user does not have to concern themselves with running the file.

 

However, as it seems that this might be a difficult implementation, should I instead have Excel start NX and have NX run the file on startup?

 

How could I accomplish this?