Skip to main content
Question

AutoCAD Layer to Excel


Forum|alt.badge.img+3

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?

7 replies

takashi
Influencer
  • April 6, 2017
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.

itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • April 6, 2017

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.


pratap
Contributor
Forum|alt.badge.img+11
  • Contributor
  • April 6, 2017

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.


Forum|alt.badge.img+3
  • Author
  • April 6, 2017
itay wrote:

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!

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • April 6, 2017

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)


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • April 6, 2017
just_super wrote:
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.

 


Forum|alt.badge.img+3
  • Author
  • April 7, 2017
gio wrote:

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

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings