Skip to main content
Solved

Read ALL layer names from DWG files

  • January 17, 2023
  • 2 replies
  • 383 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.)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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
Celebrity
Forum|alt.badge.img+52
  • Celebrity
  • 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.)

Nice resolution.