|
Description
Sets one or more parameters for a detector entity using a parameter string of the form "Param1=Val1 : Param2=Val2...".
Syntax
DESetParams deNode, params
Parameters
deNode As Long
Node number of the detector entity being modified.
params As String
String containing the parameter and value pairs separated by colons. The params string has the form, "Param1=Val1 : Param2=Val2 : ..."
Example
The following example demonstrates the use of several detector entity specific commands to create a new detector entity, assign parameters (using two methods), retrieve parameter information, and perform and display the analysis results.
Sub Main
Dim deType As String, params As String, deName As String, deDesc As String, paramNames() As String
Dim deNode As Long
ClearOutputWindow
'Set basic information create a detector entity
deType = "Cylinder"
deName = "Cylinder Detector Entity"
deDesc = "Scripted cylinder D.E."
params = ""
deNode = DECreate( deType, params, deName, deDesc )
'Set parameters for the D.E. using individual parameter name and value
DESetParam deNode, "ADim", 31
DESetParam deNode, "BDim", 51
DESetParam deNode, "Calculation", "Irradiance"
DESetParam deNode, "CalcTiming", "On Request"
DESetParam deNode, "Sidedness", "Negative Side"
DESetParam deNode, "AbsorbRay", "True"
'Set parameters for the D.E.using a single parameter string
'draw parameters
params = params & "Draw=True : "
params = params & "DrawMode=Fill : "
params = params & "DrawColor=(127,255,0) : "
'cylinder specific parameters
params = params & "PrimaryAxis=X : "
params = params & "SecondaryAxis=Y : "
params = params & "AIsPrimary=True : "
params = params & "Radius=5 : "
params = params & "LMin=-2 : "
params = params & "LMax=4 : "
params = params & "AziMin=-90 : "
params = params & "AziMax=45"
DESetParams deNode, params
'Update the document with the changes
Update
'Retrieve and print information from the detector entity
Print DEGetType( deNode ) & " type detector entity created at node number " & deNode
Dim jj As Long
DEGetParamNames deNode, paramNames
Print "Parameter List"
Print Chr(9) & "Name" & Chr(9) & "Value"
For jj = 0 To UBound( paramNames, 1 )
Print Chr(9) & paramNames( jj ) & Chr(9) & DEGetParam( deNode, paramNames( jj ) )
Next jj
'Trace source, perform detector entity analysis and put the result in the visualization view
Dim arnNode As Long, cnt As Long, success As Boolean
Print "Performing raytrace..."
ARNDeleteAllNodes
EnableTextPrinting False
DeleteRays()
TraceCreate()
EnableTextPrinting True
Print "Performing D.E. analysis..."
cnt = DEPerformAnalysis( deNode )
Print cnt & " rays included in D.E. analysis..."
arnNode = DEGetMostRecentARNNum( deNode )
Print "D.E. analysis results in ARN node " & arnNode
Print "Displaying D.E. results in visualization view..."
success = ARNDisplayInVisualizationView( arnNode, "" )
Print "All done..."
End Sub
Parameter List
|
Parameter Name
|
Possible Values
|
Default Value
|
|
Resolution
|
|
ADim
|
2 < ADim < 8192
|
21
|
|
BDim
|
2 < BDim < 8192
|
21
|
|
Analysis
|
|
Calculation
|
Irradiance
ColorImageXYZ
Illuminance
|
Irradiance
|
|
CalTiming
|
During Trace
At Trace End
On Request
|
On Request
|
|
Sidedness
|
Both Sides
Positive Side
Negative Side
|
Both Sides
|
|
AbsorbRay
|
True
False
|
True
|
|
Illuminance
|
|
IllumUnits
|
Lumens/area
LUX
Phot
Foot-Candles
Arbitrary Units
|
LUX
|
|
DetRespSpect
|
-None-
Detector node ID
|
-None-
|
|
DetRespMult
|
Any number
|
1
|
|
Visualization
|
|
Draw
|
True
False
|
True
|
|
DrawMode
|
Fill
Line
Point
|
Fill
|
|
DrawColor
|
( R, G, B )
R, G, and B are integers between 0 and 255
|
(166, 202, 240)
|
|
Plane Specific
|
|
XMin
|
Number less than XMax
|
-1
|
|
XMax
|
Number greater than XMin
|
1
|
|
YMin
|
Number less than YMax
|
-1
|
|
YMax
|
Number greater than YMin
|
1
|
|
Cylinder Specific
|
|
PrimaryAxis
|
X
Y
Z
Can't be the same as SecondaryAxis
|
Y
|
|
SecondaryAxis
|
X
Y
Z
Cant be the same as PrimaryAxis
|
Z
|
|
AIsPrimary
|
True
False
|
False
|
|
Radius
|
Number greater than zero
|
1
|
|
LMin
|
Number less than LMax
|
-1
|
|
LMax
|
Number greater than LMin
|
1
|
|
AziMin
|
-180 < AziMin < 180
Must be less than AziMax
|
-180
|
|
AziMax
|
-180 < AziMax < 180
Must be greater than AziMin
|
180
|
|
Sphere Specific
|
|
PolarAxis
|
X
Y
Z
Can't be the same as OtherAxis
|
Y
|
|
OtherAxis
|
X
Y
Z
Cant be the same as PolarAxis
|
Z
|
|
AIsPolar
|
True
False
|
False
|
|
Radius
|
Number greater than zero
|
1
|
|
PolarMin
|
-90 < PolarMin < 90
Must be less than PolarMax
|
-90
|
|
PolarMax
|
-90 < PolarMax < 90
Must be greater than PolarMin
|
90
|
|
AziMin
|
-180 < AziMin < 180
Must be less than AziMax
|
-180
|
|
AziMax
|
-180 < AziMax < 180
Must be greater than AziMin
|
180
|
|
Cone Specific
|
|
PrimaryAxis
|
X
Y
Z
Cant be the same as SecondaryAxis
|
Y
|
|
SecondaryAxis
|
X
Y
Z
Cant be the same as PrimaryAxis
|
Z
|
|
AIsPrimary
|
True
False
|
False
|
|
BaseRadius
|
Number greater than zero
|
1
|
|
Height
|
Any number (including zero)
|
0.5
|
|
FRMin
|
0 < FRMin < 1
Must be less than FRMax
|
0
|
|
FRMax
|
0 < FRMax < 1
Must be greater than FRMin
|
1
|
|
AziMin
|
-180 < AziMin < 180
Must be less than AziMax
|
-180
|
|
AziMax
|
-180 < AziMax < 180
Must be greater than AziMin
|
180
|
|
3D Box Specific
|
|
ZMin
|
Number less than ZMax
|
-1
|
|
ZMax
|
Number greater than ZMin
|
1
|
|
ZDim
|
Integer > 0
|
10
|
|
InclPreTrace
|
When True, power from a source embedded within the 3D box is not included in the InFlux calculation (it never enters the walls of the starting cell). The InclPreTrace option makes a Pre-Raytrace analysis of the power starting within the 3D box and the resulting values are used as an offset to remove the starting power from the Absorption calculation.
|
True
|
|
InclPostTrace
|
When True, power from rays embedded within the 3D box at the end of the raytrace is not included in the OutFlux calculation (the contributing rays never exit the walls of their final cell). The InclPostTrace option makes a Post-Raytrace analysis of rays stopped inside the 3D box and the resulting values are used as an offset to remove this power from the Absorption calculation. Keep in mind that rays may have stopped within the volume for a variety of physical and non-physical reasons (ex. raytrace controls).
|
False
|
See Also
DEAddOp
DECreate
DEDeleteIthOp
DEGetIthOp
DEGetMostRecentARNNum
DEGetOpCount
DEGetParam
DEGetParamNames
DEGetParams
DEGetType
DEPerformAnalysis
DESetIthOp
DESetParam
IsDetectorEntity
|
Copyright © Photon Engineering, LLC
|
|