Skip to main content
Solved

Delete Readers without any features

  • June 27, 2022
  • 5 replies
  • 66 views

matthewlaw
Contributor
Forum|alt.badge.img

I have a DWG file I'd like to read into FME to extract certain information from. When I add the file in a Reader and choose to read Individual Feature Types, I get >100 different Feature Types, but almost all of these are empty (ie have no features in them when I run everything). Is there a way to easily select and delete these empty Readers, or alternatively to tell FME to only add those which have features in them in the first place?

 

I have tried using the PURGE command in AutoCAD to clear any layers with no features in prior to reading the file in FME, but this doesn't seem to have done anything - I have very little CAD experience so it could definitely be that I've done this incorrectly.

Best answer by nielsgerrits

Thanks! This definitely makes the process easier, but I still can't work out a way to automatically discard all the layers without features in (or alternatively to select those with features) – at the moment I still have to go through all the layers manually and pick the ones I want. Is there any way to do what I'm looking to do within FME?

Personally, I almost always use the Generic outputport. (Output Ports --> Single Output Port)

Then use the Data Inspector instead of the Visual Preview on a second monitor to see what data comes out of it. (In options, tab Workbench, is a checkbox "Inspect with Data Inspector when Visual Preview is closed". This is how I and all my coworkers are running FME.)

Then look for attributes I need in the Feature Information window in the Data Inspector. Add an AttributeExposer downstream the FeatureReader's Generic outputport and expose what I need.

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.

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2937 replies
  • June 27, 2022

Use a FeatureReader instead, then you can easily select the layers you need in the "Feature Types to Read" field. You can Initiate a FeatureReader using a Creator transformer.


matthewlaw
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 3 replies
  • June 27, 2022

Thanks! This definitely makes the process easier, but I still can't work out a way to automatically discard all the layers without features in (or alternatively to select those with features) – at the moment I still have to go through all the layers manually and pick the ones I want. Is there any way to do what I'm looking to do within FME?


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2937 replies
  • Best Answer
  • June 27, 2022

Thanks! This definitely makes the process easier, but I still can't work out a way to automatically discard all the layers without features in (or alternatively to select those with features) – at the moment I still have to go through all the layers manually and pick the ones I want. Is there any way to do what I'm looking to do within FME?

Personally, I almost always use the Generic outputport. (Output Ports --> Single Output Port)

Then use the Data Inspector instead of the Visual Preview on a second monitor to see what data comes out of it. (In options, tab Workbench, is a checkbox "Inspect with Data Inspector when Visual Preview is closed". This is how I and all my coworkers are running FME.)

Then look for attributes I need in the Feature Information window in the Data Inspector. Add an AttributeExposer downstream the FeatureReader's Generic outputport and expose what I need.


matthewlaw
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 3 replies
  • June 30, 2022

Personally, I almost always use the Generic outputport. (Output Ports --> Single Output Port)

Then use the Data Inspector instead of the Visual Preview on a second monitor to see what data comes out of it. (In options, tab Workbench, is a checkbox "Inspect with Data Inspector when Visual Preview is closed". This is how I and all my coworkers are running FME.)

Then look for attributes I need in the Feature Information window in the Data Inspector. Add an AttributeExposer downstream the FeatureReader's Generic outputport and expose what I need.

Thanks - this is what I needed in the end!


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2937 replies
  • June 30, 2022

Personally, I almost always use the Generic outputport. (Output Ports --> Single Output Port)

Then use the Data Inspector instead of the Visual Preview on a second monitor to see what data comes out of it. (In options, tab Workbench, is a checkbox "Inspect with Data Inspector when Visual Preview is closed". This is how I and all my coworkers are running FME.)

Then look for attributes I need in the Feature Information window in the Data Inspector. Add an AttributeExposer downstream the FeatureReader's Generic outputport and expose what I need.

Cheers. Thanks for the feedback :)