HI
Do you have a script that does batch converting from one set of files to another format. such as converting Steps into Obj.
It needs to work with V5
thanks
Alex
HI
Do you have a script that does batch converting from one set of files to another format. such as converting Steps into Obj.
It needs to work with V5
thanks
Alex
Hi @alexandre_galin,
There are a number of batch processing scripts in the RhinoScript samples repo:
https://github.com/mcneel/rhino-developer-samples/tree/6/rhinoscript
Here is one that open DWG files and saves them as 3dm.
https://github.com/mcneel/rhino-developer-samples/blob/6/rhinoscript/BatchConvertAutoCAD.rvb
Perhaps this is a good starting point?
– Dale
The best way would be to use a converter that is designed to do this type of conversion.
Take a look at CrossManager. It can convert a lot of CAD formats (including STEP to OBJ), and it can be used in command line to do batch conversions.
It is not free, but it can be interesting for you if you often needs to convert files.
Hi @dale
I’ve got a bunch of STP files and I would like to convert to 3DM straight away.
Actually I never handled a Rhino script…
I just tried to modify your script to handle STEP files replacing dwg with stp
but I got an error as shown on screenshot.
the script is attached, could you please have a look at it?
Thanks!
BatchConvertSTP.rvb (2.6 KB)
Hi @dale
could you please help me to fix a script to batch convert stp to 3dm?
Thank You!
Let me know if this one works for you…
BatchConvertSTEPTo3dm.py (1.8 KB)
YES!
works perfectly in Rhino 7,
Thanks a lot!!!
P.S.
in tested in Rhino 8 as well and there it stucks at browse, not opening the browse folder window.
Select Option ( Edit Run Open ): _Run
Path of script to run ( Browse ): _Browse
How are you running it in V8? With _RunPythonScript
? Here it seems to run fine…
You are right, I was running the wrong command!
I could not find PythonScrip > Run on the menu so I used “Run”
Thank You
From the command line, enter RunPythonScript
.
– Dale
Hi, is it possible to modify the script to save the 3dm file with exactly the same (Uppercase-Lowercase) name of the original file?
And also to open my standard template, instead of new blank file at the end?
Thanks to all
You can try this one:
BatchConvertSTEPTo3dmEx.py (1.9 KB)
You will need to edit the file in a text editor and replace the file name in the last line
BatchConvertSTEPTo3dm('"YourTemplateFileName.3dm"')
with the name of your standard template. Important: retain both the single and double quotes in that line.
You will also need to have the path to that template stored in Options>Files.
If you remove the entire text string from the last line
BatchConvertSTEPTo3dm()
it will open with no template as before.
Thanks a lot, Helvetosaur… very useful !!