|
DigiPara Liftdesigner LDX API
|
API method: ILDXRoofFace5.Slope
Treename: Shaft0.Roof.RoofFace0
' from Samples/Src/LDXAPIExamples/Example_LDXRoof.vb
' common initialization for the rest of the samples
Private Shared Sub ActivateFrontRearOnly(roof As DigiPara.LDX.LDXRoof)
Dim roofFaceFront = roof.GetFace(DigiPara.LDX.WallType.wtFront)
Dim roofFaceRear = roof.GetFace(DigiPara.LDX.WallType.wtRear)
roofFaceFront.RoofFaceMode = roofFaceFront.RoofFaceMode Or DigiPara.LDX.RoofFaceModes.rfmEnabled
roofFaceRear.RoofFaceMode = roofFaceRear.RoofFaceMode Or DigiPara.LDX.RoofFaceModes.rfmEnabled
Dim roofFaceLeft = roof.GetFace(DigiPara.LDX.WallType.wtLeft)
Dim roofFaceRight = roof.GetFace(DigiPara.LDX.WallType.wtRight)
Dim roofFaceTop = roof.GetFace(DigiPara.LDX.WallType.wtTop)
roofFaceLeft.RoofFaceMode = roofFaceLeft.RoofFaceMode And Not DigiPara.LDX.RoofFaceModes.rfmEnabled
roofFaceRight.RoofFaceMode = roofFaceRight.RoofFaceMode And Not DigiPara.LDX.RoofFaceModes.rfmEnabled
roofFaceTop.RoofFaceMode = roofFaceTop.RoofFaceMode And Not DigiPara.LDX.RoofFaceModes.rfmEnabled
End Sub
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Roof.RoofFace0", "LDXRoofFace~Slope", "Change Roof Slope")>
Public Shared Sub ChangeRoofFaceSlope(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
Dim roof As DigiPara.LDX.LDXRoof = ldxDocument.Shaft.Room.Roof
ActivateFrontRearOnly(roof)
Dim roofFaceFront = roof.GetFace(DigiPara.LDX.WallType.wtFront)
Dim roofFaceRear = roof.GetFace(DigiPara.LDX.WallType.wtRear)
' change roof slope
If roofFaceFront.Slope < 0.7 Then
' you can set it by the mathematical slope; this corresponds to 45 degrees of inclination
roofFaceFront.Slope = 1
Else
' or by setting the inclination angle in radians
roofFaceFront.AlphaRad = 0.2
End If
End Sub