Description Adds an afocal lens module surface type to the document.
Syntax LMNode = ModulePerfLensAfocalAdd( ent, mag )
Parameters LMNode (Long) Node number of the afocal lens module surface type added to the document.
ent As T_ENTITY Data structure containing generic information about the surface (name, description, traceable, etc.).
mag As Double Magnification at which the afocal 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
|