Question

Unable to expose attributes from Autocad feature types in schema. Empty "attribute" list

  • 11 April 2018
  • 7 replies
  • 14 views

Badge

I'm trying to expose the metadata of the source feature types from an AutoCAD file.

I've tried two different ways (see attached screenshots):

1.- using a "schema (any format) reader".

2.- using a "creator + FeatureReader".

I've added a transformer to count the number of items in the "attribute" list, but in both cases returns 0. (see Inspector screenshots.)

The DWG file contains data, as it recognises 88 feature types, but I can only get these attributes: "fme_feature_type_name", "fme_format_short_name", "fme_format_long_name" and "fme_basename".

I'm unable to expose the content of the "attribute" list.

I've added the screenshots of the readers and transformers parameters.

Can you help me?

Thank you very much in advance!


7 replies

Badge +3

@damiacolom

Are fme_feature_type_name not layers in AutoCAD?

every object belongs to a layer, you are looking at layer names.

A layer name is not an attribute_name, it is an attribute_value.

There is no list as you call it, but you can make one.

If you want them in a list, you must use list builder (with no group b) or an aggregator also with no group by. Or group by fme_basename or fme_dataset (which is name of the AutoCAD file, dataset includes path)

If you got a lot of objects you get a big list. Use listduplicate remover if you just want the a list of the possible layernames.

Also the format_attributes will be in there, use a bulkattribute remover and tester to remove those

If you expose the attribute autocad_layer , you get the same values. You can expose those on the reader tab Format attributes.

Badge +3

@damiacolom

Are fme_feature_type_name not layers in AutoCAD?

every object belongs to a layer, you are looking at layer names.

A layer name is not an attribute_name, it is an attribute_value.

There is no list as you call it, but you can make one.

If you want them in a list, you must use list builder (with no group b) or an aggregator also with no group by. Or group by fme_basename or fme_dataset (which is name of the AutoCAD file, dataset includes path)

If you got a lot of objects you get a big list. Use listduplicate remover if you just want the a list of the possible layernames.

Also the format_attributes will be in there, use a bulkattribute remover and tester to remove those

If you expose the attribute autocad_layer , you get the same values. You can expose those on the reader tab Format attributes.

bulkattribute remove all autocad attribtes from list:

 

_list{.+}.autocad_.+

 

 

bulkattribute remove all fme attributes except the fme_feature_type from list:

 

use in BulkAttributeRemover:

 

_list{.+}.fme_(?!feature_type).+

 

Badge +3

list-of-acad-layers.fmw..

add your own acad file..

Badge

Hi Gio!

First of all, thank you very much for answering so quickly!!!

Second, I think I have expressed myself incorrectly! You are right, as you can see from the screenshot of the Inspector I already get the list of names of layers. That is fine. Now I'd like to also get, for each layer, the name and datatype of its attributes! (If I add a FeatureReader for each layer, and connect them to an Inspector, I will be able to review the data objects: the geometry and its attributes (AUTOCAD_BLOCK_NAME, AUTOCAD_ENTITY, AUTOCAD_ENTITY_HANDLE, AUTOCAD_LAYER, AUTOCAD_ROTATION...). I want to get the list of the names and datatypes of all those attributes, for each layer.

Damià

Badge

@damiacolom

Are fme_feature_type_name not layers in AutoCAD?

every object belongs to a layer, you are looking at layer names.

A layer name is not an attribute_name, it is an attribute_value.

There is no list as you call it, but you can make one.

If you want them in a list, you must use list builder (with no group b) or an aggregator also with no group by. Or group by fme_basename or fme_dataset (which is name of the AutoCAD file, dataset includes path)

If you got a lot of objects you get a big list. Use listduplicate remover if you just want the a list of the possible layernames.

Also the format_attributes will be in there, use a bulkattribute remover and tester to remove those

If you expose the attribute autocad_layer , you get the same values. You can expose those on the reader tab Format attributes.

@gio

 

Hi Gio!

 

First of all, thank you very much for answering so quickly!!!

 

Second, I think I have expressed myself incorrectly! You are right, as you can see from the screenshot of the Inspector I already get the list of names of layers. That is fine. Now I'd like to also get, for each layer, the name and datatype of its attributes! (If I add a FeatureReader for each layer, and connect them to an Inspector, I will be able to review the data objects: the geometry and its attributes (AUTOCAD_BLOCK_NAME, AUTOCAD_ENTITY, AUTOCAD_ENTITY_HANDLE, AUTOCAD_LAYER, AUTOCAD_ROTATION...). I want to get the list of the names and datatypes of all those attributes, for each layer.

 

Damià

 

 

Badge +3

Hi Gio!

First of all, thank you very much for answering so quickly!!!

Second, I think I have expressed myself incorrectly! You are right, as you can see from the screenshot of the Inspector I already get the list of names of layers. That is fine. Now I'd like to also get, for each layer, the name and datatype of its attributes! (If I add a FeatureReader for each layer, and connect them to an Inspector, I will be able to review the data objects: the geometry and its attributes (AUTOCAD_BLOCK_NAME, AUTOCAD_ENTITY, AUTOCAD_ENTITY_HANDLE, AUTOCAD_LAYER, AUTOCAD_ROTATION...). I want to get the list of the names and datatypes of all those attributes, for each layer.

Damià

list-of-acad-layers.fmw

 

@damiacolom

 

 

 

 

Hi,

 

 

The workbench I posted can be used for that.

 

Just use a the listbuilder grouped by basename and fme_featuere_type (or Autocad_layer)

 

Don't use the first BulkAttributeRemover.

 

That's it.

 

Here is the workbench adapted to your needs.

 

Just ad a ACAD file to the listbuilder input.

 

 

Badge +3

I don't know if the link for the workbench works...not at my side at least (probably firewall)

So here is a pic of it.

Zoom in..

Reply