Create Layouts and Configure Viewports

I need to create 300 layouts, each with a single viewport, and that viewport be located, rotated, and scaled to a particular point. The scale and rotation is associated with the point. The point and layout tab names are identical.

The OOTB and standard packages I have installed seem to just have GET functions for viewports, and searching doesn’t give any results that look feasible. Does anyone know of packages that would allow me to SET the location/extents/scale of a viewport? We have a lisp that does half the work, but I’d love to convert the process into Dynamo.

Hi @abbailey ,

I’ve worked with the Arkance Systems package in the past to do quite a bit of stuff with viewports, e.g. setting the VP visibility parameters of a specific viewport, perhaps there are some nodes in there to also set the rotation and extends of each of them, but I’m not sure.

What I am sure of though is that you can only interact with viewports when you actively have that layout open, otherwise those viewports are simply not loaded into your memory/ accessible by Dynamo or AutoCAD.

I’m vaguely remembering talking about automatically creating layouts / duplicating existing layouts in the past but I remember @jacob.small (if I remember correctly) advising against it, since having a lot of layouts in a single drawing is really heavy. I can’t seem to find that topic anymore, but maybe Jacob remembers it better than I do.

2 Likes

In the past the number of Layouts or Viewports was restricted, at least less than 300. It is worth testing this if it is still the case in the latest versions.

For logistics we will spread them out across about 15 files. We’ve experienced performance issues with going over 30

I do t recall saying to limit the number of viewports, but they are pretty heavy in terms of the impact on performance. But as O noted on Twitter the other day, if you have 1000 bad things in a file but you only open it to print, does anyone’s performance suffer? Of course this is assuming the print job finishes at some point, but if automation machines are slowed down they certainly don’t complain as loudly as users…

Thanks @Daan. I tried the Arkance package and tested a few nodes. At least from my initial testing, the nodes mostly dealt with Named Views, I couldn’t nail down scale, and after adding a few the file performance was killed.

Hello Jacob, I agree with you; we tested a DWG file with more than 60 layouts simultaneously in a large project, ‘Future Technologies for Digital Railway Operations in Germany,’ and approximately 1.200 layouts across 15 railway routes. I did not notice performance issues during plotting. The plotting process is designed to run overnight. In general can i say the more layouts in a model, the slower the processing.

1 Like