ContainsLight Objects - Lights 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   ContainsLight
( containerObject:HANDLE ) :BOOLEAN ;

Python:

def  vs.ContainsLight(containerObject):
   return BOOLEAN

Description:

Function ContainsLight returns TRUE if the referenced object contains a light. This function works with container objects such as groups, symbols, layers, etc.

Parameters:

containerObject Handle to object.



  CreateLight Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

FUNCTION   CreateLight
(   pXR :REAL;
    pYR :REAL;
    pZR :REAL;
    lightType :INTEGER;
    isOn :BOOLEAN;
    castShadow :BOOLEAN
) :HANDLE ;

Python:

def  vs.CreateLight(pXR, pYR, pZR, lightType, isOn, castShadow):
   return HANDLE

Description:

CreateLight creates a new light object in the active VectorScript document.

A new light objects' color is defaulted to white, and brightness is defaulted to 75%.

Table - Light Types

Light Type Constant
Directional 0
Point 1
Spot 2


Parameters:

pXR X coordinate of new light.
pYR Y coordinate of new light.
pZR Z coordinate of new light.
lightType Light type.
isOn On-off status of light.
castShadow Specifies whether light will cast shadow.

Example:

CreateLight(2,3,8,1,TRUE,TRUE);



  GetBeamAngle Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   GetBeamAngle
(   h :HANDLE;
  VAR  beamAngleR :REAL
) ;

Python:

def  vs.GetBeamAngle(h):
   return beamAngleR

Description:

Procedure GetBeamAngle returns the spread angle of the referenced spot light.

Parameters:

h Handle to light.
beamAngleR Returns beam spread angle.



  GetLayerAmbientColor Objects - Lights 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   GetLayerAmbientColor
(   layer :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetLayerAmbientColor(layer):
   return (red, green, blue)

Description:

Procedure GetLayerAmbientColor returns the color of the ambient light of the referenced layer. RGB values are in the range of 0~65535.

Parameters:

layer Handle to layer.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.



  GetLayerAmbientInfo Objects - Lights 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   GetLayerAmbientInfo
(   layer :HANDLE;
  VAR  isOn :BOOLEAN;
  VAR  brightness :INTEGER
) ;

Python:

def  vs.GetLayerAmbientInfo(layer):
   return (isOn, brightness)

Description:

Procedure GetLayerAmbientInfo returns the attribute values for the ambient light object of the referenced layer.

Parameters:

layer Handle to layer.
isOn On-off status of ambient light.
brightness Brightness of ambient light.



  GetLightColorRGB Objects - Lights 
MiniCAD7.0.1

VectorScript Declaration:

PROCEDURE   GetLightColorRGB
(   light :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetLightColorRGB(light):
   return (red, green, blue)

Description:

Procedure GetLightColorRGB returns the RGB color values for the referenced light object.

Parameters:

light Handle to light.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.



  GetLightDirection Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   GetLightDirection
(   h :HANDLE;
  VAR  panAngleR :REAL;
  VAR  tiltAngleR :REAL
) ;

Python:

def  vs.GetLightDirection(h):
   return (panAngleR, tiltAngleR)

Description:

Procedure GetLightDirection returns the direction angles of the referenced light object.

Parameters:

h Handle to light.
panAngleR Returns light pan angle.
tiltAngleR Returns light tilt angle.



  GetLightFalloff Objects - Lights 
MiniCAD7.0.1

VectorScript Declaration:

PROCEDURE   GetLightFalloff
(   light :HANDLE;
  VAR  distFalloff :INTEGER;
  VAR  angFalloff :INTEGER
) ;

Python:

def  vs.GetLightFalloff(light):
   return (distFalloff, angFalloff)

Description:

Procedure GetLightFalloff returns the fall off attributes for the referenced light object.

Table - Light Falloff Types

Falloff Type Constant
None 0
Normal 1
Smooth 2
Sharp 3

Parameters:

light Handle to light.
distFalloff Returns distance falloff value.
angFalloff Returns angular falloff value.



  GetLightInfo Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   GetLightInfo
(   h :HANDLE;
  VAR  lightType :INTEGER;
  VAR  brightness :INTEGER;
  VAR  isOn :BOOLEAN;
  VAR  castShadow :BOOLEAN
) ;

Python:

def  vs.GetLightInfo(h):
   return (lightType, brightness, isOn, castShadow)

Description:

Procedure GetLightInfo returns the attributes of the referenced light object.

Table - Light Types

Light Type Constant
Directional 0
Point 1
Spot 2

Parameters:

h Handle to light.
lightType Returns light type.
brightness Returns light brightness.
isOn Returns on-off status of light.
castShadow Returns whether light casts shadows.



  GetLightLocation Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   GetLightLocation
(   h :HANDLE;
  VAR  pX :REAL;
  VAR  pY :REAL;
  VAR  pZ :REAL
) ;

Python:

def  vs.GetLightLocation(h):
   return p

Description:

Procedure GetLightLocation returns the position of the referenced light object.

Parameters:

h Handle to light.
p Returns coordinate location of light.



  GetSpreadAngle Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   GetSpreadAngle
(   h :HANDLE;
  VAR  spreadAngleR :REAL
) ;

Python:

def  vs.GetSpreadAngle(h):
   return spreadAngleR

Description:

Procedure GetSpreadAngle returns the spread angle of the referenced spot light.

Parameters:

h Handle to light.
spreadAngleR Returns spread angle of light.



  SetBeamAngle Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   SetBeamAngle
(   h :HANDLE;
    beamAngleR :REAL
) ;

Python:

def  vs.SetBeamAngle(h, beamAngleR):
   return None

Description:

Procedure SetBeamAngle sets the spread angle of the referenced spot light.

Parameters:

h Handle to light.
beamAngleR Beam angle of light.



  SetLayerAmbientColor Objects - Lights 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetLayerAmbientColor
(   layer :HANDLE;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Python:

def  vs.SetLayerAmbientColor(layer, red, green, blue):
   return None

Description:

Procedure SetLayerAmbientColor sets the color for the ambient light of the referenced layer. RGB values are in the range of 0~65535.

Parameters:

layer Handle to layer.
red RGB color component value.
green RGB color component value.
blue RGB color component value.



  SetLayerAmbientInfo Objects - Lights 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetLayerAmbientInfo
(   layer :HANDLE;
    isOn :BOOLEAN;
    brightness :INTEGER
) ;

Python:

def  vs.SetLayerAmbientInfo(layer, isOn, brightness):
   return None

Description:

Procedure SetLayerAmbientInfo sets the attribute values for the ambient light object of the referenced layer.

Parameters:

layer Handle to layer.
isOn On-off status of ambient light
brightness Brightness of ambient light.



  SetLightColorRGB Objects - Lights 
MiniCAD7.0.1

VectorScript Declaration:

PROCEDURE   SetLightColorRGB
(   light :HANDLE;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Python:

def  vs.SetLightColorRGB(light, red, green, blue):
   return None

Description:

Procedure SetLightColorRGB sets the RGB color values for the referenced light object.

Parameters:

light Handle to light.
red RGB color component value.
green RGB color component value.
blue RGB color component value.



  SetLightDirection Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   SetLightDirection
(   h :HANDLE;
    panAngleR :REAL;
    tiltAngleR :REAL
) ;

Python:

def  vs.SetLightDirection(h, panAngleR, tiltAngleR):
   return None

Description:

Procedure SetLightDirection sets the direction angles of the referenced light object.

Parameters:

h Handle to light.
panAngleR Pan angle of light.
tiltAngleR Tilt angle of light.



  SetLightFalloff Objects - Lights 
MiniCAD7.0.1

VectorScript Declaration:

PROCEDURE   SetLightFalloff
(   light :HANDLE;
    distFalloff :INTEGER;
    angFalloff :INTEGER
) ;

Python:

def  vs.SetLightFalloff(light, distFalloff, angFalloff):
   return None

Description:

Procedure SetLightFalloff sets the fall off attributes for the referenced light object.

Table - Light Falloff Types

Falloff Type Constant
None 0
Normal 1
Smooth 2
Sharp 3

Parameters:

light Handle to light.
distFalloff Distance falloff value.
angFalloff Angular falloff value.



  SetLightInfo Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   SetLightInfo
(   h :HANDLE;
    lightType :INTEGER;
    brightness :INTEGER;
    isOn :BOOLEAN;
    castShadow :BOOLEAN
) ;

Python:

def  vs.SetLightInfo(h, lightType, brightness, isOn, castShadow):
   return None

Description:

Sets the attributes of the referenced light object.

Parameters:

h Handle to light.
lightType Light type.
brightness Brightness of light.
isOn On-off status of light.
castShadow Shadow casting status of light.



  SetLightLocation Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   SetLightLocation
(   h :HANDLE;
    pX :REAL;
    pY :REAL;
    zValue :REAL
) ;

Python:

def  vs.SetLightLocation(h, p, zValue):
   return None

Description:

Procedure SetLightLocation sets the location of the referenced light object.

Parameters:

h Handle to light.
p X-Y coordinate location of light.
zValue Elevation of light.



  SetSpreadAngle Objects - Lights 
MiniCAD7.0

VectorScript Declaration:

PROCEDURE   SetSpreadAngle
(   h :HANDLE;
    spreadAngleR :REAL
) ;

Python:

def  vs.SetSpreadAngle(h, spreadAngleR):
   return None

Description:

Procedure SetSpreadAngle sets the spread angle of the light object. If the light type is not a spot light, the procedure has no effect on the light.

Parameters:

h Handle to light.
spreadAngleR Beam spread angle of light.