Hide Table of Contents
SetLightSourcePropertyValuesVB Method (IModelDoc2)

Sets the light source property values.

.NET Syntax

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

Example

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) 2019 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.