ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMElement Class
Members Example Version

CIMElement Class
A CIM representation of an element.
Object Model
CIMElement ClassMapPoint Class
Syntax
Example
Element_GetSetDefinition
//Modify an element's CIM properties.

//Perform on the worker thread
await QueuedTask.Run(() =>
{
  CIMElement CIMElm = element.GetDefinition();

  //Modify a CIM value

  element.SetDefinition(CIMElm);
});
Lock an element
// The Locked property is displayed in the TOC as a lock symbol next
// to each element.  If locked the element can't be selected in the layout
// using the graphic selection tools.

//Perform on the worker thread
QueuedTask.Run(() =>
{
  // Reference and load the layout associated with the layout item
  Layout layout = layoutItem.GetLayout();
  if (layout != null)
  {
    //Reference an element by name
    Element element = layout.FindElement("MyElement");
    if (element != null)
    {
      // Modify the Locked property via the CIM
      CIMElement CIMElement = element.GetDefinition() as CIMElement;
      CIMElement.Locked = true;
      element.SetDefinition(CIMElement);
    }
  }
});
Inheritance Hierarchy

System.Object
   ArcGIS.Core.CIM.CIMObject
      ArcGIS.Core.CIM.CIMElement
         ArcGIS.Core.CIM.CIMFrameElement
         ArcGIS.Core.CIM.CIMGraphicElement

Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also