You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
In the official DXF documentation there is no code for the layer description, but after checking if that value was really stored in the DXF, I found that it really does but in the extended data information. Another example of Autodesk at its best, they had to choose the worst way of saving a simple string. Why not do the same as the line type or the block which descriptions are saved under a code 3 and 4 respectively?
At the moment if you need the description you will have to read it manually from the XData.
DxfDocumentdoc=DxfDocument.Load("Drawing1.dxf");Layerlayer=doc.Layers["Layer1"];// Get the extended data information,// how and where the layer description is stored is undocumented, proceed with care// the layer description is saved as extended data information associated to an ApplicationRegistry called "AcAecLayerStandard"stringlayerDescription;XDataxData=layer.XData["AcAecLayerStandard"];foreach(XDataRecorddatainxData.XDataRecord){// looks like it just stores two string values under a code 1000// the first one seems to be always empty, I do not know if it is there just to waste space// or it is actually used for something else from who knows whereif(data.Code==XDataCode.String){layerDescription=data.Valueasstring;}}
If you need more detailed information about the extended data go to the AutoCad manual, you can start here.
Hi. How can i get "description" property for a layer?!
![layer desc](https://user-images.githubusercontent.com/46372857/141259914-986b058d-6808-4a8d-9410-ea09c99d02c0.png)
netDxf.Tables.Layer class doesn't contain the "Description"..
The "Description" field is very useful because special characters ( <>/?":;*|,=` ) are allowed in it.
The text was updated successfully, but these errors were encountered: