Skip to main content

Hi,

I'm simply trying to write a summary list of the layers used in all dwgs in a folder to excel. The workbench will do this to inspector but not xls but I can't figure out what's going wrong, any hints?

Hi @just_super, to clarify the situation, could you please post a few screenshots that illustrate the followings?

 

  • How FME Data Inspector is displaying the summary list of the layers.
  • How you have configured User Attributes in the Excel writer feature type.

You can try generating a workspace, this will automatically set all the attributes on the writer feature type.

After that you can remove any undesired output attributes.

To make sure a single feature per layer is written use a sampler transformer, set the group by to the layer and sampling on 1.

Hope this helps.


Hi,

Scenario 1:

If the excel file is not generated then probably either file is opened or rights problem or configuration error.

Scenario 2:

If the excel file is generated without the layer names in excel file then you should add the attribute header in user attributes in excel writer.


You can try generating a workspace, this will automatically set all the attributes on the writer feature type.

After that you can remove any undesired output attributes.

To make sure a single feature per layer is written use a sampler transformer, set the group by to the layer and sampling on 1.

Hope this helps.

Sound advice and kind of worked. The dwg is read and a xls written. However a sheet is being created for each feature type whereas I just wanted them listed. Just like in the log below!

 


layer names are in autocad_layer and in fme_feature_type.

If u add the dwg reader to the canvas, the fme_feature_type is automatically exposed. (autocad_layer needs manual exposing).

Use a sampler grouped by fme_feature_type sample rate = 1 and sampling type = first n features.

Add writer and add the attribute to the excel writer (or copy it from reader).

There should be no problem.

(it will not write to open excel of course, but I assume you know that)


Sound advice and kind of worked. The dwg is read and a xls written. However a sheet is being created for each feature type whereas I just wanted them listed. Just like in the log below!

 

easily solved by using a statistics calculator to do a count per layer and using the summery port.

 


layer names are in autocad_layer and in fme_feature_type.

If u add the dwg reader to the canvas, the fme_feature_type is automatically exposed. (autocad_layer needs manual exposing).

Use a sampler grouped by fme_feature_type sample rate = 1 and sampling type = first n features.

Add writer and add the attribute to the excel writer (or copy it from reader).

There should be no problem.

(it will not write to open excel of course, but I assume you know that)

Fantastic, thats working great.@gio

 


Reply