Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Step/stp => prt right click conversions

Status
Not open for further replies.

Cdickstein

Computer
Mar 12, 2020
13
I currently have a batch file which is used for right click conversions of stp=>prt. It works only when the file is on my desktop, however the majority of the files are on a server location. Working on my desktop is not a viable option as many people share the same files.

The code is as follows:
Code:
@echo off
set fl=%1
set ofl=%fl:stp=prt% 
"C:\Program Files\Siemens\NX1872\STEP214UG\step214ug.cmd" d=%fl% O=%ofl%
rem ofl% O=%1 d="C:\Program Files\Siemens\NX1872\STEP214UG\step214ug.def"

What I am aiming to do is to right click on a step/stp file (on my desktop, on the server, etc...) and be able to convert the files.

The following are my requirements
[ul square]
[li]What is working:[/li]
[ul disc]
[li]Right click activates batch file[/li]
[/ul]
[li] What is not working:[/li]
[ul disc]
[li]Converting file from any file location (including on server)[/li]
[ul circle]
[li]This must be done using a batch file[/li]
[/ul]
[/ul]
[li]Additional Requierments[/li]
[ul disc]
[li]Must use step214[/li]
[/ul]
[/ul]
 
 https://files.engineering.com/getfile.aspx?folder=48fa7006-d24f-4686-8dc5-8698a5d84927&file=StpToPrt.Bat
Replies continue below

Recommended for you

Have you considered using the built-in translator that NX has in Windows ?
You will need to expand the Siemens-NX menu to get there.
Capture_htkked.jpg


Jerry J.
UGV5-NX1884
 
While I dont use this to right click, it drops the nx files wherever the step file came from.

I keep it on my desktop and you can drag multiple files onto it and it'll translate them.

Maybe something in the code will work for you? I did not write it. It's something I found here years ago.

Code:
@echo off
:: if multiple versions installed uncomment 
:: line below and edit to version folder required

::set UGII_BASE_DIR=C:\Program Files\Siemens\NX 12.0

set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii
set PATH=%UGII_ROOT_DIR%;%PATH%
set STEP214UG_DIR=%UGII_BASE_DIR%\step214ugset ROSE_DB=%STEP214UG_DIR%
set ROSE=%STEP214UG_DIR%

:Loop
if '%1'=='' goto DONE
call "%STEP214UG_DIR%\step214UG.exe" %1
shift
goto Loop

:DONE
 
jerry1423 said:
Have you considered using the built-in translator that NX has in Windows ?
You will need to expand the Siemens-NX menu to get there.
Capture_htkked_yaku38.jpg

Jerry J.
UGV5-NX1884

I am aware of this, but learning this has other benefits for me as well, therefore, why not use this as an opportunity to learn how to do this? In the future, I may implement the batch file to not only convert the file, but to also convert from millimeters to inches in one go.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor