Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Auto run an NXOpen exe program in NX 9 ?

Status
Not open for further replies.

biw01

Automotive
Dec 31, 2011
152
Can someone let me know if there is a way to auto execute a NX Open executable file (.exe) without someone physically executing this using File --> Execute.

The context of my problem statement is that I am using a Filesystemwatcher to monitor a folder on my pc. It automatically alerts if there are any few files added to this folder. I need a way to launch my NXopen program automatically everytime someone add a new file.

I would appreciate your help in this regard.

Thanks,
Amitabh
 
Replies continue below

Recommended for you

That can be done using something called Menuscripts where you can modify menu actions to launch custom applications as either a supplement to or a replacement of the normal menu action.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
John,

Thank you for replying to my query.
Where can I find more information on how to create a menuscript ?

Amitabh
 
The NX help is always a great place to start. The menuscript help can be found in the "programming tools" section of the help, which is not installed by default. You may need to re-run the help install program to find it.

www.nxjournaling.com
 
Thank you Cowski. I will look that up in my help file.
 
I believe that you can use the User Exits to have a dll executed at particular times automatically by NX.

We run NX Open with Visual Studio and when you use the template NX9 Open c# Wizard it creates a ReadMe.txt, that I have attached to this post, which describes these User Exits.

E.g.

User Exit Environment Variable Entry Point
Open Part USER_RETRIEVE ufget
New Part USER_CREATE ufcre
Save Part USER_FILE ufput

I haven't actually used these myself but this may be what you are looking for.

Paul

Paul Turner
CAD & Process Engineer
Mastip Technology
 
 http://files.engineering.com/getfile.aspx?folder=362bd434-5f77-453b-a157-ae41897e1911&file=ReadMe.txt
Could you create it as a Service ?

NX 9.0.3.4
NX 10.0.1.4 (Testing)
Windows 7 64 (Windows 8.1 Tablet)
 
If you have compiled your NXOpen program as an .exe file, I assume it is meant to run in batch mode (no user interaction). If it works correctly with no user interaction, you should be able to start the program from your file watcher program.

Something like:

www.nxjournaling.com
 
Cowski,

Once we open NX using the process.start , can we fire an NXOpen executable within the new NX session automatically ?

Thanks,
Amitabh
 
If you've compiled your program as an .exe, you won't need to open NX. Use process start on your .exe and it will start NX as necessary.

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor