Get Cross Section Station Range per Layout

Hello,

I’ve been working on the attached graph for a while now and finally decided to ask for help please.

I am using @Paolo_Emilio_Serra1 Civil3DToolkit package to get the Section views Station Range per Layout. The end goal is to rename the layouts with STA Start to STA End
I have so far figured out the Viewport boundary in Modelspace and intersected it with the section views. so I got a list which determines which station sections is in which Viewport. But I can not figure out how to map it back to determine which viewport is in which layout! especially because the dwg file may have plan layouts, blank layouts or layouts with multiple viewports, so the list of my viewports is not equal to the list of layouts.

attached is my test drawing and the working graph; I know it may take a little while to read my graph but any help is greatly appreciated, thanks

SectionLayoutName.dyn (70.8 KB) SectionLayoutNameTesting.dwg (1.2 MB)

Hi @marshmallow,

I was able to get it to work in your example with some additional nodes for filtering as well as using @@ levels on some of the nodes to maintain the list structure throughout the graph. It’s probably easier for you to have a look instead of outlining all of the changes in this post. Some testing in other situations is probably a good idea as well to see if the graph is bulletproof.

SectionLayoutName.dyn (86.7 KB)

@Paolo_Emilio_Serra1 this graph was more complex than necessary because the Layout.GetViewports node returns extra viewports depending on which layout is currently active.

3 Likes

@mzjensen thanks you pointed this out to me already

I think it’s genius how you counted the Sections, then summed the Viewports to filter the Layouts. Thank you so much @mzjensen. It was driving my brain in tiny circles for a couple of days!!!

You’re right, sorry…it was late :roll_eyes: