|
Description
Returns the string description of the i'th parameter used to define the element primitive node being queried. Example parameter descriptions are "Radii", "Length", "Height", etc. The parameters for each element primitive type can be found on the Create New Element Primitive help page.
Syntax
pDesc = ElemGetParmDescription(epNode, ii)
Parameters
pDesc (String)
ii'th parameter string description of the element primitive being queried.
epNode As Long
Node number of the element primitive being queried.
ii As Variant
ii'th parameter of the element primitive node being queried. This argument can either be the zero-based index identifier of the parameter or the string name identifier of the parameter as returned by the ElemGetParmName function.
Remarks
If invalid arguments are encountered during execution the following error messages will be set and execution is halted:
"Error: Invalid entity array number or array index out of bounds."
Indicates that argument epNode is not an element primitive or does not exist.
"Error: Parameter index is out of bounds."
Indicates that argument ii is not a valid parameter for the element primitive.
Example
The following example creates a Rod type element primitive, loops over the element primitive parameters and prints each parameter name, description and value to the output window.
Sub Main
Dim epNode As Long, ent As T_ENTITY, pCount As Long
ClearOutputWindow
InitEntity ent
ent.name = "Rod 01"
ent.description = "A Rod type Element Primitive"
epNode = ElemAddRod( ent )
pCount = ElemGetParmCount( epNode )
Print "EP Name: " & GetName( epNode )
Print "EP Description: " & GetDescription( epNode )
Print "Element parameter count: " & pCount
For ii = 0 To pCount-1
Print "Parameter " & ii+1 & ": "
Print " Name: " & ElemGetParmName( epNode, ii )
Print " Description: "& ElemGetParmDescription(epNode, ii )
Print " Value: " & ElemGetParmValue( epNode, ii )
Next
Update
End Sub
The code above prints the following information to the output window:
EP Name: Rod 01
EP Description: A Rod type Element Primitive
Element parameter count: 3
Parameter 1:
Name: a
Description: Radius
Value: 1
Parameter 2:
Name: b
Description: Length
Value: 2
Parameter 3:
Name: d
Description: Location of element origin
Value: 2
Parameter List
|
ID #
|
String Name
|
Description
|
Possible Values
|
|
Beveled Wedge
|
|
0
|
a
|
X semi-aperture
|
value > 0
|
|
1
|
b
|
Y semi-aperture
|
value > 0
|
|
2
|
c
|
Bevel Thickness
|
value > 0
|
|
3
|
d
|
Wedge Angle (degrees)
|
0 < value > 85
|
|
Block
|
|
0
|
a
|
X semi-aperture
|
value > 0
|
|
1
|
b
|
Y semi-aperture
|
value > 0
|
|
2
|
c
|
Z semi-aperture
|
value > 0
|
|
3
|
d
|
Location of origin
|
0
1
2
3
4
5
6
|
(+x)right side
(-x)left side
(+y)top side
(-y)bottom side
(+z)front side
(-z)back side
center of block
|
|
Circular Pyramid
|
|
0
|
a
|
Base semi-aperture
|
value > 0
|
|
1
|
b
|
Height
|
value > 0
|
|
Coil
|
|
0
|
a
|
Helix Radius
|
value > 0
|
|
1
|
b
|
Circle Radius
|
Helix Radius/2 > value > 0
and
Pitch/2 > value > 0
|
|
2
|
c
|
Pitch
|
value > 0
|
|
3
|
d
|
Number of Turns
|
value > 0
|
|
Compound Parabolic Concentrator
|
|
The CPC element primitive does not use the standard Get/SetParmValue commands due to the complex parameter dependencies which define the geometry. Please see the CPC specific commands:
ElemGetCPC
ElemSetCPC
|
|
Cube
|
|
0
|
a
|
Semi-aperture
|
value > 0
|
|
1
|
d
|
Location of Origin
|
0
1
2
3
4
5
6
|
(+x)right side
(-x)left side
(+y)top side
(-y)bottom side
(+z)front side
(-z)back side
center of cube
|
|
Cylinder
|
|
0
|
a
|
Semi-aperture
|
|
value > 0
|
|
1
|
b
|
Length
|
|
value > 0
|
|
2
|
c
|
Location of cylinder surface
|
0
1
2
|
(+Z) front end
(-Z) back end
center of cylinder surface
|
|
Cylinder Lens
|
|
0
|
a
|
X semi-ap
|
value > 0
|
|
1
|
b
|
Y semi-ap
|
value > 0
|
|
2
|
c
|
Z thickness
|
value > 0
|
|
3
|
d
|
Y curvature
|
value <= 0.9 / Y semi-ap
|
|
4
|
e
|
Aperture shape
|
0
1
|
Ellipse
Rectangle
|
|
5
|
f
|
Element origin surface
|
0
1
|
First surface
Second surface
|
|
6
|
g
|
Lens orientation
|
0
1
|
Plane at first surface
Y Toroid at first surface
|
|
Frustum
|
|
0
|
a
|
Base X semi-ap
|
value > 0
|
|
1
|
b
|
Base Y semi-ap
|
value > 0
|
|
2
|
c
|
Top X semi-ap
|
value > 0
|
|
3
|
d
|
Top Y semi-ap
|
value > 0
|
|
4
|
e
|
Depth
|
value > 0
|
|
5
|
f
|
Type
|
0
1
|
Ellipse
Rectangle
|
|
Ellipsoid
|
|
0
|
a
|
X semi-aperture
|
value > 0
|
|
1
|
b
|
Y semi-aperture
|
value > 0
|
|
2
|
c
|
Z semi-aperture
|
value > 0
|
|
Hemisphere Shell
|
|
0
|
a
|
Outer radius
|
value > 0
|
|
1
|
b
|
Wall thickness
|
Outer Radius > value > 0
|
|
Hemisphere Solid
|
|
0
|
a
|
Radius
|
value > 0
|
|
1
|
b
|
Element origin surface
|
0
1
|
First Surface
Second Surface
|
|
2
|
c
|
Hemisphere Orientation
|
0
1
|
Plane at first surface
Hemisphere vertex at first surface
|
|
Hemisphere Surface
|
|
0
|
a
|
Radius
|
value > 0
|
|
Ideal Lens Module
|
|
0
|
a
|
X semi-aperture
|
value > 0
|
|
1
|
b
|
Y semi-aperture
|
value > 0
|
|
2
|
c
|
Hole X semi-aperture
|
0 < value < X semi-aperture
|
|
3
|
d
|
Hole Y semi-aperture
|
0 < value < Y semi-aperture
|
|
4
|
shape
|
Aperture shape
|
0
1
|
rectangular/square
elliptical/circular
|
|
5
|
type
|
Lens module type
|
0
1
2
3
4
|
Simplified Infinite Object (non-Eikonal)
Perfect Infinite Object (Eikonal)
Perfect Finite Conjugate (Eikonal)
Perfect Afocal (Eikonal)
Sphere Surface (Eikonal)
|
|
If type = 0 [Simplified Infinite Object (non-Eikonal)]
|
|
6
|
FD
|
Focal Distance
|
Any value
|
|
7
|
Mapping
|
Mapping between input angle and image height
|
0
1
2
|
F-Tan (theta)
F-Sin (theta)
F-theta
|
|
If type = 1 [Perfect Infinite Object (Eikonal)]
|
|
6
|
FL
|
Focal Length
|
Any value
|
|
7
|
This parameter is unused.
|
|
If type = 2 [Perfect Afocal (Eikonal)]
|
|
6
|
FL
|
Focal Length
|
Any value
|
|
7
|
M
|
Magnification
|
Any value
|
|
If type = 3 [Perfect Finite Object (Eikonal)]
|
|
6
|
M
|
Pupil magnification (inverse angular magnification)
|
Any value
|
|
7
|
This parameter is unused.
|
|
If type = 4 [Sphere Surface (Eikonal)]
|
|
6
|
Radius
|
Radius of curvature
|
Any value
|
|
7
|
This parameter is unused.
|
|
Multimode Fiber Optic
|
|
0
|
a
|
Fiber core semi-aperture
|
value > 0
|
|
1
|
b
|
Outer semi-aperture
|
0 < value < core semi-aperture
|
|
2
|
c
|
Length
|
value > 0
|
|
3
|
d
|
Location of element origin
|
0
1
2
|
(+Z) front end
(-Z) back end
center of element
|
|
N-Sided Extruded Solid
|
|
0
|
a
|
Number of sides
|
1 < value < 1000
|
|
1
|
b
|
Semi-aperture
|
value > 0
|
|
2
|
c
|
Length
|
value > 0
|
|
3
|
d
|
Location of element origin
|
0
1
2
|
(+Z) front end
(-Z) back end
center of solid element
|
|
N-Sided Extruded Surface
|
|
0
|
a
|
Number of sides
|
2 < value < 1000
|
|
1
|
b
|
Semi-aperture
|
value > 0
|
|
2
|
c
|
Length
|
value > 0
|
|
3
|
d
|
Location of element origin
|
0
1
2
|
(+Z) front end
(-Z) back end
center of solid element
|
|
N-Sided Pipe
|
|
0
|
a
|
Number of sides
|
2 < value < 1000
|
|
1
|
b
|
Outer Semi-aperture
|
value > 0
|
|
2
|
c
|
Wall thickness
|
0 < value < (semi-ape*cos(π/Nsides)
|
|
3
|
d
|
Length
|
value > 0
|
|
4
|
e
|
Location of element origin
|
0
1
2
|
(+Z) front end
(-Z) back end
center of pipe
|
|
N-Sided Plane
|
|
0
|
a
|
Number of sides
|
2 < value < 1000
|
|
1
|
b
|
Semi-aperture
|
value > 0
|
|
N-Sided Pyramid Solid
|
|
0
|
a
|
Number of sides
|
2 < value < 1000
|
|
1
|
b
|
Semi-aperture
|
value > 0
|
|
2
|
c
|
Height
|
value > 0
|
|
Parabolic Trough
|
|
0
|
a
|
Full height
|
value > 0
|
|
1
|
b
|
Full width
|
value > 0
|
|
2
|
f
|
Focal length
|
Any value
|
|
Paraboloid
|
|
0
|
a
|
Semi-aperture
|
value > 0
|
|
1
|
f
|
Focal length
|
Any value
|
|
Pipe
|
|
0
|
a
|
Outer radius
|
value > 0
|
|
1
|
b
|
Wall thickness
|
Outer Radius > value > 0
|
|
2
|
c
|
Length
|
value > 0
|
|
3
|
d
|
Location of origin
|
0
1
2
|
(+z)front end
(-z)back end
center of rod
|
|
Plane
|
|
0
|
a
|
X Semi-aperture
|
value > 0
|
|
1
|
b
|
Y Semi-aperture
|
value > 0
|
|
2
|
c
|
Aperture shape
|
0
1
|
rectangular/square
elliptical/circular
|
|
3
|
d
|
Hole X semi-ap
|
value > 0
|
|
4
|
e
|
Hole Y semi-ap
|
value > 0
|
|
Plane with N-Sided Hole
|
|
0
|
a
|
X Semi-aperture
(semi-width)
|
value > 0
|
|
1
|
b
|
Y Semi-aperture
(semi-height)
|
value > 0
|
|
2
|
c
|
Aperture shape
|
0
1
|
rectangular/square
elliptical/circular
|
|
3
|
d
|
Number of sides
|
2 < value< 1000
|
|
4
|
e
|
Hole Semi-aperture
|
0 < value < (X semi-ape AND Y semi-ape)
|
|
Rod
|
|
0
|
a
|
Radius
|
value > 0
|
|
1
|
b
|
Length
|
value > 0
|
|
2
|
d
|
Location of origin
|
0
1
2
|
(+z)front end
(-z)back end
center of rod
|
|
Sphere
|
|
0
|
a
|
Radius
|
value > 0
|
|
Truncated Ellipsoid
|
|
0
|
a
|
X semi-ap
|
value > 0
|
|
1
|
b
|
Y semi-ap
|
value > 0
|
|
2
|
c
|
Z semi-ap
|
value > 0
|
|
3
|
d
|
Z back face
|
|value| < Z semi-ap
|
|
4
|
e
|
Z front face
|
Z back face < |value|
|
|
Torus
|
|
0
|
a
|
Major radius
|
value > 0
|
|
1
|
b
|
Minor radius
|
Major radius > value > 0
|
|
Wedge
|
|
0
|
a
|
Wedge angle (deg)
|
0 < value < 180
|
|
1
|
b
|
Side length
|
value > 0
|
|
2
|
c
|
Thickness
|
value > 0
|
|
3
|
d
|
Location of origin
|
0
1
2
3
4
5
6
|
(+x) right side
(-x) left side
(+y) top surface
wedge vertex
(+z) front side
(-z) back side
center of wedge
|
|
4
|
e
|
Shape of top surface
|
plane / curve
|
See Also
Element Primitive Script Commands
Element Composite (boolean) Script Commands
|
Copyright © Photon Engineering, LLC
|
|