placing color swatch values in BLOB field
The ArcGIS help (http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//008t00000078000000.htm) indicates that for representations you can use data fields to specify various rule properties. It indicates the different data types that can be associated with properties. It indicates that color swatch properties can be associated with BLOB fields.
My question is this: how do you enter color swatch data into a BLOB field that could then be used by the representation rules?
Since these are binary fields, it is necessary to a) know the color swatch binary format (which could easily be text, but still needs to be known), b) be able to populate the BLOB field with the appropriate raw data. I cannot find any examples of how to do this in help, forums, etc. So, at this point I seem to have a help system that tells me that I can use color swatch BLOB fields but does not tell me any way to actually create color swatch BLOB fields. This is somewhat less than helpful.
Any thoughts, directions or ideas on how to do this? Thanks.
Mapping Center Answer:
The blob field will simply contain a serialized ArcObjects color object, so you will not see the color patch itself and the "value" itself will be "Blob".
The way works is:
- Create a blob type field.
- Associate it to a representation color property.
- When changing the color for that particular feature, the color will be stored in the field.
So, first add a field to the attribute table of the feature class that has reps and that you want to have the color swatch values read from. You might call the new field "Color"; set the field type to "Blob". Before closing the attribute table, click the Open the layer properties for the reps feature class you just added the field to, and on the Symbology tab, click the Table Options tool and select Turn all fields on. Close the attribute table.
Open the Layer properties dialog for the reps reature class and on the Symbology tab, with Representations chosen under the Show option, click the Display field overrides tool at the bottom of the area that shows the symbology features (it looks like a gray database can). Now click teh grop down for the Color of the symbol and select the field that you added (e.g., "Color) as the field from which to draw the color definition that will override the default.
Then start and edit session, and select the feature that you want to be a different color than the default. On the Representations toolbar click Representation Properties tool (at the far right). Select a feature for which you want to change the color. In the Representation Properties area, click on the color and select or define (by clicking More Colors) the color you want to use instead.
When you save your edits, that new color will be saved in the field you added ("Color") and will be used when the feature is drawn. It will still appear as "Blob" if you look at the attribute table.
An idea would be to have the override field also support Text types, then you could have the field value stored as something like "RGB-097-223-256" with the color definition clearly apparent. You could suggest something like this on the ArcGIS Ideas page so that the development team sees your idea -- here is a link from our site to that page: http://mappingcenter.esri.com/index.cfm?fa=ask.gateway&activeTab=4
To prepare your data outside of the editing environment, you’d have to write some code.
If you would like to post a comment, please login.