Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5750

Copy Paste to all Layouts with Python

$
0
0

@egdivad wrote:

Hi all,

Is there a way to copy pasted an object (or a selection of objects) to all layouts? If I copy/paste a block to all layouts then I only need to edit the block once then all instances of the block on all layouts will be updated.

I got as far as this with Python, I’d like to know how to activate each layout iteratively, I don’t think my code for activate layout is working:

import rhinoscriptsyntax as rs
import Rhino
import scriptcontext as sc

pageViews = sc.doc.Views.GetPageViews()

for pageView in pageViews:
    Rhino.Display.RhinoPageView.SetPageAsActive(pageView)
    
    rs.Command('_Paste')

Any pointer would be greatly appreciated
Thank you in advance

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5750

Trending Articles