Skip to main content
Solved

Read ALL layer names from DWG files

  • January 17, 2023
  • 2 replies
  • 294 views

Is it possible to read all layer names from a DWG source file? By all I also mean the layers which do not have any features on them.

 

For example, if I have a DWG file with the following layers and numbers of features on them:

  • L_01 (with 10 features)
  • L_02 (without any feature)
  • L_03 (with 1 feature)
  • L_04 (without any feature)

I want to somehow get access to all the layer names, i.e. L_01, L_02, L_03, and L_04 in FME, even though L_02 and L_04 do not have any features.

 

Alternatively, is there a way to convert a DWG file to a DXF file such that all layers are preserved (i.e. , again, also those that do not have any features on them)?

Best answer by lbd-kufers

Nevermind, I just found it myself:

When using the AutoCAD FeatureReader, at 'Schema/Data Features', you can specify whether only Data Features, only Schema Features, or both are to be read. In my case, I only need the 'Schema Features'.read_layers(I did not see this option when using the AutoCAD Reader, or I overlooked it.)

View original
Did this help you find an answer to your question?

2 replies

  • Author
  • Best Answer
  • January 17, 2023

Nevermind, I just found it myself:

When using the AutoCAD FeatureReader, at 'Schema/Data Features', you can specify whether only Data Features, only Schema Features, or both are to be read. In my case, I only need the 'Schema Features'.read_layers(I did not see this option when using the AutoCAD Reader, or I overlooked it.)


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • January 17, 2023
lbd-kufers wrote:

Nevermind, I just found it myself:

When using the AutoCAD FeatureReader, at 'Schema/Data Features', you can specify whether only Data Features, only Schema Features, or both are to be read. In my case, I only need the 'Schema Features'.read_layers(I did not see this option when using the AutoCAD Reader, or I overlooked it.)

Nice resolution.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings