Hide Table of Contents
SetLightSourcePropertyValuesVB Method (IModelDoc2)

Sets the light source property values.

.NET Syntax

Visual Basic (Declaration) 
Function SetLightSourcePropertyValuesVB( _
   ByVal IdName As String, _
   ByVal LType As Integer, _
   ByVal Diff As Double, _
   ByVal RgbColor As Integer, _
   ByVal Dist As Double, _
   ByVal DirX As Double, _
   ByVal DirY As Double, _
   ByVal DirZ As Double, _
   ByVal SpotDirX As Double, _
   ByVal SpotDirY As Double, _
   ByVal SpotDirZ As Double, _
   ByVal SpotAngle As Double, _
   ByVal FallOff0 As Double, _
   ByVal FallOff1 As Double, _
   ByVal FallOff2 As Double, _
   ByVal Ambient As Double, _
   ByVal Specular As Double, _
   ByVal SpotExponent As Double, _
   ByVal BDisable As Boolean _
) As Boolean
Visual Basic (Usage) 
Dim instance As IModelDoc2
Dim IdName As String
Dim LType As Integer
Dim Diff As Double
Dim RgbColor As Integer
Dim Dist As Double
Dim DirX As Double
Dim DirY As Double
Dim DirZ As Double
Dim SpotDirX As Double
Dim SpotDirY As Double
Dim SpotDirZ As Double
Dim SpotAngle As Double
Dim FallOff0 As Double
Dim FallOff1 As Double
Dim FallOff2 As Double
Dim Ambient As Double
Dim Specular As Double
Dim SpotExponent As Double
Dim BDisable As Boolean
Dim value As Boolean
 
value = instance.SetLightSourcePropertyValuesVB(IdName, LType, Diff, RgbColor, Dist, DirX, DirY, DirZ, SpotDirX, SpotDirY, SpotDirZ, SpotAngle, FallOff0, FallOff1, FallOff2, Ambient, Specular, SpotExponent, BDisable)
C# 
bool SetLightSourcePropertyValuesVB( 
   string IdName,
   int LType,
   double Diff,
   int RgbColor,
   double Dist,
   double DirX,
   double DirY,
   double DirZ,
   double SpotDirX,
   double SpotDirY,
   double SpotDirZ,
   double SpotAngle,
   double FallOff0,
   double FallOff1,
   double FallOff2,
   double Ambient,
   double Specular,
   double SpotExponent,
   bool BDisable
)
C++/CLI 
bool SetLightSourcePropertyValuesVB( 
&   String^ IdName,
&   int LType,
&   double Diff,
&   int RgbColor,
&   double Dist,
&   double DirX,
&   double DirY,
&   double DirZ,
&   double SpotDirX,
&   double SpotDirY,
&   double SpotDirZ,
&   double SpotAngle,
&   double FallOff0,
&   double FallOff1,
&   double FallOff2,
&   double Ambient,
&   double Specular,
&   double SpotExponent,
&   bool BDisable
) 

Parameters

IdName

Light source ID name

LType

Light source type; valid types are taken from openGL definitions (LIGHT_EYE, LIGHT_AMBIENT, LIGHT_SPOT, LIGHT_POINT, LIGHT_DISTANT)

Diff

Light source diffuseness where values range from 0 to 1

RgbColor

Color value

Dist

Distance between the light source position and the vertex

DirX

X unit vector value describing the lights position

DirY
Y unit vector value describing the lights po
DirZ

Z unit vector value describing the lights position

SpotDirX

Spot X direction

SpotDirY

Spot Y direction

SpotDirZ

Spot Z direction

SpotAngle

Spot angle

FallOff0

Light source falloff - constant attenuation

NOTE: This parameter is not supported in SolidWorks 2011 and later.

FallOff1

Light source falloff - linear attenuation

NOTE: This parameter is not supported in SolidWorks 2011 and later.

FallOff2

Light source falloff - quadratic attenuation

NOTE: This parameter is not supported in SolidWorks 2011 and later.

Ambient

Light source ambient intensity

Specular

Light source specular intensity

SpotExponent

Spot exponent

NOTE: This parameter is not supported in SolidWorks 2011 and later.

BDisable

Light source disabled

Return Value

True if setting the light source properties is successful, false if not

Remarks

This method is similar to IModelDoc2::LightSourcePropertyValues and IModelDoc2::ILightSourcePropertyValues, except using this method you can pass each argument individually.

 

See Also

Availability

SolidWorks 2001Plus FCS, Revision Number 10.0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   SetLightSourcePropertyValuesVB Method (IModelDoc2)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2012 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.