Adding data to globe (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > Developing with ArcGIS > Learning ArcObjects > ArcGIS extensions > 3D Analyst > Visualizing in 3D > Displaying data in 3D > Adding data to globe (ArcObjects .NET 10.6 SDK)

Adding data to globe


About adding data to globe

Data that you add to globe gets classified as one of the following three types based on the role the layer plays:
  • Elevation
  • Draped
  • Floating
For more information on setting the role of a three-dimensional (3D) layer, see Setting the role of a 3D layer in the ArcGIS Desktop User Help system.
The following code example shows how you can programmatically define the type of layer that is added to globe:
[C#]
public void AddGlobeLayerByType(ESRI.ArcGIS.GlobeCore.IGlobe globe,
    ESRI.ArcGIS.GlobeCore.esriGlobeLayerType globeLayerType,
    ESRI.ArcGIS.Carto.ILayer layer)
{
    if (globe == null)
        return ;

    if (globeLayerType ==
        ESRI.ArcGIS.GlobeCore.esriGlobeLayerType.esriGlobeLayerTypeElevation)
    {
        if (layer is ESRI.ArcGIS.Carto.IRasterLayer || layer is
            ESRI.ArcGIS.Carto.ITinLayer || layer is ESRI.ArcGIS.Carto.ITerrainLayer)
        {
            globe.AddLayerType(layer, globeLayerType, true);
        }
        return ;
    }
    // else if GlobeLayerType is esriGlobeLayerTypeDraped or esriGlobeLayerTypeFloating.
    globe.AddLayerType(layer, globeLayerType, true);
}
[VB.NET]
Public Sub AddGlobeLayerByType(ByVal globe As ESRI.ArcGIS.GlobeCore.IGlobe, ByVal globeLayerType As ESRI.ArcGIS.GlobeCore.esriGlobeLayerType, ByVal layer As ESRI.ArcGIS.Carto.ILayer)
    
    If globe Is Nothing Then
        Return
    End If
    
    If globeLayerType=ESRI.ArcGIS.GlobeCore.esriGlobeLayerType.esriGlobeLayerTypeElevation Then
        
        If TypeOf layer Is ESRI.ArcGIS.Carto.IRasterLayer OrElse TypeOf layer Is ESRI.ArcGIS.Carto.ITinLayer OrElse TypeOf layer Is ESRI.ArcGIS.Carto.ITerrainLayer Then
            globe.AddLayerType(layer, globeLayerType, True)
        End If
        
        Return
        
    End If
    
    globe.AddLayerType(layer, globeLayerType, True)
    
End Sub






Development licensing Deployment licensing
ArcGIS Desktop Advanced: 3D Analyst
ArcGIS Desktop Standard: 3D Analyst
ArcGIS Desktop Basic: 3D Analyst