Skip to main content
Solved

Storing CAD Symbology in attribute

  • September 6, 2017
  • 6 replies
  • 64 views

Forum|alt.badge.img

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.

Best answer by jneujens

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.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

geosander
Forum|alt.badge.img+7
  • 327 replies
  • September 6, 2017

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.


jneujens
Forum|alt.badge.img
  • 189 replies
  • Best Answer
  • September 6, 2017

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.

Forum|alt.badge.img
  • Author
  • 45 replies
  • September 8, 2017

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.

 

 


jneujens
Forum|alt.badge.img
  • 189 replies
  • September 8, 2017
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.

 

 


jneujens
Forum|alt.badge.img
  • 189 replies
  • September 8, 2017
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.

Forum|alt.badge.img
  • Author
  • 45 replies
  • September 8, 2017

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.