I am built a dynamo script that will automatically create layouts and viewports based on a user-defined key plan, but right now the default Layout1 is staying in the file and throwing off the placement of the viewports by 1 sheet. So sheet 1’s viewport gets placed on Layout1, Sheet 2’s viewport gets placed on Sheet 1, and so on. How can I delete the layout 1 before the viewport placement to avoid this issue?
Hi @jbrunkhorst,
Presumably you are getting the list of layouts using the Layout.GetLayouts
node. Maybe you can simply remove Layout1 from the list before you proceed to create the viewports? In other words, just “massage” the list of layouts (add/remove items, change the order, sort, etc.) so it’s in the form you need before creating the viewports.
Ha, that is exactly what I ended up doing. I have it rename the Layout1 layout as Z_Layout1 so it gets pushed to back of the list when I used the Layout reorder node. Works great now!
1 Like