This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Set Globe Layer Properties Snippet (ArcObjects .NET 10.4 SDK) |
Set the globe layer properties.
///<summary>Set the globe layer properties.</summary> /// ///<param name="globeDisplay">An IGlobeDiaply interface</param> ///<param name="layer">An ILayer interface</param> /// ///<remarks></remarks> public void SetGlobeLayerProperties1(ESRI.ArcGIS.GlobeCore.IGlobeDisplay globeDisplay, ESRI.ArcGIS.Carto.ILayer layer) { ESRI.ArcGIS.GlobeCore.IGlobeDisplayLayers globeDisplayLayers=globeDisplay as ESRI.ArcGIS.GlobeCore.IGlobeDisplayLayers; // Reference or Boxing Conversion // Get IGlobeLayerProperties ESRI.ArcGIS.GlobeCore.IGlobeLayerProperties globeLayerProps=globeDisplayLayers.FindGlobeProperties(layer); // Get or Set the layer's properties globeLayerProps.Use16ColorBits=true; // Refresh the layer globeDisplayLayers.RefreshLayer(layer); }
'''<summary>Set the globe layer properties.</summary> ''' '''<param name="globeDisplay">An IGlobeDiaply interface</param> '''<param name="layer">An ILayer interface</param> ''' '''<remarks></remarks> Public Sub SetGlobeLayerProperties(ByVal globeDisplay As ESRI.ArcGIS.GlobeCore.IGlobeDisplay, ByVal layer As ESRI.ArcGIS.Carto.ILayer) Dim globeDisplayLayers As ESRI.ArcGIS.GlobeCore.IGlobeDisplayLayers=CType(globeDisplay, ESRI.ArcGIS.GlobeCore.IGlobeDisplayLayers) ' Explicit Cast ' Get IGlobeLayerProperties Dim globeLayerProps As ESRI.ArcGIS.GlobeCore.IGlobeLayerProperties=globeDisplayLayers.FindGlobeProperties(layer) ' Get or Set the layer's properties globeLayerProps.Use16ColorBits=True ' Refresh the layer globeDisplayLayers.RefreshLayer(layer) End Sub