Unique Values and Subtypes [C#]

Discussion created by AkhilP on Jul 31, 2012
Latest reply on Jul 26, 2013 by albroham
I am trying to colour subtypes for an empty featureclass by unique values.

I can do this manually by doing the following, this is a Point Layer.
Layer Properties > Symbology > Categories > Unique values > Value Field = SUBTYPE > click on Add All Values > 8 Subtypes will appear with random colours. Then I would manually change each Subtype marker symbol to a square with a colour that I want.

Once again, this is an empty featureclass.

I would like to perform the above actions using C# ArcObjects.

I have already tried SimpleMarkerSymbol code that would attempt to assign colours using a custom colour ramp, but this did not work because the code required the layer to have data in it. My featureclass will not data in it, but I need to assign colour to each subtype manually, and yes hardcode it in ArcObjects.

Please let me know if this is possible and how, thanks!