ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data Namespace / CoreDataExtensions Class / GetHasActivationExtension Method
The table to check
The extension id (guid)
Example

In This Topic
    GetHasActivationExtension Method
    In This Topic
    Gets if the specified extension id (guid) is registered with the table. This method must be called on the Main CIM Thread. Use QueuedTask.Run.
    Syntax
    public static bool GetHasActivationExtension( 
       Table table,
       Guid extensionId
    )
    Public Shared Function GetHasActivationExtension( _
       ByVal table As Table, _
       ByVal extensionId As Guid _
    ) As Boolean

    Parameters

    table
    The table to check
    extensionId
    The extension id (guid)
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Value cannot be null: table
    extension id cannot be empty
    Example
    Table Extension Ids
    public void ExtensionIds1(Table table)
    {
        //Add an extension id to a table
        //Check documentation for restrictions on backward compatibility - backward
        //compatibility is limited to ArcGIS Pro 3.1 if an extension id is added.
        //Note: This is an extension method. It is for use in addins only and not CoreHost.
        string extension_id_string = "52d8f3be-b73d-4140-beaf-23d4f9b697ea";
        Guid extension_id = Guid.Parse(extension_id_string);
    
        //Note: Must be within the lambda of QueuedTask.Run(() => { ...
    
        //register the extension id with the relevant table
        table.AddActivationExtension(extension_id);
    
        //Remove an extension id from a table
        //Restores backward compatibility assuming no other compatibility limitations are
        //in place.
        //Note: This is an extension method. It is for use in addins only and not CoreHost.
        table.RemoveActivationExtension(extension_id);
    
        //Check if a given extension id  is registered with a particular table.
        //Note: This is an extension method. It is for use in addins only and not CoreHost.
        if (table.GetHasActivationExtension(extension_id))
        {
            //TODO - implement custom logic relevant to presence of extension_id
        }
    
        //Enumerate all extension ids on a given table.
        //Note: This is an extension method. It is for use in addins only and not CoreHost.
        foreach (Guid ext_id in table.GetActivationExtensions())
        {
            //TODO - logic based on extension ids
        }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also