Public Shared Function GetActivationExtensions( _ ByVal table As Table _ ) As IReadOnlyList(Of Guid)
public static IReadOnlyList<Guid> GetActivationExtensions( Table table )
Parameters
- table
- The table to check
Public Shared Function GetActivationExtensions( _ ByVal table As Table _ ) As IReadOnlyList(Of Guid)
public static IReadOnlyList<Guid> GetActivationExtensions( Table table )
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
| System.ArgumentNullException | Value cannot be null: table |
{
// Must be called within QueuedTask.Run
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))
{
//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())
{
// Logic based on extension ids ...
}
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)