This collection is currently managed by a object.
Methods
- Func Add() As
- Adds a new light source to the LightSources collection.
Dim MyViewer As Viewer Set MyViewer = CATIA.ActiveWindow.ActiveViewer Dim MyLightSource As LightSource Set MyLightSource = MyViewer.LightSources.Add
- Parameters:
-
- iIndex
- The index of the light source to retrieve in the collection of light sources. Compared with other collections, you cannot use the name of the light source as argument. dd>
- Returns:
- The retrieved light source
Dim MyLightSource As LightSource Set MyLightSource = LightSources.Item(6)dd>
- Parameters:
-
- iIndex
- The index of the light source to remove. Compared with other collections, you cannot use the name of the light source as argument.
- Example:
-
The following example removes the second light source
in the collection attached to the active viewer.
This viewer must be a
object.
Dim MyViewer As Viewer Set MyViewer = CATIA.ActiveWindow.ActiveViewer MyViewer.LightSources.Remove(2)
dd>