APerlov

How to programmatically change colors of CadAnnotationLayer?

Discussion created by APerlov on Apr 30, 2013
I need to add Annotation layer from CAD file to arcmap. Unfortunately all annotations have different colors, but they must be represented in black. I've tried some methods to do it like this:

                CadAnnotationLayerClass newlayer = new CadAnnotationLayerClass();
                newlayer.DataSourceType = "CAD Annotation Feature Class";
                newlayer.Name = "Annotations";
               
               
                newlayer.FeatureClass = pFeatureWorkspace.OpenFeatureClass(System.String.Concat(fc_name,
   ":Annotation")); ;
                //newlayer.NextFeatureAndGraphic(
                ICoverageAnnotationLayer pCALayer = newlayer as ICoverageAnnotationLayer;

                RgbColorClass color = new RgbColorClass();
                color.Red=0;
                color.Green=0;
                color.Blue=0;
                color.Transparency = 255;
                ESRI.ArcGIS.DataSourcesFile.ICadDrawingLayers pCadDwgLayers =
    (ESRI.ArcGIS.DataSourcesFile.ICadDrawingLayers)newlayer;
                string colors="";
               
               
                   

                int symbolcount = pCALayer.SymbolCount;
              
                for (int i = 0; i < symbolcount; i++)
                {
                    //newlayer.f

                  
                   pCALayer.set_FontColor(i, color);
                   pCALayer.TextSymbol[i].Color = color;
                   
                 
                 
                    //newlayer.TextSymbol[i].Color.ToString();
                   
                }

but the colors of the annotations did not change. Can anyone help me with that annoying problem&

Outcomes