Skip to main content
I often need to convert large numbers of layers from TAB to DWG CAD format. Is there a way of doing this on bulk or looping a workflow to repete an action over a list of inputs.

 

 

If i need to convert TAB to SHP all i need to do is put them into the 'generate workspace' and it makes a workspace with the correct number of reader and writer feature types and copies across the attributes. HOWEVER, I cant do this with TAB to DWG files as it asks for the destination folder AND file name then merges all the input layers together into one file. I have therefore had to translate each file separately (and when you have about 60 files this takes ages)

 

 

Now I want to go one step further and add a clip function. I have 32 TAB files which i need to clip by a boundary and then write each file to DWG. Currently the only way i can see of doing this is making a workspace with 32 reader feature types, 32 clippers and 32 writer feature types (remembering each time to say copy attributes from reader and renameing)

 

Alternatively I could do just one flow and run it many times changing the reader and writer each time (which would be only margionally quicker than clipping and saving a copy in mapinfo one at a time)

 

 

Is there not a quicker way of doing this?

 

 

(I have been searching through the help and online but could not find an answer - i thought of using the fanout but you cant seem to fanout my input file name)
Hi,

 

 

Each input will have a fme format (fme_basename or fme_feature_type) that can be used in the group by setting in the clipper and as fanout in the writer.

 

 

This way you need only 1 reader, 1 clipper and 1 writer.

 

 

Itay
I tried what you suggesteed with some test data but came across some problems

 

 

I used one reader which generated 3 feature types.

 

I connected these to a clipper along with the reader to clip by.

 

When in the clipper perameters I chose Group By: fme_feature_type this stops the clipper working and everything goes to the 'outside' port.

 

 

Also when i connect a writer there is only the features attributes to chose to fan out by. There is not fme_feature_type. I went into the settings and expsed fme_feature_type and then I could group by it.

 

 

I then changed the clipper to not to group by to see what happened. This now worked but instead of 3 CAD files, I have 1 CAD file with 3 types in (representing the 3 input files). This is not what i wanted however as i cant give a contractor one cad file with lots of different layers inside it. I assume that everything got merged during the split and then fanned out in the writer?
You can use the writers feature fan out for creating layers and the writer dataset fan out for creating files per layer.
some more information about fanout and dataset fanout can be foud at:

 

http://docs.safe.com/fme/html/FME_Workbench/Default.htm#About_Fanout.htm
I think its working now thank you.

 

 

The problem was that althrough i read through the help on fanouts I knew there was a fanout in the feature and also a fanout in the left bar but i assumed they were just the same as i had tried them both and they didnt work. When I turned off the 'group by' in the clipper and it started working i must have been using the feature fanout which is why it continued not working. I have switched to the fan out in the left bar now (which i assume must be the dataset fanout) and i have generated 3 cad layers hooray thanks.

 

 

(I still have 32 reader features to conenct to the clipper but at least its working now hopefully)
Hi,

 

 

Glad to hear its working, try the advanced brouwser for the multiple inputs.

 

 

Itay

 


Reply