Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Open the Part file through batch

Status
Not open for further replies.

SelvarajC

New member
Nov 27, 2014
26
0
0
IN
Hi All,
Is there any option to open the part file through batch using command line argument.
Generally applications accepts the command line arguments. I tried in NX but it is not working.
For example:
call %UGII_ROOT_DIR%\ugraf.exe D:\files\testPart.prt


Thanks,
Selvaraj C
NX Automation Engineer
 
Replies continue below

Recommended for you

Selvaraj,

Add the -retrieve option to pass the part file name to ugraf.exe.

Code:
call "%UGII_ROOT_DIR%\ugraf.exe" -retrieve:"D:\files\testPart.prt"

Using ugraf will cause a new instance on NX for each "Call".

Using just the part name will cause windows to use the default association for the .prt extension (ugs_router.exe) which will start NX if needed or reuse a running instance and pass the part file to NX.

Code:
Call "D:\files\testPart.prt"


HTH, Joe

 
Thank you for your reply.
Where can I get these knid of batch arguments script info?.
Is anything mentioned in Documentation?

Thanks,
Selvaraj C
NX Automation Engineer.
 
Selvaraj C,

The NX launch command line switches:
[URL unfurl="true"]https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_help/#uid:launch_win_switches_r[/url]
"Home -> Fundamentals -> Launching NX -> Start NX on Windows Platform"

Ugs_router.exe switches:
[URL unfurl="true"]https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_help/#uid:xid280878[/url]
"Home -> System administration - Command line utilities -> Start and connect to applications"

Also, using an NX command shell and entering the command ugs_router with no arguments will cause a popup dialog that describes all of the arguments / options.

HTH,
Joe
 
Status
Not open for further replies.
Back
Top