Toolkit........Layer Extension

Hi, This might be very basic level of request.

I am trying to use Civil3D toolkit nodes from Layer Extension tabs, Instead of using Dynamo created layers i have object selected layers as strings, i am not finding a way to convert this layer name strings in to Autodesk.AutoCAD.DynamoNodes.Layer so that i can use the bellow nodes. Can anyone help me with this ?

Thanks

You can create the Dynamo wrapper for a layer by plugging those strings into a Document.LayerByName node.

Thanks it worked…apologies but hope creating a new layers in CAD using Document.LayerByName will not change layer properties already assigned to them previously before running the script.

Creating the layer objects in Dynamo won’t change anything to the AutoCAD layer unless you use nodes to change layer properties. Is that what you mean?

1 Like

Ok my bad …i though LayerByName will create a new layer by name in autocad, instead of that it will select a layer by name in Dynamo interface if i am not wrong.

Correct. To create a layer, use Layer.Create, or LayerExtensions.ByNameColor from the Toolkit.

1 Like