Description This data structure is used to specify the construction parameter values for an element primitive CPC.
Definition Type T_CPC_STRUCT ParamA as String ParamB as String Round as Boolean Solid as Boolean thickness as Double Thin as Boolean TroughSw as Double TrucLength_pc as Double ValA as Double ValB as Double
Members ParamA Specifies the interpretation of the value ValA. Please see the CPC help topic for information regarding the parameter meanings and valid A and B combinations. Options are: Input Semi-ape Output Semi-ape Length Acceptance Angle (deg) Concentration Ratio
ParamB Specifies the interpretation of the value ValB. Please see the CPC help topic for information regarding the parameter meanings and valid A and B combinations. Options are: Input Semi-ape Output Semi-ape Length Acceptance Angle (deg) Concentration Ratio
Round NOT CURRENTLY IMPLEMENTED Boolean indicating the CPC aperture type. True = Round, False = Trough.
Solid Boolean indicating whether the CPC is a solid body or hollow body type. True = Solid, False = Hollow.
thickness NOT CURRENTLY IMPLEMENTED Wall thickness of the CPC. This value is only applicable if the Thick member is True.
Thin NOT CURRENTLY IMPLEMENTED Boolean indicating whether the CPC is thick or thin walled. True = Thin, False = Thick.
TroughSw NOT CURRENTLY IMPLEMENTED Semi-width of the CPC. This value is only applicable if the Round member is False.
TrucLength_pc Truncation length as a percentage of the nominal CPC length.
ValA Numeric value of parameter A, whose interpretation is given by member ParamA.
ValB Numeric value of parameter B, whose interpretation is given by member ParamB.
Example The following example creates a CPC with the default settings, retrieves the values for each of the parameters and prints them to the output window, then applies new construction parameters to the CPC.
Sub Main()
Dim tCpc As T_CPC_STRUCT Dim tCpcData As T_CPC_DATA Dim tEnt As T_ENTITY Dim cpcNode As Long
' initialize and add new CPC node InitEntity( tEnt ) tEnt.name = "New CPC" cpcNode = ElemAddCPC( tEnt ) If cpcNode > 0 Then Print "CPC created at node " & cpcNode Else End End If
' update the document Update
' retrieve default CPC construction data ElemGetCPC( cpcNode, tCpcData ) Print "Input Semi-ap: " & Chr(9) & tCpcData.InputSw Print "Output Semi-ap: " & Chr(9) & tCpcData.OutputSw Print "Concentration Ratio: " & Chr(9) & tCpcData.ConcRatio Print "Length: " & Chr(9) & tCpcData.Length Print "Acceptance Angle: " & Chr(9) & tCpcData.Theta_deg Print "Focal Length: " & Chr(9) & tCpcData.FocalLength Print "Round Aperture?: " & Chr(9) & tCpcData.Round Print "Trough Semi-width: " & Chr(9) & tCpcData.TroughSw Print "Sold Body?: " & Chr(9) & tCpcData.Solid Print "Thin Wall?: " & Chr(9) & tCpcData.Thin Print "Wall Thickness: " & Chr(9) & tCpcData.thickness
' modify CPC construction parameters tCpc.ParamA = "Input Semi-ape" tCpc.ValA = 10 tCpc.ParamB = "Output Semi-ape" tCpc.ValB = 5 tCpc.Solid = False 'Solid or hollow body tCpc.Thin = False 'Thin or thick wall tCpc.thickness = 1.0 'If thick walled, gives thickness tCpc.Round = True 'Shape of the element (round or trough) tCpc.TroughSw = 1 'If trough, gives semi-width tCpc.TrucLength_pc = 100 'Truncated length (%) ElemSetCPC cpcNode, tCpc
Update
End Sub
See Also Element Primitive Scripting Commands
|