All Frameworks  Object Hierarchy  This Framework  Indexes   

LightSources (Collection)

A collection of all the LightSource objects.
This collection is currently managed by a Viewer3D object.

Method Index

Add
Adds a new light source to the LightSources collection.
Item
Returns a light source from its index in the LightSources collection.
Remove
Removes a light source from the LightSources collection.

Methods


o Func Add() As
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 Func Item( iIndex) As
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)
 
o Sub Remove( 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 © 2003, Dassault Systèmes. All rights reserved.