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:
How can I import/export those layers attribute to/from Rhino ?
PS: I have already searched internet without success.
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.
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:
- Is there is an automated way to import layers’ descriptions from excel/text file in AutoCAD?
- 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.
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.
Thank you very much, my problem was only n the portion of the layer attributes specifics between AutoCAD & Rhino.