Navigation: Scripting Reference Manual > Functions & Subroutines > ModulePerfLensAfocalSet

 

ModulePerfLensAfocalSet

 

Contact Us: fredsupport@photonengr.com

 

Description

Sets the properties of an afocal lens module surface.

 

 

Syntax

ModulePerfLensAfocalSet LMNode, ent, mag

 

 

Parameters

LMNode As Long

Node number of the afocal lens module surface being modified.

 

ent As T_ENTITY

Data structure containing generic information about the surface (name, description, traceable, etc.).

 

mag As Double

Magnification at which the lens module is operating.

 

 

Example

The following example demonstrates how to create, modify and retrieve information from an afocal lens module surface.

 

Sub Main

 

          Dim ent As T_ENTITY

          Dim CENode As Long, LMAfocal As Long

          Dim mag As Double

 

          'Add a custom element to store the LM surface

          ent.name = "Afocal LM"

          ent.Description = "Lens module representing an afocal lens"

          ent.parent = 2 'geometry

          ent.axesDrawable = False

          ent.limitsDrawable = False

          ent.traceable = True

          ent.neverTraceable = False

          CENode = AddCustomElement( ent )

 

          'Add an afocal lens module surface type

          ent.name = "Surf 1"

          ent.Description = ""

          ent.parent = CENode

          LMAfocal = ModulePerfLensAfocalAdd( ent, 5 )

          Print "Afocal LM added:"

          Print Chr(9) & "Node number: " & LMAfocal

 

          'Update the document

          Update

 

          'Modify afocal lens module radius and retrieve information

          ModulePerfLensAfocalSet LMAfocal, ent, 10

          ModulePerfLensAfocalGet LMAfocal, ent, mag

          Print Chr(9) & "New magnification: " & mag

 

End Sub

 

 

See Also

ModulePerfLensAfocalAdd

ModulePerfLensAfocalGet

ModulePerfLensFiniteAdd

ModulePerfLensFiniteGet

ModulePerfLensFiniteSet

ModulePerfLensInfiniteAdd

ModulePerfLensInfiniteGet

ModulePerfLensInfiniteSet

ModuleSphereSurfAdd

ModuleSphereSurfGet

ModuleSphereSurfSet

 

 

 

 

 

Copyright © Photon Engineering, LLC