×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Open the Part file through batch

Open the Part file through batch

Open the Part file through batch

(OP)
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

RE: Open the Part file through batch

Selvaraj,

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

CODE --> script

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 --> script

Call "D:\files\testPart.prt" 


HTH, Joe

RE: Open the Part file through batch

(OP)
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.

RE: Open the Part file through batch

Selvaraj C,

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

Ugs_router.exe switches:
https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_help/#uid:xid280878
"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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources