How to Import/Export AutoCAD's layer attribute "Description"?

Hi everyone,

As we all know that AutoCAD have a layer attribute called “Description” which was made to give hints to the next user (see next photo)

So my questions are:

  1. How can I import/export those layers attribute to/from Rhino ?
    PS: I have already searched internet without success.

  2. How can I consult those attributes in Grasshopper?
    PS: I know some Python and still a noob in C#

Thank you in Advance

If you could add it into the layer name via a script on Autocad you would be able to pull the layer name and split the text in Grasshopper.

Another option would be to export an excel of the layer name and description from autocad, importing to Grasshopper then matching up with the imported layers.

1 Like

image

1 Like

Thanks a lot, this solution have the advantage that the description will always have a reference file to consult or to modify in the future, and in my opinion it’s hassle free.

This leaves me with two questions, just in general:

  1. Is there is an automated way to import layers’ descriptions from excel/text file in AutoCAD?
  2. Let’s say that I have used one of those components to add the Description attribute to a Rhino Layer, will it be maintained in case that I have exported it to a dwg/dxf file ?

Thank you in advance

Select All Layers in Autocad, Copy and Paste into Excel.

Remove all but the description and layer name. Add Appropriate Headers.

Read Excel in Grasshopper (keys and values)

Modify as needed, Applying to Geometry if you want. Unfortunately its not going to go back out to Autocad with the modified description.

Fortunately you can save the data out to a excel file that could be brought into the Autocad file as layers via standards – i think.

1 Like

http://cadtips.cadalyst.com/layer-properties/export-layer-properties-a-spreadsheet

1 Like

Thank you

No Problem.

The grasshopper portion wouldn’t take me very long if you posted example files (excel and rhino file).

If thats the way you end up going.

1 Like

Thank you very much, my problem was only n the portion of the layer attributes specifics between AutoCAD & Rhino.