Batch converter, file formats

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

1 Like

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.

1 Like

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!

image

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)

2 Likes

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”


Does PythonScript has been moved or deleted from menu??

Thank You

From the command line, enter RunPythonScript.

– Dale

1 Like