Find out current layout from Civil3D

Hi all,

I am trying to find out which Civil3D layout is currently active. I’ve looked into the Civil3DToolkit, Camber and Arkance Systems packages but I couldn’t find any node for this. Also I couldn’t find anything online, on and off the forum which talks about this.

Is there any way at all to even get this information?

I can try to code this when I have a moment. For now here is an example:

Always :wink:
I can add this to Camber in the next release.

import clr

from Autodesk.AutoCAD.DatabaseServices import *

OUT = LayoutManager.Current.CurrentLayout

layout

2 Likes

Works GREAT! Thanks a lot! :smiley:

Good idea! Especially since some things don’t always work in Civil3D when trying to access information on layouts which aren’t open/ loaded.

And it saves me from having to add a selection option for the end user :smiley:

2 Likes

Funny that such simple thing is not available yet.

With the Arkance Systems Node Library you could do this:

image

But that only works if you know the variable name (now you know this one :wink: )

3 Likes

Didn’t even think about System Variables! Let alone that the current active view would be one.
Will sure look into all the System Variables to see if there are some interesting ones :smiley:

Also, it kinda is avalaible right? Not just in a conventional way using nodes created by others.

1 Like

So many system variables are available. The possibilities…

2 Likes

I feel like my brain unlocked a new part by seeing how this System Variable is stored:

1 Like

Variables are always available, but in Dynamo you need a node for that (like the one in de Arkance Systems Node Library) or Python.

In AutoCAD you can walk through them with the command SYSVDLG.

1 Like

There’s a node for this in Camber starting in v4.0.0.

active layout

2 Likes