ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping.Voxel Namespace / VoxelVariableProfile Class / Variable Property
Example

In This Topic
    Variable Property (VoxelVariableProfile)
    In This Topic
    Gets the variable profile variable name.
    Syntax
    public string Variable {get;}
    Public ReadOnly Property Variable As String
    Example
    Get the Selected Variable Profile
    //var voxelLayer = ... ;
    //Must be on the QueuedTask.Run()
    
    var sel_profile = voxelLayer.SelectedVariableProfile;
    
    //Get the variable profile name
    var profile_name = sel_profile.Variable;
    
    Change the Selected Variable Profile
    //var voxelLayer = ... ;
    //Must be on the QueuedTask.Run()
    
    var profiles = voxelLayer.GetVariableProfiles();
    
    //Select any profile as long as it is not the current selected variable
    var not_selected = profiles.Where(p => p.Variable != sel_profile.Variable).ToList();
    if (not_selected.Count() > 0)
    {
        voxelLayer.SetSelectedVariableProfile(not_selected.First());
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also