ArcObjects Library Reference (GlobeCore)  

IGlobeDisplayLayers.SetLayerLightingOption Method

Indicates if the layer is illuminated.

[Visual Basic .NET]
Public Sub SetLayerLightingOption ( _
    ByVal pLayer As ILayer, _
    ByVal isIlluminated As Boolean _
)
[C#]
public void SetLayerLightingOption (
    ILayer pLayer,
    bool isIlluminated
);
[C++]
HRESULT SetLayerLightingOption(
  ILayer* pLayer,
  VARIANT_BOOL isIlluminated
);
[C++]

Parameters

pLayer [in]

  pLayer is a parameter of type ILayer

isIlluminated [in]   isIlluminated is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Use this method to set the lighting option for a layer.

Note that if you add a layer to globe via code and want the lighting property to be persisted when the globe document is saved then you should explicitly add the I3DProperties extension to your layer as follows:

 

ESRI.ArcGIS.Analyst3D.I3DProperties p3DProperties;
p3DProperties = new Feature3DPropertiesClass();
ESRI.ArcGIS.Carto.ILayerExtensions layerExtension = ftrLayer as ESRI.ArcGIS.Carto.ILayerExtensions;
layerExtension.AddExtension(p3DProperties);
           
//Now set the layer lighting
glbDisplayLayers.SetLayerLightingOption(ftrLayer as ESRI.ArcGIS.Carto.ILayer, true);
glbDisplayLayers.RefreshLayer(ftrLayer as ESRI.ArcGIS.Carto.ILayer);

 

If the extension is not added to the layer then on reopening a saved globe document lighting for the layer will be turned off by default.

See Also

IGlobeDisplayLayers Interface