Freeze layer by name - dynamo Civil 3D

I am looking to hide/uncheck layers in a CAD file within a viewport in paperspace.
Bimorph has a function CAD.SetLayerVisibility for Revit, I am looking for something similar to be used in the Civil3D dynamo environment.

Can’t you just do this inside in civil3d/Autocad, it’s faster. Is there any reason you want to use Dynamo?

We set up our drawings with multiple paper space tabs, with multiple viewports, also on some tabs only some layers needs to be frozen (for example even and odd drawings will have different layers frozen and thawed) so it becomes quite tedious to do it manually.
I have previous done it using script-pro, but was hoping I can now transition to dynamo.

Have you tried LAYERSTATE command in civil?

In that case i think python script is needed.

Thanks - that is very helpful, it will definitely speed up to process. (although still a bit manual)

Okey, so there is no package that currently includes a function as the one I am describing, will have to create one from scratch - thanks

There are extra Layer nodes released in Civil 3D 2020 Update 2 Beta, you might want to check this out in the new Autodesk Infrastructure Futures feedback portal here:{704ff272-a96c-412e-8d9f-3f562c13f2cf}&artid={A04E970F-B9BC-4405-84E1-DC36221D99A0}

Has anyone figured out how to stear the layer state in C3D with Dynamo? (On, Off?)

@FC_GN8 @karien.vanheerden here you go. The example shows changing the visibility for all the layers in the document, but you can feed in any list of layer names.

Note that the freeze/thaw node has one less output than the on/off node. This is because the current layer cannot be frozen, but it can be turned off.

SetLayerVisibility.dyn (16.5 KB)