Print dialog/macro options - "wires crossed"

Putting this in a separate thread so it’s clear…

Last week for a friend/colleague I was working on creating a macro to try to semi-automate getting PDF’s out for laser cutting. Turns out not all of the options are addressable unfortunately. That thread is here for reference. They want to be able to always print so that the display colors are the ones the objects have in the PDFs, and of course be assured that the scale is always 1:1 etc..

In working on the macro I discovered that there are some wires crossed in the print color area. This may (or may not) correspond with some things that have been reported in various posts here.

PrintMacroTest.3dm (3.0 MB)

In the file above, there are four layers with objects on them.

By column:

Layer 01 - squares
Layer 02 - circles
Layer 03 - ellipses
Layer 04 - hexagons

Here are the display and print color settings for each - by row:

Bottom row: Display color - By layer | Print color - by layer print color
Second row up: Display color - By object | Print color - by layer print color
Third row up: Display color - By layer | Print color - by object
Top row: Display color - By object | Print color - by object

Layers 01 and 02 have their print color same as display color. Layers 03 and 04 have had their layer print color changed to something different.

Now, the macro I was trying to create:

! _-Print _Setup _Destination _Printer "Rhino PDF"
_OutputColor _DisplayColor _OutputType=_Vector
_PageSize 420 297 _Enter
_View _Scale 1 _ViewportArea _Extents _Viewport "Top" _Enter 
_Visibility _OnlySelectedObjects=_No _Enter
_Enter _Preview

If you run the macro on the file you will see this:

Despite the fact that the print options are correctly set by the macro on the command line (you can check with F2 after), the objects end up in the PDF with print color, not display color.

If you change DisplayColor to ``PrintColor` in the macro::

! _-Print _Setup _Destination _Printer "Rhino PDF"
_OutputColor _PrintColor _OutputType=_Vector
_PageSize 420 297 _Enter
_View _Scale 1 _ViewportArea _Extents _Viewport "Top" _Enter 
_Visibility _OnlySelectedObjects=_No _Enter
_Enter _Preview

Then you get this:

The objects now correctly print with their display colors.

This may not be the only area with “crossed wires”… Just what I found. There are also a number of options present in the dialog that are missing from the command line options and thus cannot be ‘macroed’. No scripting hooks either as far as I have found. More work needs to be done to reliably automate printing.

1 Like

thanks @Helvetosaur for reporting, I can repeat this here in latest 8.x

RH-90192 Printing macro options are wired up incorrectly

@Helvetosaur I believe this is working now. The bug hasn’t switch to being announced as fixed because the macro is still not working on Mac

OK, thanks Steve! Actually the client for whom I made the macro above called last week and said it had stopped working correctly, I told him it might have been fixed and to try switching the macro back to how it was originally supposed to be. I haven’t heard back from him, will call today.