

public class CIMStandardGeneralPlacementProperties : CIMGeneralPlacementProperties, System.ComponentModel.INotifyPropertyChanged, System.Xml.Serialization.IXmlSerializable
Public Class CIMStandardGeneralPlacementProperties Inherits CIMGeneralPlacementProperties Implements System.ComponentModel.INotifyPropertyChanged, System.Xml.Serialization.IXmlSerializable
{
var map = MapView.Active?.Map;
if (map == null)
return;
await QueuedTask.Run(() =>
{
//Get the active map's definition - CIMMap.
var cimMap = map.GetDefinition();
//Get the labeling engine from the map definition
var cimGeneralPlacement = cimMap.GeneralPlacementProperties;
if (cimGeneralPlacement is CIMMaplexGeneralPlacementProperties)
{
//Current labeling engine is Maplex labeling engine
//Create a new standard label engine properties
var cimStandardPlacementProperties = new CIMStandardGeneralPlacementProperties();
//Set the CIMMap's GeneralPlacementProperties to the new label engine
cimMap.GeneralPlacementProperties = cimStandardPlacementProperties;
}
else
{
//Current labeling engine is Standard labeling engine
//Create a new Maplex label engine properties
var cimMaplexGeneralPlacementProperties = new CIMMaplexGeneralPlacementProperties();
//Set the CIMMap's GeneralPlacementProperties to the new label engine
cimMap.GeneralPlacementProperties = cimMaplexGeneralPlacementProperties;
}
//Set the map's definition
map.SetDefinition(cimMap);
});
}
System.Object
ArcGIS.Core.CIM.CIMObject
ArcGIS.Core.CIM.CIMGeneralPlacementProperties
ArcGIS.Core.CIM.CIMStandardGeneralPlacementProperties
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)