|
DigiPara Liftdesigner LDX API
|
API method: ILDXCarLight5.CarLightTab
Treename: Shaft0.Car.Design.Ceiling.Lights.
' from Samples/Src/LDXAPIExamples/Example_LDXCarLights.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Car.Design.Ceiling.Lights.", "LDXCarLight~CarLightTab", "Change arrangement")>
Public Shared Sub ChangeArrangement(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.Car.Design.Ceiling.Lights.") Is Nothing Then
MsgBox("Car lights not found!")
Exit Sub
End If
With DirectCast(ldxDocument.GetLDXObject("Shaft0.Car.Design.Ceiling.Lights.").LDXType, DigiPara.LDX.LDXCarLights)
' Manually set lights arrangement
.Object.SetValue("COMPONENTS_MODE", 1)
' Change number of lights
.Object.SetValue("LIST_COUNT", 5)
With DirectCast(ldxDocument.GetLDXObject("Shaft0.Car.Design.Ceiling.Lights.L0.").LDXType, DigiPara.LDX.LDXCarLight)
' Change light properties individually
.Mode = .Mode Or DigiPara.LDX.CarLightModes.clDifferentType
' Sideways displacement from the wall
.Object.SetValue("X0", 480)
' Upward displacement from the wall
.Object.SetValue("Y0", 980)
' Width
.CarLightTab.SetValue("CL_DX", 150)
' Height
.CarLightTab.SetValue("CL_DZ", 15)
.Object.SendChangeNotification("", "")
End With
' Sideways displacement and upward displacement from the wall of other lights
With ldxDocument.GetLDXObject("Shaft0.Car.Design.Ceiling.Lights.L1.")
.Object.SetValue("X0", 120)
.Object.SetValue("Y0", 980)
End With
With ldxDocument.GetLDXObject("Shaft0.Car.Design.Ceiling.Lights.L2.")
.Object.SetValue("X0", 480)
.Object.SetValue("Y0", 1633)
End With
With ldxDocument.GetLDXObject("Shaft0.Car.Design.Ceiling.Lights.L3.")
.Object.SetValue("X0", 480)
.Object.SetValue("Y0", 326)
End With
With ldxDocument.GetLDXObject("Shaft0.Car.Design.Ceiling.Lights.L4.")
.Object.SetValue("X0", 840)
.Object.SetValue("Y0", 980)
End With
End With
End Sub