Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Importing multiple .stp files at once?

Phenom
Phenom

I often use file>open> an open .stp files instead of importing them into an open file. Is there a command line line program that can open all .stp within a driectory, and save them as a .prt file. I have a lot of files to import and am not able to find a way other than opening each individually.

 

Thanks

Glenn Balon
Production: NX 12.0.2 MP10 Primarily CAM
15 REPLIES 15

Re: Importing multiple .stp files at once?

Phenom
Phenom

Start-> Seimens NX -> STEP AP214 (or AP203)

 

Select import

 

Browse to directory

Re: Importing multiple .stp files at once?

Phenom
Phenom

Thank you. I rember seeing those, dont know why I didnt think of it. When I open I see this message. Any idea what I should point to? I tried setting  set UGII_JAVA_HOME_DIR=C:\Program Files\Java\jre1.8.0_45\bin\ in the ugii_env.dat., and I still get the same message.

 

 

JAVA.PNG

 

 

 

 

 

Glenn Balon
Production: NX 12.0.2 MP10 Primarily CAM

Re: Importing multiple .stp files at once?

Phenom
Phenom

It normally works without editing any variables.

It could be a 32 64 bit problem.

It looks like you are pointing to the 64bit JRE

Have you installed the 32bit JRE?

 

alternatively save the following as a .bat file and drag and drop step files onto batch file, imported files will be in same location a step files. not sure if this works will NX11 as directory names have changed ugii -> NXBIN

 

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

::set UGII_BASE_DIR=C:\UG\NX9

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

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

:DONE

 

Re: Importing multiple .stp files at once?

Phenom
Phenom

Thanks, that seemed to work perfectly. I just dragged a group of .stp files onto the new batch file. Part files were created in the original directory along with all the sub components of the assemblies.  

Glenn Balon
Production: NX 12.0.2 MP10 Primarily CAM

Re: Importing multiple .stp files at once?

Legend
Legend
Seems to work fine in NX11, no editing required.

I tried to edit it for use with Iges as but thats not working. Is there something else iges needs?
Rob Newcomb, Design and Engineering manager
Elmhirst Industries, Specializing in Prototype sheet metal stampings and assemblies

Production: NX 12.0.2 / Autoform r8 /WorkNC 2020.0
Testing:NX 1855
PC: Rave Cadbeast: Intel(R) i7-4790K CPU @ 4.GHz /32gb ram /NVIDIA Quadro P2000 on Win10 Pro

Re: Importing multiple .stp files at once?

Phenom
Phenom
You modified directories and .exe trying to get it to work? Does it give an error message?
Glenn Balon
Production: NX 12.0.2 MP10 Primarily CAM

Re: Importing multiple .stp files at once?

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

::set UGII_BASE_DIR=C:\UG\NX9

set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii
set PATH=%UGII_ROOT_DIR%;%PATH%
set IGES_DIR=%UGII_BASE_DIR%\iges\
set ROSE_DB=%IGES_DIR%
set ROSE=%IGES_DIR%

:Loop
if '%1'=='' goto DONE
call "%IGES_DIR%\iges.exe" %1
shift
goto Loop

:DONE

iges error.png

Rob Newcomb, Design and Engineering manager
Elmhirst Industries, Specializing in Prototype sheet metal stampings and assemblies

Production: NX 12.0.2 / Autoform r8 /WorkNC 2020.0
Testing:NX 1855
PC: Rave Cadbeast: Intel(R) i7-4790K CPU @ 4.GHz /32gb ram /NVIDIA Quadro P2000 on Win10 Pro

Re: Importing multiple .stp files at once?

Phenom
Phenom

I took your code for the iges and used my NX11 directory. I get a different error. I am in windows 10error_iges_open.png

Glenn Balon
Production: NX 12.0.2 MP10 Primarily CAM

Re: Importing multiple .stp files at once?

Phenom
Phenom

In NX11 ugii folder has changed to nxbin.

 

below works for NX11

 

 

@echo off
:: if multiple versions installed uncomment 
:: line below and edit to version folder required
:: set UGII_BASE_DIR=C:\UG\NX11

:: for NX10 and below UGII_ROOT_DIR is ugii
:: for NX11 UGII_ROOT_DIR is nxbin
set UGII_ROOT_DIR=%UGII_BASE_DIR%\nxbin set PATH=%UGII_ROOT_DIR%;%PATH% set IGES_DIR=%UGII_BASE_DIR%\iges\ set ROSE_DB=%IGES_DIR% set ROSE=%IGES_DIR% :Loop if '%1'=='' goto DONE call "%IGES_DIR%\iges.exe" %1 shift goto Loop :DONE

 

Learn online





Solution Information