Select to view content in your preferred language

Does CIMBasicFeatureLayer.SelectionSymbol do anything?

160
4
Jump to solution
12-03-2024 11:22 AM
ScottDickison1
Emerging Contributor

I am trying to customize the selection symbol for a parcel polygon featurelayer in ArcGIS Pro 3.2.1. Below this layer in the TOC is a zoning layer with complex symbology. In some cases selected parcel polygons get visually lost. I'm trying to customize the selection symbol like this:

 

 QueuedTask.Run(() =>
 {
     //clear existing parcel selection
     _parcels.ClearSelection();
     CIMStroke baseline = SymbolFactory.Instance.ConstructStroke(CIMColor.CreateRGBColor(115, 223, 255, 0), 4.0, SimpleLineStyle.Solid);
     CIMStroke dashLine = SymbolFactory.Instance.ConstructStroke(CIMColor.CreateRGBColor(255, 255, 255), 3.0, SimpleLineStyle.Dash);
     CIMFill transpFill = SymbolFactory.Instance.ConstructSolidFill(CIMColor.NoColor());
     List<CIMSymbolLayer> symbolLayers = new List<CIMSymbolLayer> { dashLine, baseline,  transpFill };
     CIMPolygonSymbol selectionSymbol =  new CIMPolygonSymbol() { SymbolLayers = symbolLayers.ToArray() };
     var layerDef = _parcels.GetDefinition() as CIMFeatureLayer;
     layerDef.UseSelectionSymbol = false;
     layerDef.SelectionSymbol = selectionSymbol.MakeSymbolReference();
     _parcels.SetDefinition(layerDef);
 });

 

 I have tried this with .UseSelectionSymbol set to true which does not work either. Have I missed something along the way? Can we not customize the selection symbol for specific feature layers? 

0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

I have remembered my post on another similar thread. There are no changes in layer properties window in ArcGIS Pro. There is possibility to change color for now, but not symbol.

P.s. I am still on ArcGIS Pro 3.3.2

View solution in original post

0 Kudos
4 Replies
CharlesMacleod
Esri Regular Contributor

I suspect that because u r setting the fill transparent it (ie the selection symbol) isnt giving u an appropriate contrast to the "underlying" feature symbol (of the selected feature) with just the highlight being applied to the feature boundary...

CIMFill transpFill = SymbolFactory.Instance.ConstructSolidFill(CIMColor.NoColor());

 

I think, at this juncture, it is trial and error w/ the selection symbol to get the effect u r looking for. As far as your code goes, it all looks correct to me.

p.s. I have never used UseSelectionSymbol but, given the name of the property, I wld expect it to have to be "true".  

0 Kudos
ScottDickison1
Emerging Contributor

I should probably have been more clear. The outline that I've created with the CIMPolygonSymbol never draws. Using the PolygonSelectionFillerColor and SelectionColor works but both of those only seem to allow for soild fills. No combination of what I've tried has allowed for the custom symbol to be used. I have checked the layer with the CIMViewer and the custom symbol is there, it's just not getting utilized. I've attached the text from the CIMViewer.

0 Kudos
GKmieliauskas
Esri Regular Contributor

Hi,

I have remembered my post on another similar thread. There are no changes in layer properties window in ArcGIS Pro. There is possibility to change color for now, but not symbol.

P.s. I am still on ArcGIS Pro 3.3.2

0 Kudos
ScottDickison1
Emerging Contributor

Is this something that will be implemented in the future? That would be a nice feature to have.

 

0 Kudos