Make my layer color my print color

Hey guys,

Very new to scripting and trying to ease my export workflow.
I have a large layer setup similar to that of a CTB autocad file, however when I want to export to illustrator files (.ai) for hatch export reasons my print color doesnt come across.

I was hoping someone would be able to help me out with some clues as to writing a rhinoscript that would batch together the processes of changing my layer colors to their associated print colors and then run the export dialogue and upon completion returning the layer color back to its original color.

is this even possible?

BIG thanks in advance.

Hi Jesse,

What you are asking do to can be scripted.

Rhino has two scripting tools: RhinoScript and Rhino.Python, and both of these tools can be used to do what you want.

Because I already had most of this written in RhinoScript, I whipped up a quick and dirty sample for you. To use, just drag & drop the attached script on top of a running Rhino and then run “SaveAsGrayScale”.

Hopefully this will give you a good starting point for you own version. :wink:

– Dale

SaveAsGrayScale.rvb (2.7 KB)

1 Like

I ended up adjusting another script I found however I’m now struggling to undo the process… I believe it is perhaps because you cant undo a python script until after the entire script has been run?? :confused:
(Controlling Undo from Python)

When I add an undo command to the script the command line simply says “nothing to undo”

Print Color.py (305 Bytes)