|
DigiPara Liftdesigner LDX API
|
API method: ILDXEntry5.HallButtonCount
Treename: Shaft0.Entries1.E1.Panel7.
' from Samples/Src/LDXAPIExamples/Example_LDXEntry.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Entries1.E1.Panel7.", "LDXEntry~HallButtonCount", "Add more hall buttons")>
Public Shared Sub AdditionalHallButton(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Shaft0.") Is Nothing Then
MsgBox("Shaft not found! Please reload the relevant .ld3 file.")
Exit Sub
End If
With ldxDocument.Shaft.GetEntries(1).Item(0)
If .HallButtonCount <= 7 Then
' increase count
.HallButtonCount = 8
' activate
With .GetHallButton(7)
.Object.ActivateParent()
.Comp.ChangePartRID64(4, 0)
.HBPosition = .HBPosition Or DigiPara.LDX.HallButtonPositionModes.hbpmLeft And Not DigiPara.LDX.HallButtonPositionModes.hbpmRight
End With
Else
' deactivate
.HallButtonCount = 7
End If
.Object.SendChangeNotification("", "")
End With
End Sub