Copy to all layouts
To quickly copy one object to all layouts
This script allows the user to select an object on a layout in Rhino and copy it to all layouts in the same document.
- This script allows the user to select an object on a layout in Rhino and copy it to all layouts in the same document.
- 1.Open Rhino and use the
RunPythonScript
command to load the script - 2.When prompted, select the object you want to copy.
- 3.The script will copy the object to the clipboard and then paste it to all layouts in the same document.
- 1.The script prompts the user to select an object on a layout.
- 2.The selected object is copied to the clipboard.
- 3.The script loops through all layouts in the same document and pastes the object on the clipboard to each layout.
- Rhino
- rhinoscriptsyntax library (included in Rhino)
- The script can only copy one object at a time.
- The script doesn't check if the object is already on the layout before pasting it.
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object on layout to copy to all")
rs.SelectObject(obj)
rs.Command('_CopyToClipboard')
rs.EnableRedraw(False)
for view_name in rs.ViewNames(return_names = True, view_type=1):
rs.CurrentView(view_name)
rs.Command('_Paste')
rs.EnableRedraw(True)
Last modified 8mo ago