GetGraphicOutline Method (GraphicFactory)
Get the outline geometry for the input CIMGraphic. This method must
be called on the MCT. Use QueuedTask.Run.
Get Graphic Outline
//given a graphic, extract its outline geometry
var graphic_outline = GraphicFactory.Instance.GetGraphicOutline(
layout, cim_graphic);
//TODO - use the geometry - eg, make another graphic
var outline_graphic = GraphicFactory.Instance.CreateSimpleGraphic(graphic_outline);
//... etc.
Get Graphic Outline from Graphic Element
//given a graphic, extract its outline geometry
var graphic_elem = layout.GetElementsAsFlattenedList().OfType<GraphicElement>()?.FirstOrDefault();
if (graphic_elem != null)//can be point, line, poly, or text
return;
var outline = GraphicFactory.Instance.GetGraphicOutline(
layout, graphic_elem.GetGraphic());
//create an element using the outline
var elem = ElementFactory.Instance.CreateGraphicElement(
layout, outline);
//... etc.
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.1 or higher.