ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMMarkerNorthArrow Class
Members Example

In This Topic
    CIMMarkerNorthArrow Class
    In This Topic
    Represents a marker north arrow on a page layout.
    Object Model
    CIMMarkerNorthArrow ClassCIMMarkerNorthArrow ClassPolygon ClassCIMMarkerNorthArrow ClassCIMGraphicFrame ClassCIMSymbolReference ClassMapPoint ClassMapPoint Class
    Syntax
    Example
    Set halo property of north arrow
    //Set the CIM halo properties of a north arrow.
    
    //Reference the first selected element (assumption is it is a north arrow)
    Element northArrow = LayoutView.Active.GetSelectedElements().First();
    
    //Perform on the worker thread
    QueuedTask.Run(() =>
    {
      //Get definition of north arrow...
      var cim = northArrow.GetDefinition() as CIMMarkerNorthArrow;
      
      //this halo symbol is 50% transparent, no outline (i.e. 0 width)
      //First construct a polygon symbol to use in the Halo
      //Polygon symbol will need a fill and a stroke
      var polyFill = SymbolFactory.Instance.ConstructSolidFill(ColorFactory.Instance.CreateRGBColor(0, 0, 0, 50));
      var polyStroke = SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.BlackRGB, 0);
      var haloPoly = SymbolFactory.Instance.ConstructPolygonSymbol(polyFill, polyStroke);
      
      //Set the north arrow defintion of HaloSymbol and HaloSize 
      ((CIMPointSymbol)cim.PointSymbol.Symbol).HaloSymbol = haloPoly;
      ((CIMPointSymbol)cim.PointSymbol.Symbol).HaloSize = 3;//size of the halo
        
      //Apply the CIM changes back to the element
      northArrow.SetDefinition(cim);
    });
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMElement
             ArcGIS.Core.CIM.CIMFrameElement
                ArcGIS.Core.CIM.CIMMapSurround
                   ArcGIS.Core.CIM.CIMNorthArrow
                      ArcGIS.Core.CIM.CIMMarkerNorthArrow

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also