ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Editing Namespace / RowToken Class
Members Example

In This Topic
    RowToken Class
    In This Topic
    A RowToken represents a feature that will be created but has not yet been created. It can be used in place of the object ID in referencing that feature even before it has an Object ID.
    Syntax
    public sealed class RowToken 
    Public NotInheritable Class RowToken 
    Remarks
    The RowToken can be used to chain together multiple editing primitives that depend on each other. For example, you can create two rows using Create(), and use the resulting RowTokens to create a utility network connectivity association.
    Example
    Edit Operation add attachment via RowToken
    //ArcGIS Pro 2.5 extends the EditOperation.AddAttachment method to take a RowToken as a paramter.
    //This allows you to create a feature, using EditOperation.CreateEx, and add an attachment in one transaction.
    
    var editOpAttach = new EditOperation();
    editOperation1.Name = string.Format("Create point in '{0}'", CurrentTemplate.Layer.Name);
    
    var attachRowToken = editOpAttach.Create(this.CurrentTemplate, polygon);
    editOpAttach.AddAttachment(attachRowToken, @"c:\temp\image.jpg");
    
    //Must be within a QueuedTask
    if (!editOpAttach.IsEmpty)
    {
      var result = editOpAttach.Execute(); //Execute and ExecuteAsync will return true if the operation was successful and false if not
    }
    Create utility network features and associations in a single edit operation
    // Create an EditOperation
    EditOperation editOperation = new EditOperation();
    editOperation.Name = "Create pole; create transformer bank; attach transformer bank to pole";
    
    // Create the transformer bank
    RowToken transformerBankToken = editOperation.Create(transformerBankLayer, transformerBankAttributes);
    
    // Create a pole
    RowToken poleToken = editOperation.Create(poleLayer, poleAttributes);
    
    // Create a structural attachment association between the pole and the transformer bank
    RowHandle poleHandle = new RowHandle(poleToken);
    RowHandle transformerBankHandle = new RowHandle(transformerBankToken);
    
    AssociationDescription poleAttachment = new AssociationDescription(AssociationType.Attachment, poleHandle, transformerBankHandle);
    
    editOperation.Create(poleAttachment);
    
    // Execute the EditOperation
    editOperation.Execute();
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Editing.RowToken

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also