Object Explorer Object Hierarchy Previous Next Index
LightSources (Object)
IUnknown
|
+---IDispatch
|
+---CATBaseUnknown
|
+---CATBaseDispatch
|
+---Collection
|
+---LightSources
A collection of all the LightSource objects.
This collection is currently managed by a Viewer3D
object.
Function and Subroutine Index
- Item
- Returns a light source from its index in the LightSources collection.
- Add
- Adds a new light source to the LightSources collection.
- Remove
- Removes a light source from the LightSources collection.
Methods
-
- Returns a light source from its index in the LightSources collection.
- 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.
- Returns:
- The retrieved light source
- Example:
- The following example returns in MyLightSource the sixth
light source in the collection.
Dim MyLightSource As LightSource
Set MyLightSource = LightSources.Item(6)
-
- Adds a new light source to the LightSources collection.
- Example:
- The following adds a light source to the collection attached to the
active viewer. This viewer must be a @see Viewer3D object.
Dim MyViewer As Viewer
Set MyViewer = CATIA.ActiveWindow.ActiveViewer
Dim MyLightSource As LightSource
Set MyLightSource = MyViewer.LightSources.Add
-
o Sub Remove(
| long
| iIndex)
|
- Removes a light source from the LightSources collection.
- 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 Viewer3D
object.
Dim MyViewer As Viewer
Set MyViewer = CATIA.ActiveWindow.ActiveViewer
MyViewer.LightSources.Remove(2)
Copyright © 2000, Dassault Systèmes. All rights reserved.