Description This function retrieves the description string for a specific parameter of a Source Primitive node.
Syntax parmDesc = SourcePrimGetParmDescription( spNode, parmIndex )
Parameters parmDesc (String) Returned parameter description string.
spNode As Long Node number of the Source Primitive being queried.
parmIndex As Long Parameter index whose description string is being retrieved.
Example The example below demonstrates how to determine if a node is a Source Primitive type, retrieve the number of parameters, and then iterate over all parameters and print the description string for the current parameter.
Sub Main
'Source being queried Dim srcNode As Long srcNode = FindFullName( "Optical Sources.Point Source (incoherent)" )
'Is this a source primitive? Dim spType As String spType = SourcePrimGetTypeSource(srcNode) If spType = "Detailed" Then Print "Source is a Detailed Source type. Stopping script." End End If
'Retrieve number of parameters and print the parameter descriptions Print "Source Primitive type: " & spType Print "Parameter" & Chr(9) & "Desc." Dim curparm As Long For curparm = 0 To SourcePrimGetParmCount(srcNode)-1 Print curparm; Print SourcePrimGetParmDescription(srcNode, curparm) Next
End Sub
See Also Source Primitive Script Commands
|