Skip to main content

Hi,

How can i store color symbology from CAD Layers in an attribute and apply it to layers in File GDB after translation?

Thanks in advance.

You need to expose all format attributes on the DWG reader that you wish to use, e.g. autocad_color, autocad_lineweight, etc.). You can do this in the Properties dialog of an input feature type. These will then also be written to your Geodatabase.

Not however that the Geodatabase (or any Esri GIS format for that matter) doesn't store symbology in the dataset. It only stores attributes and the software (e.g. ArcMap) can render the symbology based on these attributes (which can then be stored as a *.lyr Layer file). ArcMap has a CAD Style renderer for instance, that is set automatically when you add a DWG to your MXD.


When you expose the attribute autocad_color, you will see that this field will contain numbers like 1, 24, 156, etc. That's because AutoCAD has its own color codes (Reference to the Autocad Color Index). They are pretty much useless if you would like to work with these attributes in other GIS software (unless you hard code the transformation from ACI to RGB).

 

 

Therefore, expose the attribute fme_color. This will give you an RGB, value. You could store this attribute to your output for example as '255,0,0'. Other GIS software might read this attribute and set the color of that feature to a red color.

When you expose the attribute autocad_color, you will see that this field will contain numbers like 1, 24, 156, etc. That's because AutoCAD has its own color codes (Reference to the Autocad Color Index). They are pretty much useless if you would like to work with these attributes in other GIS software (unless you hard code the transformation from ACI to RGB).

 

 

Therefore, expose the attribute fme_color. This will give you an RGB, value. You could store this attribute to your output for example as '255,0,0'. Other GIS software might read this attribute and set the color of that feature to a red color.
Yes, you are quite right, same issue i was facing while exposing autocad_color but if i am trying to expose Fme_Color attribute then i am not getting the same in File Geodatabase.

 

Please help with the steps other than exposing format attributes from reader.

 

 


Yes, you are quite right, same issue i was facing while exposing autocad_color but if i am trying to expose Fme_Color attribute then i am not getting the same in File Geodatabase.

 

Please help with the steps other than exposing format attributes from reader.

 

 

I am assuming you exposed the attribute 'fme_color' and used this attribute to write to file geodatabase?

 

 

The internal fme attributes (fme_...) should not really be used as attributes you want to write to other files. These are mainly used for internal processes. Try to rename or copy the attribute (AttributeRenamer or AttributeCopier) and give it a completely different name that not starts with 'fme_'. I my case, that seemed to work.

 

 


Yes, you are quite right, same issue i was facing while exposing autocad_color but if i am trying to expose Fme_Color attribute then i am not getting the same in File Geodatabase.

 

Please help with the steps other than exposing format attributes from reader.

 

 

 

And as sander already explained, the color will not just show up automatically because you have this as an attribute. In ArcMap (assuming you use Esri software), you will have to specify that color for each feature is stored in this attribute.

When you expose the attribute autocad_color, you will see that this field will contain numbers like 1, 24, 156, etc. That's because AutoCAD has its own color codes (Reference to the Autocad Color Index). They are pretty much useless if you would like to work with these attributes in other GIS software (unless you hard code the transformation from ACI to RGB).

 

 

Therefore, expose the attribute fme_color. This will give you an RGB, value. You could store this attribute to your output for example as '255,0,0'. Other GIS software might read this attribute and set the color of that feature to a red color.
Thanks a lot your idea works...i was not aware about the process of exposing FME attributes and it works after using attribute re-namer.

 

 

 


Reply