If I have a drawing with model space and two layouts each with one viewport, why do i get this result
I was expecting two viewports.
I did some testings and it works fine for me when I have two layouts with one viewport in each layout and when I delete the viewport in one of them I get the same result as you.
I found out that I had to close the script and close dynamo to update the graph correct if I did any changes and added some viewports to the second layout as shown in the screenshot below
I tried closing the script and reopening as you suggested. similar results. here is what i am really trying to-do. the Drawing has 16 layouts as shown c2000 has one viewport c20012-c2016 have a plan and profile viewports. I an the last is modelspace. Iwas expecting the getviewport node output to be layout index and 0 Viewport
1 Viewport
for each Layout
this is what is returned
get viewports.dyn (7.8 KB)
Hmm, are you able to send the drawing definition file without xrefs?
Isn’t that result correct?
Each layout has two viewports
0 List
returns 3 has 2
1 List
returns 3 has 2
2 list
Returns 2 which is correct the last one is modelspace an looks correct
Another odd thing
i copied to more layouts in the drawing, they are recognized as layouts , return empty list even after closing the script and dynamo. btw the no data binding retained is enabled.