ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / TinEditor Class / TinEditor Constructor / TinEditor Constructor(TinDataset)
The TIN that will be edited. If you call SaveEdits, then the original TIN will be modified. If you want to preserve the original TIN, call SaveAs instead, or you can make a copy before you start editing.
Example

In This Topic
    TinEditor Constructor(TinDataset)
    In This Topic
    Creates a new TIN editor instance and puts it in edit mode. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public TinEditor( 
       TinDataset tinDataset
    )
    Public Function New( _
       ByVal tinDataset As TinDataset _
    )

    Parameters

    tinDataset
    The TIN that will be edited. If you call SaveEdits, then the original TIN will be modified. If you want to preserve the original TIN, call SaveAs instead, or you can make a copy before you start editing.

    Return Value

    The newly created TIN editor which will be in edit mode.
    Exceptions
    ExceptionDescription
    The required TinDataset is null.
    This method must be called on the MCT. Use QueuedTask.Run.
    Example
    Create TinEditor from TinDataset
    tinEditor = new TinEditor(tinDataset);
    isInEditMode = tinEditor.IsInEditMode;  // isInEditMode = true
    
    Edit an existing TIN
    // Create an instance of TinEditor from an existing TinDataset
    tinEditor = new TinEditor(tinDataset);
    int numNodes = tinDataset.GetNodeCount();  // numNodes = 10
    tinEditor.AddPointZ(pointZ, 7);
    
    // Calling SaveEdits modifies the existing TIN
    tinEditor.SaveEdits();
    numNodes = tinDataset.GetNodeCount();  // numNodes = 11
    
    // Adding twenty points
    tinEditor.AddMassPoints(points, 10, 112.5);
    
    // Calling SaveAs creates a new TIN on disk, and 
    // the tin editor points to the new TIN.
    string tinPath2 = "C:\\Tin2";
    tinEditor.SaveAs(tinPath2, true);
    
    tinEditor.StopEditing(true);
    TinDataset tinDataset2 = OpenTin(tinPath2); // See https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-3D-Analyst-Data#working-with-tin-data
    numNodes = tinDataset2.GetNodeCount(); // numNodes = 31
    
    // The edits still show up in the original TIN while it is in memory, but if you open it
    // again you will see that it only has the edits that were saved before SaveAs was called.
    numNodes = tinDataset.GetNodeCount(); // numNodes = 31
    
    tinDataset = OpenTin(tinPath);
    numNodes = tinDataset.GetNodeCount(); // numNodes = 11
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also