ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.LinearReferencing Namespace / RouteInfo Class / RouteInfo Constructor
An M-enabled polyline feature class.
The name of the field containing values that uniquely identify each route in the routeFeatureClass.
Example Version

RouteInfo Constructor
Initializes a new instance of the RouteInfo class.
Syntax

Parameters

routeFeatureClass
An M-enabled polyline feature class.
routeIDFieldName
The name of the field containing values that uniquely identify each route in the routeFeatureClass.
Exceptions
Example
Create a routes feature class using the DDL
public 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();
}
Get route information from a polyline feature class with M-values
public void CreateRouteInfo(Geodatabase geodatabase, string routeFeatureClassName = "Roads", string routeIdFieldName = "RouteID")
{
    using (FeatureClass routeFeatureClass = geodatabase.OpenDataset<FeatureClass>(routeFeatureClassName))
    using (FeatureClassDefinition routeFeatureClassDefinition = routeFeatureClass.GetDefinition())
    {
        if (routeFeatureClassDefinition.HasM())
        {
            RouteInfo routeInfo = new RouteInfo(routeFeatureClass, routeIdFieldName);

        }
    }
}
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.3 or higher.
See Also