ArcGIS Pro 3.6 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / TinEditor Class / AddPolygonsZ Method
The polygons to add. The z-values from the polygons are used for the TIN.
The surface type which indicates how the polygons are to be incorporated into the tin. Polygons can be entered as polygon, line, or mass points surface types.
The tag value to be assigned to the new elements in the TIN. If the surface feature type is set to mass points the tag is assigned to the resulting TIN nodes. If the surface type is lineal, then the tags are assigned to edges. If the surface type is polygonal, then the tags are assigned to triangles. A value of 0 will result in no tag assignment.
The spatial reference of the polygons. If it is the same as the TIN spatial reference, you can pass null. Otherwise, the polylines will be projected from the input spatial reference to the spatial reference of the tin.
Example

In This Topic
    AddPolygonsZ Method
    In This Topic
    Adds polygons to the TIN. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    polygons
    The polygons to add. The z-values from the polygons are used for the TIN.
    tinSurfaceType
    The surface type which indicates how the polygons are to be incorporated into the tin. Polygons can be entered as polygon, line, or mass points surface types.
    tagValue
    The tag value to be assigned to the new elements in the TIN. If the surface feature type is set to mass points the tag is assigned to the resulting TIN nodes. If the surface type is lineal, then the tags are assigned to edges. If the surface type is polygonal, then the tags are assigned to triangles. A value of 0 will result in no tag assignment.
    spatialReference
    The spatial reference of the polygons. If it is the same as the TIN spatial reference, you can pass null. Otherwise, the polylines will be projected from the input spatial reference to the spatial reference of the tin.
    Exceptions
    ExceptionDescription
    This method must be called on the MCT. Use QueuedTask.Run.
    The polygons parameter is null.
    The editor is not in edit mode.
    The polygons are all null or empty.
    Example
    Add polygons
    // Add polygons with tagValue = 42 and height = 12. 
    // The polygons are in a different spatial reference than the tin editor, so we provide the spatial 
    // reference of the polygons. The polygons will be projected to the spatial reference of the tin editor.
    tinEditor.AddPolygons(polygons, TinSurfaceType.ZLessSoftLine, 42, 12, SpatialReferenceBuilder.CreateSpatialReference(54004));
    
    // Add z-aware polygons with no tag value. The height comes from the z-values of the vertices. 
    // The polygons are in the same spatial reference as the tin editor, so there is no need to provide it.
    tinEditor.AddPolygonsZ(polygonsZ, TinSurfaceType.HardLine, 0);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also