DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Add another refuge space

API method: ILDXShaft5.REFUGE_SPACE_COUNT

Treename: Shaft0.RefugeSpace3.

 ' from Samples/Src/LDXAPIExamples/Example_LDXShaft.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.RefugeSpace3.", "LDXShaft~REFUGE_SPACE_COUNT", "Add another refuge space")>
 Public Shared Sub AdditionalRefugeSpace(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

     ' make refuge spaces visible
     For Each frame As DigiPara.LDX.LDXSheetFrame In ldxDocument.Sheets.ActiveSheet
         frame.VisibleProductGroups = frame.VisibleProductGroups Or DigiPara.LDX.SheetFrameProductGroups.shfpRefugeSpaces
     Next

     With ldxDocument.Shaft
         If .REFUGE_SPACE_COUNT < 4 Then
             ' increase count
             .REFUGE_SPACE_COUNT = 4
             ' activate
             .RefugeSpace(3).Object.Active = True
             ' move it into the other corner (CalculateModel clamps it so the space is in the shaft)
             .RefugeSpace(3).X0 = 20000
             .RefugeSpace(3).Y0 = 20000
         Else
             ' deactivate again
             .REFUGE_SPACE_COUNT = 3
         End If
     End With
 End Sub