|
DigiPara Liftdesigner LDX API
|
API method: ILDXObject5.ChangePartRID64
Treename: Shaft0.Entries1.E0.ShaftDoor.
' from Samples/Src/LDXAPIExamples/Example_LDXLandingDoor.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Entries1.E0.ShaftDoor.", "LDXObject~ChangePartRID64", "[4210] Change landing door")>
Public Shared Sub ChangeLandingDoor(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.Entries1.E0.ShaftDoor.") Is Nothing Then
MsgBox("Landing door not found!")
Exit Sub
End If
With ldxDocument.Shafts(0).GetEntries(DigiPara.LDX.WallType.wtFront)(0).LandingDoor
' Change landing door
.Object.ChangePartRID64(10, 0)
'Will change the door on all floors
.Object.SendChangeNotification("", "")
'ldxDocument.CalculateModel(DigiPara.LDX.CalculateModelModes.rcmCalcAndReport Or DigiPara.LDX.CalculateModelModes.rcmFireCalculatedEvent)
Dim ldxCarDoor As DigiPara.LDX.LDXCarDoor = ldxDocument.Shafts(0).Car.GetDoor(.Comp.Wall)
If ldxCarDoor Is Nothing Then
MsgBox("Cabin door not found!")
Exit Sub
End If
' Set compatible cabin door width
ldxCarDoor.SetCompatible64(Convert.ToInt64(.Door.DoorTypeTab.GetValue("DT_RID")), Convert.ToDouble(.Door.DoorDimTab.GetValue("DD_DW")))
' Set compatible cabin door depth
ldxCarDoor.DY = Convert.ToDouble(.Door.DoorTypeTab.GetValue("DT_DY_KS_MAX"))
' Set compatible cabin door height
ldxCarDoor.DoorHeight = .Height
' check car 2
If ldxDocument.Shafts(0).Car2 IsNot Nothing Then
Dim ldxCarDoor2 As DigiPara.LDX.LDXCarDoor = ldxDocument.Shafts(0).Car2.GetDoor(.Comp.Wall)
ldxCarDoor2.SetCompatible64(Convert.ToInt64(.Door.DoorTypeTab.GetValue("DT_RID")), Convert.ToDouble(.Door.DoorDimTab.GetValue("DD_DW")))
ldxCarDoor2.DY = Convert.ToDouble(.Door.DoorTypeTab.GetValue("DT_DY_KS_MAX"))
ldxCarDoor2.DoorHeight = .Height
End If
End With
End Sub