GetVariableProfiles Method (VoxelLayer)
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());
}
Get the Variable Profiles
//var voxelLayer = ... ;
//Must be on the QueuedTask.Run()
var variable_profiles = voxelLayer.GetVariableProfiles();
Get the Variable Renderer
//var voxelLayer = ... ;
//Must be on the QueuedTask.Run()
var variable = voxelLayer.GetVariableProfiles().First();
var renderer = variable.Renderer;
if (variable.DataType == VoxelVariableDataType.Continuous)
{
//Renderer will be stretch
var stretchRenderer = renderer as CIMVoxelStretchRenderer;
//access the renderer
}
else //VoxelVariableDataType.Discrete
{
//Renderer will be unique value
var uvr = renderer as CIMVoxelUniqueValueRenderer;
//access the renderer
}
Check the MaxNumberofIsoSurfaces for a Variable
//var voxelLayer = ... ;
//Must be on the QueuedTask.Run()
var variable = voxelLayer.GetVariableProfiles().First();
var max = variable.MaxNumberOfIsosurfaces;
if (max >= variable.GetIsosurfaces().Count)
{
//no more surfaces can be created on this variable
}
Check a Variable's Datatype
//var voxelLayer = ... ;
//Must be on the QueuedTask.Run()
var variable = voxelLayer.GetVariableProfiles().First();
if (variable.DataType != VoxelVariableDataType.Continuous)
{
//No iso surfaces
//Iso surface can only be created for VoxelVariableDataType.Continuous
}
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.