Batch Conversion NX part file to Parasolid
Batch Conversion NX part file to Parasolid
(OP)
Hello,
I am running NX7.5.4.4 on Windows 7pro 64 bit. I would like to convert the contents of a directory from Part files to parasolid files.
We have have some clients who have requested all parasolids.
If this option doesn't exist does anyone know the location of a journal or other NXopen type program that will do this?
Thank you
I am running NX7.5.4.4 on Windows 7pro 64 bit. I would like to convert the contents of a directory from Part files to parasolid files.
We have have some clients who have requested all parasolids.
If this option doesn't exist does anyone know the location of a journal or other NXopen type program that will do this?
Thank you





RE: Batch Conversion NX part file to Parasolid
http://www.eng-tips.com/viewthread.cfm?qid=270935
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Batch Conversion NX part file to Parasolid
I tried that first but only got a bunch of errors when I tried that program.
RE: Batch Conversion NX part file to Parasolid
Or is my memory fading?
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Batch Conversion NX part file to Parasolid
RE: Batch Conversion NX part file to Parasolid
RE: Batch Conversion NX part file to Parasolid
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Batch Conversion NX part file to Parasolid
Thanks
RE: Batch Conversion NX part file to Parasolid
All the information, including extracting Parasolid, is there.
Mark Rief
Product Manager
Siemens PLM
RE: Batch Conversion NX part file to Parasolid
You need to open the command prompt window from the NX menu, so you get the proper environment settings. Then just enter (without the quotes) 'ug_inspect -h'. This will list the options for the ug_inspect command.
Basically, if your files to export are in a single directory, use the cd (chnage directory) command to put you in that directory. Then you can run ug_inspect to extract the Parasolid data.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Batch Conversion NX part file to Parasolid
I was talking about the the Command prompt area, all the commands are listed but I'm still a bit lost. If I am trying to batch convert do I list the directory, or do I list every part file in the directory? Do I have to have a separate transmit file for each one? An example on the proper format would go a long way.
RE: Batch Conversion NX part file to Parasolid
To be fair I said Old School, which is still cool
I've gotten that far, but when I try to extract file or even individual files I get messages regarding transmit files etc.
Thanks
RE: Batch Conversion NX part file to Parasolid
Any ug-inspect command after that: could not open ... status 1
doesn't that mean I have the command wrong?
RE: Batch Conversion NX part file to Parasolid
Since I started on UGII V3, I guess I am "old school", as well as old!
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Batch Conversion NX part file to Parasolid
RE: Batch Conversion NX part file to Parasolid
I can get just about everything but the part file. It might be that it is making the Parasolid and putting it in a temp drive.
@cowski Good Jorb!
RE: Batch Conversion NX part file to Parasolid
RE: Batch Conversion NX part file to Parasolid
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Batch Conversion NX part file to Parasolid
I was able to get 1 parasolid out of the directory, but I keep getting errors about psuedo entries.
Thanks again for the help.
RE: Batch Conversion NX part file to Parasolid
Here are a few relevant threads:
thread561-137205: Exporting Multiple Parasolids
contains usage of the ug_inspect program and a possible batch file.
To use this code, copy and paste it into notepad, name it and make sure the extension is .bat. Drag and drop your part file onto the .bat file (in windows explorer). It references your temp directory, I assume it will extract the parasolid there, but I have not tested it.
thread561-270935: Automating the export of multiple parts as parasolid files
petulf posted a journal program to export parasolid files in this thread.
RE: Batch Conversion NX part file to Parasolid
I tried thread561-270935: Automating the export of multiple parts as parasolid files: Automating the export of multiple parts as parasolid files but I couldn't get petulf's journal to work correctly, I kept getting lots of errors
as for the first part, are you saying I should move all the part files I want translated in a directory to a batch file and tell the ug_inspect command to inspect the batch file?
Thanks
RE: Batch Conversion NX part file to Parasolid
If you make that batch file, it will call the ug_inspect program and it will operate on the part file that you pass to it. If you name the batch file extract.bat, you can call it from the command line like: C:\parts\extract.bat C:\parts\mypart.prt (assuming the batch file and your parts are in C:\parts) or open windows explorer and drag&drop a part file of your choice onto the extract.bat file.
If you get ug_inspect to work as you want, we can come up with a more robust script file to work on multiple files, directories, etc.
RE: Batch Conversion NX part file to Parasolid
This script works to get single files translated into their desired location with the desired part name but I have been up able to adapt it to multiple files or the whole StartDirectory as desired.
It also still gave me a warning about a pseudo entry which I am still trying to find out what that is
RE: Batch Conversion NX part file to Parasolid
I'd try a part cleanup on the file(s) that give warnings about pseudo entries. Also, just a guess, I'd check to see if those parts had any interpart links (wave, promote, etc).
RE: Batch Conversion NX part file to Parasolid
I think you're probably right about it being the wave link. Practically everything we do is linked back to an early stage in it's manufacturing life, so that's probably the warning.
Any clue as to what the number is after the extract command?
RE: Batch Conversion NX part file to Parasolid
RE: Batch Conversion NX part file to Parasolid
We may have to revisit using a journal in batch mode. How consistent are the files you have? Does each file have the main model on a certain layer (layer 1 perhaps)? If so, perhaps we could write/modify a journal to export everything on layer X to a parasolid file, or use some similar strategy.
RE: Batch Conversion NX part file to Parasolid
All of the parts should be very consistent and should have the parts on either layer 23 or 26. I would like to know what in the code needs to be declared or changed in order to get it to work.
RE: Batch Conversion NX part file to Parasolid
RE: Batch Conversion NX part file to Parasolid
RE: Batch Conversion NX part file to Parasolid
Works like a charm thanks for all your help!!!
RE: Batch Conversion NX part file to Parasolid
Thanks petulf for posting your code!
RE: Batch Conversion NX part file to Parasolid
RE: Batch Conversion NX part file to Parasolid
I am running NX7.5. I would like to export out parasolids of my assemblies in a batch mode. I downloaded the code, psBatchExport, and saved in my UGII dir. I run the script and it gives me an error that reads 'Unable to cast object of type NXOpen.NXObject to type NXOpen.Part'. Please advise.