How to delete AutoCAD layer in Dynamo for Civil 3D

Hi, is it possible by nodes? I tried object.delete node and it was not possible.

1 Like

Seems to work fine to send a command to command prompt using "Document.SendCommand and delete a fixed layer name

And if you want a layer name as a variable you might do like this

5 Likes

Nice to be able to play a little bit with Dynamo during coffee break :smiley:

2 Likes

Hi @patrick.ericson, @Drbohlav
It works great for one layer but when I try to read more layers from excel file it doesn`t delete layers. Any thoughts about this ?

Hi @kubastan89
Remember that this is the same as running a command on command line so if you can’t select the layer on the command line you can’t use this function.
I believe that you need to loop the layers, using LISP or python

Regards,
Patrick