Setting Pen View for Details
I am attempting to create a print layout script for python. I am having trouble finding a way to set the active viewport to the new "Pen" view option. The following works for setting details to Rendered view:
layout = rs.CurrentView("11x17 Landscape")
However, I have not been able to get the same functionality to work with the Pen view and have resorted to double clicking the desired detail then selecting View=>Pen to achieve the desired result. Any assistance would be much appreciated.
I haven't tried this with layouts, but perhaps this will work:
Instead of rs.Command("_RenderedViewport"), use
rs.Command(_SetDisplayMode _Viewport=_Active _Mode=Pen)
Thanks for the quick reply. I tried rs.Command(_SetDisplayMode _Viewport=_Active _Mode=Pen). However I was not able to get it to function, I always got a syntax error. If you or anyone else has additional pointers on how to achieve this I would appreciate them.
That's my error, sorry, you need quotes to enclose the string:
rs.Command("_SetDisplayMode _Viewport=_Active _Mode=Pen")
that's where the syntax error is coming from, I think...
Yes, I now works fine with the new quotes.
Tags for this Thread