API Documentation > CorelDRAW > 2025-v26 > EffectExtrude > IVGEffectExtrude
EffectExtrude.SetLight method
Sets a light at a given index
Syntax:
Sub SetLight(ByVal Index As Long, ByVal Position As cdrExtrudeLightPosition, ByVal LightIntensity As Long)
Parameters:
Name Type Description
Index
Long
Position
LightIntensity
Long
Remarks:
The SetLight method enables the given light source and specifies its properties for an extrusion. See also EffectExtrude.LightPresent, EffectExtrude.LightPosition, and EffectExtrude.LightIntensity properties.
Examples:
The following VBA example creates an extrusion with two light sources.
Sub Test()
Dim s As Shape
Set s = ActiveLayer.CreateArtisticText(2.75, 5, "Text")
With s.Text.FontProperties
  .Name = "Arial Black"
  .Size = 150
End With
s.Fill.UniformColor.RGBAssign 0, 0, 255
With s.CreateExtrude(cdrExtrudeSmallBack, cdrVPLockedToShape, 4, _

 8, , cdrExtrudeSolidFill, CreateRGBColor(255, 0, 0)).Extrude
  .SetLight 1, cdrLightBackTopRight, 100
  .SetLight 2, cdrLightFrontCenter, 50
  .LightPresent(3) = False
End With 
End Sub