1

I am building a simple app that changes the size of the symbol of the selected feature. Is this possible? Here is a simple case for a selected feature:

public void onClick(){

IFeature spliceClosure = _app.splice.load(OID);

// access the symbology

// change the size

//refresh the active view
}

In reality this app is going to be used with schematic features. How do I access their symbology and change the size of it? I am trying to scale and rotate the symbols.

1

I don't think you can access symbology from a single feature . The symbology renderer is defined at the level of the layer.

You can set the renderer from the IGeoFeatureLayer, you access this by casting from IFeaturelayer.

More info see: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Working_with_layers_and_renderers/000100000468000000/

  • The link you have provided is full of information, but I cant find anything on schematic layers. they are layers, but I cant cast a schematic layer to an IGeoFeatureLayer. any suggestions ? I am trying to scale and rotate the symbols – ZZZ Apr 2 '15 at 13:53
  • I'am sorry, I don't know anything about schematic layers, i just assume they work the same way as regular layers. – warrieka Apr 2 '15 at 14:03
  • They do to some extent. Thanks for your help though, I am sure someone else will have on how to control the symbols for those schematic layers – ZZZ Apr 2 '15 at 14:08
1

I got this done, I have accessed the symbol thanks all.

private void ArrangeCrossSetionView(IEnumSchematicInMemoryFeature containerElements, IGeoFeatureLayer geoFtr, ISchematicLayer schematicLayer) {
        ISchematicInMemoryFeature feature;
        while ((feature = containerElements.Next()) != null) {
            var symbol = geoFtr.Renderer.SymbolByFeature[feature];
            var symbMarker = geoFtr.Renderer.SymbolByFeature[feature] as ISimpleMarkerSymbol;

the symbMarker is my symbol, it is of type I symbol but I casted it to ISimpleMarkerSymbol for other purposes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.