|
DigiPara Liftdesigner LDX API
|
API method: ILDXFloorLevels5.InsertAt
' from Samples/Src/LDXAPIExamples/Example_GroupsConfiguration.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "", "LDXFloorLevels~InsertAt", "Add or remove floors")>
Public Shared Sub AddOrRemoveFloors(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.FloorLevels Is Nothing Then
MsgBox("No floors found.")
Return
End If
If MsgBox("Add floor at the top? If not the top floor will be deleted.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
' Add floor level at the top
ldxDocument.FloorLevels.InsertAt(ldxDocument.FloorLevels.Count)
Else
' Remove floor level at top
ldxDocument.FloorLevels.RemoveAt(ldxDocument.FloorLevels.Count - 1)
End If
ldxDocument.FloorLevels.Comp.CalculateModel(DigiPara.LDX.CompCalculateModelModes.crvmFireEvents)
End Sub