Run NX command using API
Run NX command using API
(OP)
Hi,
I am currently developing a solution where I need to run some standard NX commands using API calls. Is it possible?
Kindly advise. I am using NX 9.0
Thanks
Rajat Jain
I am currently developing a solution where I need to run some standard NX commands using API calls. Is it possible?
Kindly advise. I am using NX 9.0
Thanks
Rajat Jain
Rajat Jain
Technical Director
JeeneDo Auto-Configure Pvt. Ltd.
www.auto-configure.com





RE: Run NX command using API
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Run NX command using API
Let me describe the scenario here.
I have an addin which has an associated menu. When the user clicks on the menu command, we call a function, say f1(). This function does many processes which are internal to the addin. The function also calls native NX command (like Add Component) in its process. This call should be as good as a user clicks on the Add Component command from NX Menu.
How do we call the Native NX command using API?
I hope it explains the situation.
Kindly advise.
Thanks
Rajat Jain
Technical Director
JeeneDo Auto-Configure Pvt. Ltd.
www.auto-configure.com
RE: Run NX command using API
In Preferences -> user interface -> journal, choose your language of choice. Start the journal recorder, perform a simple operation, stop the recorder, open the resulting file in a text editor. Some operations cannot be 'recorded' in this fashion, but many can.
www.nxjournaling.com
RE: Run NX command using API
Thanks for your reply.
I tried this approach earlier. The Journal recorder records the functions which are used internally by the command but it does not give the command interface.
I am looking for a direct call to command through a commandManager type object.
Hope it defines the problem.
Thanks
Rajat Jain
Technical Director
JeeneDo Auto-Configure Pvt. Ltd.
www.auto-configure.com
RE: Run NX command using API
Rajat Jain
Technical Director
JeeneDo Auto-Configure Pvt. Ltd.
www.auto-configure.com
RE: Run NX command using API
RE: Run NX command using API
Yes, I want to run the Native NX command (which is executed when the Menu button is pressed). The Native NX command run should automatically pop the corresponding UI.
Any help is appreciated!!!
Thanks for your help!!!
Rajat Jain
Technical Director
JeeneDo Auto-Configure Pvt. Ltd.
www.auto-configure.com
RE: Run NX command using API
1) Either construct the dialog yourself with Block UI Styler (complicated, since you'll also have to implement the subsequent Constraints dialog);
2) Or call a macro file from your program that clicks the necessary button (also complicated and mostly futile, since macros are very environment-dependent, not to mention obsolete);
3) Or complain to Siemens PLM until they implement the missing function (good luck with that).