ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping.Voxel.Events Namespace / VoxelAssetEventArgs.VoxelAssetChangeType Enumeration
Example Example

In This Topic
    VoxelAssetEventArgs.VoxelAssetChangeType Enumeration
    In This Topic
    The type of voxel asset change.
    Syntax
    public enum VoxelAssetEventArgs.VoxelAssetChangeType : System.Enum, System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable  
    Public Enum VoxelAssetEventArgs.VoxelAssetChangeType 
       Inherits System.Enum
       Implements System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable 
    Members
    MemberDescription
    Add Add
    Remove Remove
    Update Update
    Example
    Subscribe for Changes to a Voxel Layer
    ArcGIS.Desktop.Mapping.Events.MapMemberPropertiesChangedEvent.Subscribe((args) =>
    {
        var voxel = args.MapMembers.OfType<VoxelLayer>().FirstOrDefault();
        if (voxel == null)
            return;
        //Anything changed on a voxel layer?
        //At 2.x - if (args.EventHints.Any(hint => hint == MapMemberEventHint.VoxelSelectedVariableProfileIndex))
        if (args.EventHints.Any(hint => hint == MapMemberEventHint.VoxelSelectedVariable))
        {
            //Voxel variable profile selection changed
            var changed_variable_name = voxel.SelectedVariableProfile.Variable;
            //TODO respond to change, use QueuedTask if needed
    
        }
        else if (args.EventHints.Any(hint => hint == MapMemberEventHint.Renderer))
        {
            //This can fire when a renderer becomes ready on a new layer; the selected variable profile
            //is changed; visualization is changed, etc.
            var renderer = voxel.SelectedVariableProfile.Renderer;
            //TODO respond to change, use QueuedTask if needed
    
        }
    });
    
    ArcGIS.Desktop.Mapping.Voxel.Events.VoxelAssetChangedEvent.Subscribe((args) =>
    {
        //An asset changed on a voxel layer
        System.Diagnostics.Debug.WriteLine("");
        System.Diagnostics.Debug.WriteLine("VoxelAssetChangedEvent");
        System.Diagnostics.Debug.WriteLine($" AssetType: {args.AssetType}, ChangeType: {args.ChangeType}");
    
        if (args.ChangeType == VoxelAssetEventArgs.VoxelAssetChangeType.Remove)
            return;
        //Get "what"changed - add or update
        //eg IsoSurface
        VoxelLayer voxelLayer = null;
        if (args.AssetType == VoxelAssetEventArgs.VoxelAssetType.Isosurface)
        {
            var surface = MapView.Active.GetSelectedIsosurfaces().FirstOrDefault();
            //there will only be one selected...
            if (surface != null)
            {
                voxelLayer = surface.Layer;
                //TODO respond to change, use QueuedTask if needed
            }
        }
        //Repeat for Slices, Sections, LockedSections...
        //GetSelectedSlices(), GetSelectedSections(), GetSelectedLockedSections();
    });
    
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Desktop.Mapping.Voxel.Events.VoxelAssetEventArgs.VoxelAssetChangeType

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also