Skip to main content

Hi,

I have a lot of DXF Files in different folders. The DXF files have all the same layers.

I don´t need every layer of the files for my work. So I want to read every DXF file, filter the layers which I need, summarize them to different groups and store them in a new file.

How can I built such a workbench?

Thanks and best regards.

 

 

 

hi @joe_gerner,

For reading all of the files from different locations see the advanced reader parameters (this enables you to set a filter to read only .dxf files)

And the Merge Filter option in the feature type parameters to filter the data to read only the one layer you need from all the files

See the section about merging traffic in this blog post: https://www.safe.com/blog/2011/05/fmeevangelist80/

Hope this helps,

Itay


@joe_gerner

You can use a reader in dynamic form to read content of folder filtered on .dxf.

Filtering as you said.

Howto requires a sample dxf.


Thanks for your advise, but how can I store every dxf as a single file? I want to read all dxf files at once,filter the layers but store them all as seperat files

 


Thanks for your advise, but how can I store every dxf as a single file? I want to read all dxf files at once,filter the layers but store them all as seperat files

 

For that you can use the writer fanout, which will produce a file per value of the attribute used. Make sure the fme_basename attribute is exposed in the reader and use it in the writer fanout:


Thanks for your advise, but how can I store every dxf as a single file? I want to read all dxf files at once,filter the layers but store them all as seperat files

 

Hi, I tried your advise but I have a problem. With your settings FME creates only one file with the name "fme_basename.dxf". But I want a way to split the dxf files and get them their original name. If I use only "fme_basename" without ".dxf" as fanout expression I get the seperat files, but without a file ending. How can I change this?


Hi, I tried your advise but I have a problem. With your settings FME creates only one file with the name "fme_basename.dxf". But I want a way to split the dxf files and get them their original name. If I use only "fme_basename" without ".dxf" as fanout expression I get the seperat files, but without a file ending. How can I change this?

Hi @joe_gerner,

My mistake you should use the format attribute value like this:

This way you get the value of the fme_basename (your file name) and not fme_basename (literally)


Hi @joe_gerner,

My mistake you should use the format attribute value like this:

This way you get the value of the fme_basename (your file name) and not fme_basename (literally)

Thank you, for your help. Now it works


One last question to this topic. I want to group different layers and store them under a new group name. How can I manage this?

 


One last question to this topic. I want to group different layers and store them under a new group name. How can I manage this?

 

Hi @joe_gerner,

I would look into the autocad_group format attributes. Although I am not sure the DWG/DXF writer supports them....

Make sure all your layer have the same value for each group.


Hi @joe_gerner,

I would look into the autocad_group format attributes. Although I am not sure the DWG/DXF writer supports them....

Make sure all your layer have the same value for each group.

Do I have to select them in the reader or the writer? and how can I change the name of the different groups?

 


Do I have to select them in the reader or the writer? and how can I change the name of the different groups?

 

mmm, according to the documentation the autocad_group entity is only supported by the reader, but since they are available in the writer feature type, you can try to set the autocad_group attributes to your values e.i. use an AttributeManager or ArrtibuteCreator to give them values and don't forget to expose them in the writer feature type (see previous image)

 


Reply