ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / TinEditor Class / CreateFromFeatureClass Method
The feature class that provides the input geometries from which to create the TIN.
The filter that may be used to select a subset of features. This can be null. If it is null, then all the geometries in the feature class are used.
A field in the feature class that indicates where the heights for the shapes come from. If the shape geometry is 3D, and that's what you want to use, pass the shape field. Otherwise, a numeric field can be used.
A numeric field in the feature class used to assign tags to corresponding elements in the TIN. Tag values are integers that are assigned to nodes, edges, or triangles. They have user defined meaning (e.g. node accuracy, land cover, etc.). If no tag values are to be used pass null.
A surface type indicating how the input feature geometry is incorporated into the triangulation.
Example

In This Topic
    CreateFromFeatureClass Method
    In This Topic
    Creates a new TIN editor instance. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Shared Function CreateFromFeatureClass( _
       ByVal featureClass As FeatureClass, _
       ByVal queryFilter As QueryFilter, _
       ByVal heightField As Field, _
       ByVal tagField As Field, _
       ByVal tinSurfaceType As TinSurfaceType _
    ) As TinEditor

    Parameters

    featureClass
    The feature class that provides the input geometries from which to create the TIN.
    queryFilter
    The filter that may be used to select a subset of features. This can be null. If it is null, then all the geometries in the feature class are used.
    heightField
    A field in the feature class that indicates where the heights for the shapes come from. If the shape geometry is 3D, and that's what you want to use, pass the shape field. Otherwise, a numeric field can be used.
    tagField
    A numeric field in the feature class used to assign tags to corresponding elements in the TIN. Tag values are integers that are assigned to nodes, edges, or triangles. They have user defined meaning (e.g. node accuracy, land cover, etc.). If no tag values are to be used pass null.
    tinSurfaceType
    A surface type indicating how the input feature geometry is incorporated into the triangulation.

    Return Value

    The newly created TIN editor in edit mode.
    Exceptions
    ExceptionDescription
    The required feature class is null.
    The feature class definition is null.
    This method must be called on the MCT. Use QueuedTask.Run.
    Remarks
    The extent of the feature class is copied and used as the extent of the TIN.

    If records containing NULL shapes or numeric fields with NULL Z values are encountered, the triangulation process will skip them and continue. If this happens, a ArcGIS.Core.Data.Exceptions.TinException is thrown with the message "One or more input features contain NULL Shape or field value." when it's finished. Therefore, all valid data in the feature class gets triangulated but a note is made, in the form of a specific error, to let the you know one or more records were skipped. You then have the choice of using the resulting TIN or not.

    Example
    Create TinEditor from feature class
    var fields = featureClass.GetDefinition().GetFields();
    
    // Use the z-values from the geometries as the height field
    Field heightField = fields.First(f => f.FieldType == FieldType.Geometry);
    
    // Set the vertices from the geometries as TIN nodes
    tinEditor = TinEditor.CreateFromFeatureClass(featureClass, null, heightField, null, TinSurfaceType.MassPoint);
    isInEditMode = tinEditor.IsInEditMode;  // isInEditMode = true
    
    // Use the object ids as tag values
    Field tagField = fields.First(f => f.FieldType == FieldType.OID);
    
    // Set the lines from the geometries as TIN edges
    tinEditor = TinEditor.CreateFromFeatureClass(featureClass, null, heightField, tagField, TinSurfaceType.HardLine);
    isInEditMode = tinEditor.IsInEditMode;  // isInEditMode = true
    
    // Only use certain geometries in the TIN
    QueryFilter filter = new QueryFilter()
    {
      ObjectIDs = new List<long> { 2, 6, 7, 8, 9, 10, 14, 17, 21, 22 }
    };
    tinEditor = TinEditor.CreateFromFeatureClass(featureClass, filter, heightField, tagField, TinSurfaceType.HardLine);
    isInEditMode = tinEditor.IsInEditMode;  // isInEditMode = true
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also