Description This command sets the configuration variable value for a given configuration.
Syntax SetConfigValue varIndex, configIndex, configVal
Parameters varIndex As Long Index of the variable whose configuration value is being set.
configIndex As Long Index of the configuration for which the variable value is being set.
configVal As Double Value of the variable at varIndex for the configuration at configIndex.
Example The following example loops over a range of configuration values for a given variable and performs a raytrace and analysis at each value step.
Sub Main
ClearOutputWindow
Dim detNode As Long detNode = FindFullName( "Geometry.Plane.Surface" )
Dim curVal As Double, maxVal As Double, minVal As Double Dim numSteps As Long minVal = 10 maxVal = 30 numSteps = 10
Print "ConfigVal" & Chr(9) & "Power" For curVal = minVal To maxVal Step (maxVal-minVal)/(numSteps-1) EnableTextPrinting False DeleteRays() SetConfigValue 0, 2, curVal TraceCreate() EnableTextPrinting True Print curVal & Chr(9) & GetSurfIncidentPower( detNode ) Next curVal
End Sub
See Also
|