CIMPointSymbol

254
1
Jump to solution
07-28-2018 03:49 PM
Highlighted
New Contributor III

I would like an example of how to create a point with say a circle and then offset a square. I see how you can do it with a LineSymbology(Symbology Sample Project) but I get an error trying to do something similar with the CIMPointSymbol.  Below is code that doesn't work but may help clarify what I would like to do.  Any help steering me in the right direction is appreciated.

internal static Task<CIMPointSymbol> CreatePointTwoMarkersAsync()
{

return QueuedTask.Run<CIMPointSymbol>(() =>
{
var twoPointMarkers = new CIMPointSymbol();
var circleMarker = SymbolFactory.Instance.ConstructMarker(ColorFactory.Instance.GreyRGB, 5, SimpleMarkerStyle.Circle) as CIMVectorMarker;
var squareMarker = SymbolFactory.Instance.ConstructMarker(ColorFactory.Instance.WhiteRGB, 5, SimpleMarkerStyle.Square) as CIMVectorMarker;
CIMSymbolLayer[] mySymbolLyrs =
{
new CIMVectorMarker() //circle marker
{
MarkerGraphics = circleMarker.MarkerGraphics,
Frame = circleMarker.Frame,
Size = circleMarker.Size,
OffsetX= 0

},
new CIMVectorMarker() //square marker
{
MarkerGraphics = squareMarker.MarkerGraphics,
Frame = squareMarker.Frame,
Size = squareMarker.Size,
OffsetX= 5
}
};
twoPointMarkers.SymbolLayers = mySymbolLyrs;
return twoPointMarkers;
});

}

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
New Contributor III

As usual, after sleeping on it, I found my dumb mistake.  The above code works I just wasn't overwriting properly into the style where I was saving.  

View solution in original post

Reply
0 Kudos
1 Reply
Highlighted
New Contributor III

As usual, after sleeping on it, I found my dumb mistake.  The above code works I just wasn't overwriting properly into the style where I was saving.  

View solution in original post

Reply
0 Kudos