Description This function adds a new Multimode Fiber Optic type Element Primitive node and returns the node number of the added object.
Syntax epNode = ElemAddMultimodeFiberOptic( tEnt )
Parameters epNode (Long) Node number of the element primitive that was added.
tEnt As T_ENTITY Data structure containing the generic entity information (name, parent, description, etc.) required to add a node to the object tree.
Example The example below shows how to initialize a T_ENTITY structure, add a Multimode Optical Fiber type element primitive and then modify the element primitive parameters. Sub Main
'Initialize the generic element data Dim tEnt As T_ENTITY InitEntity( tEnt ) tEnt.name = "EP Multimode Fiber" tEnt.parent = 2 'Geometry folder
'Create the element primitive node Dim epNode As Long epNode = ElemAddMultimodeFiberOptic( tEnt )
'Core and cladding materials Dim coreMat As Long, cladMat As Long coreMat = FindMaterial( "Core" ) cladMat = FindMaterial( "Cladding" )
'Modify the element primitive parameters ElemSetParmValue( epNode, 0, 0.5 ) 'Fiber core semi-aperture ElemSetParmValue( epNode, 1, 0.5175 ) 'Outer semi-aperture ElemSetParmValue( epNode, 2, 10 ) 'Length ElemSetParmValue( epNode, 3, 1 ) 'Location of origin: 0 = (+Z)front end, 1 = (-Z)back end, 2 = center of element
'Update the model Update
End Sub
See Also Element Primitive Script Commands Element Composite (boolean) Script Commands
|