Navigation: Scripting Reference Manual > Functions & Subroutines > ModulePerfLensAfocalGet

 

ModulePerfLensAfocalGet

 

Contact Us: fredsupport@photonengr.com

 

Description

Retrieves information from an afocal lens module surface.

 

 

Syntax

ModulePerfLensAfocalGet LMNode, ent, mag

 

 

Parameters

LMNode As Long

Node number of the afocal lens module surface added to the document.

 

ent As T_ENTITY

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

 

mag As Double

Returned 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

ModulePerfLensAfocalSet

ModulePerfLensFiniteAdd

ModulePerfLensFiniteGet

ModulePerfLensFiniteSet

ModulePerfLensInfiniteAdd

ModulePerfLensInfiniteGet

ModulePerfLensInfiniteSet

ModuleSphereSurfAdd

ModuleSphereSurfGet

ModuleSphereSurfSet

 

 

 

 

 

Copyright © Photon Engineering, LLC