<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I construct a symbol with text within it? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-construct-a-symbol-with-text-within-it/m-p/1330527#M10429</link>
    <description>&lt;P&gt;I have actually figured it out by using the Symbology pane and the CIM Viewer and lots of back and forth&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;double size = 10;
CIMColor fillColor = ColorFactory.Instance.RedRGB;

var textSymbol = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, size);
textSymbol.VerticalAlignment = VerticalAlignment.Center;
textSymbol.HorizontalAlignment = HorizontalAlignment.Center;
var fill = SymbolFactory.Instance.ConstructSolidFill(fillColor);
var marker = SymbolFactory.Instance.ConstructMarker() as CIMVectorMarker;
marker.MarkerPlacement = new CIMMarkerPlacementPolygonCenter();
marker.MarkerGraphics[0].Geometry = new PointN().ToCoreGeometry&amp;lt;MapPoint&amp;gt;();
marker.MarkerGraphics[0].Symbol = textSymbol;
marker.MarkerGraphics[0].TextString = "R";

List&amp;lt;CIMSymbolLayer&amp;gt; symbolLayers = new List&amp;lt;CIMSymbolLayer&amp;gt;
	{
		marker,
		fill
	};

var symbol = new CIMPointSymbol()
{
	Effects = new List&amp;lt;CIMGeometricEffect&amp;gt; { new CIMGeometricEffectRegularPolygon() { Radius = size } }.ToArray(),
	SymbolLayers = symbolLayers.ToArray()
};
symbol.SetSize(size);

return symbol;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2023 10:12:17 GMT</pubDate>
    <dc:creator>ViktorSafar</dc:creator>
    <dc:date>2023-09-20T10:12:17Z</dc:date>
    <item>
      <title>How do I construct a symbol with text within it?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-construct-a-symbol-with-text-within-it/m-p/1330510#M10424</link>
      <description>&lt;P&gt;I want to create a CIMSymbol that will be used in a unique value class renderer. The symbol should be a circle with red fill and the letter R in it.&lt;BR /&gt;&lt;BR /&gt;This is what I have but the symbol comes out as empty and the Symbology tab shows&amp;nbsp;"symbol has inconsistent geometry logic"&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var textSymbol = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, 8);
var fill = SymbolFactory.Instance.ConstructSolidFill(ColorFactory.Instance.RedRGB);

List&amp;lt;CIMSymbolLayer&amp;gt; symbolLayers = new List&amp;lt;CIMSymbolLayer&amp;gt;
{
	new CIMVectorMarker()
	{
		MarkerGraphics = new CIMMarkerGraphic[]
		{
			new CIMMarkerGraphic()
			{
				Symbol = textSymbol,
				TextString = "R"
			}
		}   
	},
	fill
};

_symbolRightLimit = new CIMPointSymbol() { SymbolLayers = symbolLayers.ToArray() };
_symbolRightLimit.SetSize(10);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to use the Symbology tab to see what I can fix to make it work but it appears that the only way to make that error go away is to add a global effect to the symbol? And while the error went away, the symbol still did not render.&lt;/P&gt;&lt;P&gt;I have also tried to play with the CIM Viewer to see what I can do but have not managed to find anything.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 08:16:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-construct-a-symbol-with-text-within-it/m-p/1330510#M10424</guid>
      <dc:creator>ViktorSafar</dc:creator>
      <dc:date>2023-09-20T08:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I construct a symbol with text within it?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-construct-a-symbol-with-text-within-it/m-p/1330526#M10428</link>
      <description>&lt;P&gt;Are you potentially replying on the wrong thread?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 10:09:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-construct-a-symbol-with-text-within-it/m-p/1330526#M10428</guid>
      <dc:creator>ViktorSafar</dc:creator>
      <dc:date>2023-09-20T10:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I construct a symbol with text within it?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-construct-a-symbol-with-text-within-it/m-p/1330527#M10429</link>
      <description>&lt;P&gt;I have actually figured it out by using the Symbology pane and the CIM Viewer and lots of back and forth&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;double size = 10;
CIMColor fillColor = ColorFactory.Instance.RedRGB;

var textSymbol = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, size);
textSymbol.VerticalAlignment = VerticalAlignment.Center;
textSymbol.HorizontalAlignment = HorizontalAlignment.Center;
var fill = SymbolFactory.Instance.ConstructSolidFill(fillColor);
var marker = SymbolFactory.Instance.ConstructMarker() as CIMVectorMarker;
marker.MarkerPlacement = new CIMMarkerPlacementPolygonCenter();
marker.MarkerGraphics[0].Geometry = new PointN().ToCoreGeometry&amp;lt;MapPoint&amp;gt;();
marker.MarkerGraphics[0].Symbol = textSymbol;
marker.MarkerGraphics[0].TextString = "R";

List&amp;lt;CIMSymbolLayer&amp;gt; symbolLayers = new List&amp;lt;CIMSymbolLayer&amp;gt;
	{
		marker,
		fill
	};

var symbol = new CIMPointSymbol()
{
	Effects = new List&amp;lt;CIMGeometricEffect&amp;gt; { new CIMGeometricEffectRegularPolygon() { Radius = size } }.ToArray(),
	SymbolLayers = symbolLayers.ToArray()
};
symbol.SetSize(size);

return symbol;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 10:12:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-construct-a-symbol-with-text-within-it/m-p/1330527#M10429</guid>
      <dc:creator>ViktorSafar</dc:creator>
      <dc:date>2023-09-20T10:12:17Z</dc:date>
    </item>
  </channel>
</rss>

