-
Setting Pen View for Details
Hello Everyone,
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")
if rs.IsLayout(layout):
rs.CurrentDetail(layout,"Top")
rs.Command("_RenderedViewport")
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.
Thanks,
5chmidt
-
Super Moderator
Hello,
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)
--Mitch
-
Hi Mitch,
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.
Thanks,
-
Super Moderator
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...
--Mitch
-
Yes, I now works fine with the new quotes.
Thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules