+ Reply to Thread
Results 1 to 5 of 5

Thread: Setting Pen View for Details

  1. #1

    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

  2. #2
    Super Moderator Mitch's Avatar
    Join Date
    May 2010
    Location
    Switzerland
    Posts
    313
    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

  3. #3
    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,

  4. #4
    Super Moderator Mitch's Avatar
    Join Date
    May 2010
    Location
    Switzerland
    Posts
    313
    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

  5. #5
    Yes, I now works fine with the new quotes.
    Thanks

+ Reply to Thread

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