Skip to main content

As you can see below, I have a simple DWG to Shapefile workbench going. But every time I need to add a new CAD layer to be read, I need to add a new reader, so I end up with multiple readers reading the same DWG as seen below:

 

How do I make it so I can simply add a new CAD layer to be read from the same DWG without having to stack up multiple reduntant readers like this each containing a couple of layers from the same drawing?

 

Is there a setting that will allow me to alter it like I can with writers for example, as seen below?

Have you tried the menu Readers / Import feature types?

It will let you add feature types (layers, in CAD) to an existing reader.


Have you tried the menu Readers / Import feature types?

It will let you add feature types (layers, in CAD) to an existing reader.

I have but I can't figure out how to make them appear in the workbench so I can connect them to transformers and by extension, writers


I have but I can't figure out how to make them appear in the workbench so I can connect them to transformers and by extension, writers

Maybe have a look in the documentation, in particular the most common scenarios at the end here: http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!FeatureTypeProperties/Tips_Adding_Managing_Writer_Feature_Types.htm


Hi @cartographer721, perhaps you want to add the reader with Single Merged Feature Type mode.

You can then select one or more feature type (layer) to read with the Feature Types to Read parameter in the writer.


@cartographer721

 

Would a feature reader not suffice?

You can make a string with the layernames you require. Make sure it is space seperated.

(normaly you choosetheones you want. If you choose multiple layers it results in a space seperated string.

So, all you need to do is extend or alter your string (no pun intended obviously. Hold your Calvins...)

When schema is same there is no problem. When schema differs, you got to wrestle it out of the feautre reader. (i refer to possible extended data cad's)

There are coupole of examples on the forum)

 

This is usefull for custom transformers anyway as you can't use readers in those, i use this technique a lot.

 

 


I think David's is the "official" solution here. You have a feature type (layer) missing, and so you add it by importing the definition from the dataset. I like to think of it as a Toll Booth on a road. You have lanes for Cars and Trucks, but now need one for buses. You simply add a new lane/booth labelled Buses. Simple.

I made a quick video demo here: https://www.screencast.com/t/GTE6WF6Le

Takashi's solution works also. You have a feature type missing but you unlock an existing feature type to let the missing one pass. This too is like a Toll Booth, but instead of adding a new lane, you rename one of the existing lanes Trucks/Buses to give buses a way to pass. If you renamed it "All" (like in FME) then any vehicle would be able to pass, but the disadvantage is that they are all in the same lane and may need separating out again.

Gio's FeatureReader transformer is essentially the same as the above, but you just change the Feature Types to Read parameter instead of using Import. As they say, it gives you an advantage of being able to use it inside a custom transformer.

The Import tool should add the feature types to the workspace automatically. If you aren't seeing that, then do let us know. The Navigator window will show you which types exist (or don't) for each reader.


Reply