ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / ShapeDescription Class / HasM Property
Example

In This Topic
    HasM Property (ShapeDescription)
    In This Topic
    Indicates whether or not the ArcGIS.Core.Data.FeatureClass to create has M values.
    Syntax
    public bool HasM {get; set;}
    Public Property HasM As Boolean
    Example
    Create a routes feature class using the DDL
    {
      static void CreateRoutes(SchemaBuilder schemaBuilder)
      {
        FieldDescription routeIdDescription = FieldDescription.CreateIntegerField("RouteID");
        FieldDescription routeNameDescription = FieldDescription.CreateStringField("RouteName", 100);
        ShapeDescription shapeDescription = new ShapeDescription(GeometryType.Polyline, SpatialReferences.WGS84)
        {
          HasM = true,
          HasZ = false
        };
    
        FeatureClassDescription routeFeatureClassDescription = new FeatureClassDescription("Routes",
          new List<FieldDescription>() { routeIdDescription, routeNameDescription }, shapeDescription);
    
        //Create an M-enabled poly-line feature class
        schemaBuilder.Create(routeFeatureClassDescription);
        schemaBuilder.Build();
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also