Export 20-30 Rhino files to Version 4

Just to say, i am usually on a Mac, but can do Windows if that works.

I am wondering if I can have a script to copy a folder of Rhino 5 files as version 4 files.

I have about 30 to do, and may have more every week or 2. Until I can convince the person to upgrade.

Thanks, Randy

Hi Randy.

Try this:
exportToRhino4.py (2.1 KB)

I have no idea whether or not it works on Mac, though. Sorry for that.

Once the copy folder has been created with Rhino4 .3dm files, you can overwrite it later.

OK, too late, dinner came first… :fork_and_knife: :poultry_leg: :ice_cream:

Here’s my version. Not tested on Mac either… :see_no_evil: :hear_no_evil: :speak_no_evil:

–Mitch

Edit: @rhinorudi, @djordje Nope - not working on Mac… The whole method of working in Windows is different, calling New on Mac opens a new window… Unfortunately djordje’s script does not work on my Mac either - it actually crashes Rhino…

Actually… I’m not even sure the Mac has the capability to save files in V4 format… Can’t find a way to do that with normal commands on the Mac…

BatchSaveAsV4.py (1.5 KB)

Thanks djordje, will check after my supper / dinner.

Cheers, Randy

Well off for supper (dinner here is at noon, like en Français québécois )

Will be neat to see 2 scripts that do something similar.

Cheers!

Well Mitch, do you mean with python or just ‘export’ as version 4 from a Rhino 5 file. Mac can do that, I did 20 today.

I can do it from Windows if need be, I actually just got a new i7 16Gb Windows machine because my old Vista laptop, well died. It is more just having a V4 version and if I don’t have to open them all and then save as / export each one, cool!

Thanks @djordje and @Helvetosaur

trying on OSX shortly, supper is done now!

OK, again difference Mac/PC… I use SaveAs, for which I can’t find a V4 format option on Mac. So Export (not Export Selected) on Mac also exports hidden and locked objects (i.e. the whole file)?

–Mitch

Hi Mitch,
JSYK, your script works great on Windows 8.1. But I haven’t installed Rhino4 yet to check the file.

Thanks, Randy

Yeah, it runs fine on Windows. But I have little hope of getting something like this to run on Mac. The whole Mac system of multi-windows just makes it a mess.

In Windows Rhino it’s easy - everything happens in one window, just open the file, export it , open a new file (which closes the previous one) export it, etc.

On Mac, Open opens a new Window. OK, maybe we could deal with that, but the “Close” command from the menu isn’t a real Rhino command, it must be MacOS specific, and thus can’t be scripted with rs.Command. So it would leave one window open for every file exported. Then, the Export item from the menu is also not a Rhino specific command, it’s MacOS, the only scriptable Export Rhino knows is Export selected. And that won’t get hidden or locked objects/layers. Scripting SaveAs is also not an option because there’s no save as V4 setting on Mac…

So I guess I’m going to give up on this one…

–Mitch

Like everything, there are pros & cons. Every time i open a file from Explorer I hover my mouse over the files and scroll with the mouse wheel expecting the files to move, but they don’t until I actually click in that ‘pane’. I am so used to the mouse changing focus to the window that is underneath, and I grew up on BASIC & DOS.

The irony is that I have really only been a full-time OSX user with Rhino. How many years as a graphic designer on Windows with everyone else on MAC. I started using Rhino in early 2008 and discovered RhinoOSX in July 2008, while visiting my Mom, a Mac user, and using Rhino on her computer. Such is life.

I wonder if Marlin & team are going to be implementing AppleScript. Part of my workflow (new task at work) is to prep all Rhino files and send infer to company for mould & sample work. So I use Applescript to make a text file of all the Rhino file names which I then import into an Excel file. I also use it to create folders & subfolders based on Company name & batch number. Most Adobe & Microsoft Office programs can be controlled with Apple script. That would help with OSX specific tasks, maybe.

The whole export // save as difference between OSX & Windows is another can of worms. Not to mention Rhino preferences. I must admit the fact that I can move & rename open files on OSX is kind of great. Usually each rhino file has at least 3 versions, work copy, a clean copy (as in small for emailing) and a render copy (objects moved to simulate a finished design), and all in different folders as well.

time for breakfast,
Randy