DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Vertical Splits

API method: ILDXSheetFrame5.VerticalSplits

Treename: Sheets.LdvSheet1.

2 code examples follow.

Example 1: [3613] Vertical splits

 ' from Samples/Src/LDXAPIExamples/Example_LDXSheetFrame.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Sheets.LdvSheet1.", "LDXSheetFrame~VerticalSplits", "[3613] Vertical splits")>
 Public Shared Sub ChangeVerticalSplits(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

     If ldxDocument.GetLDXObject("Sheets.LdvSheet1.") Is Nothing Then
         MsgBox("Relevant sheet not found. Please reload the .ld3 file.")
         Exit Sub
     End If

     ' delete old frames
     For Each frame As DigiPara.LDX.LDXSheetFrame In ldxDocument.Sheets.ActiveSheet
         If frame.DeveloperName = "VERTICAL_SPLIT" Then
             frame.Object.RemoveMe()
         End If
     Next

     Dim SPLIT_COUNT = 3

     With ldxDocument.Sheets.ActiveSheet
         ' Create three new frames with splits set up
         For i As Integer = 1 To SPLIT_COUNT
             With .Add(DigiPara.LDX.SheetAddOptions.saoCalculateDefaultPlacement)
                 .Reset(DigiPara.LDX.SheetFrameViewType.shfvtVertical, DigiPara.LDX.SheetFrameViewDirections.shfvdToFrontWall, DigiPara.LDX.SheetFrameResetOptions.shfrrstInitText)
                 With .VerticalSplits
                     .SPLITS_MODE = .SPLITS_MODE Or DigiPara.LDX.SheetFrameVerticalSplitsModes.sfvsmSettingsInUse
                     .SPLIT_COUNT = SPLIT_COUNT
                     .SHOW_SPLIT = i

                     ' extra distance to show at top and bottom, making the views overlap
                     .DZ_TOP = 1000
                     .DZ_BOTTOM = 1000
                 End With
                 .DeveloperName = "VERTICAL_SPLIT"
                 .CalculateModelBarrierAcquire()
             End With
         Next
     End With
 End Sub

Example 2: [3613] Vertical splits for Head and Pit views

 ' from Samples/Src/LDXAPIExamples/Example_LDXSheetFrame.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Sheets.LdvSheet1.", "LDXSheetFrame~VerticalSplits", "[3613] Vertical splits for Head and Pit views")>
 Public Shared Sub ChangeVerticalSplitsHeadPit(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

     If ldxDocument.GetLDXObject("Sheets.LdvSheet1.") Is Nothing Then
         MsgBox("Relevant sheet not found. Please reload the .ld3 file.")
         Exit Sub
     End If

     ' delete old frames
     For Each frame As DigiPara.LDX.LDXSheetFrame In ldxDocument.Sheets.ActiveSheet
         If frame.DeveloperName = "VERTICAL_SPLIT" Then
             frame.Object.RemoveMe()
         End If
     Next

     ' *********************************************
     ' Note: ChangeVerticalSectionHeadPit is probably what you want
     '   this sample creates two separate frames for head and pit
     '   the other sample creates a single frame that shows both in one frame
     ' ********************************************* 

     With ldxDocument.Sheets.ActiveSheet
         ' Create pit view: Use a high split count, show lowest split
         With .Add(DigiPara.LDX.SheetAddOptions.saoCalculateDefaultPlacement)
             .Reset(DigiPara.LDX.SheetFrameViewType.shfvtVertical, DigiPara.LDX.SheetFrameViewDirections.shfvdToLeftWall, DigiPara.LDX.SheetFrameResetOptions.shfrrstInitText)
             With .VerticalSplits
                 .SPLITS_MODE = .SPLITS_MODE Or DigiPara.LDX.SheetFrameVerticalSplitsModes.sfvsmSettingsInUse
                 .SPLIT_COUNT = 10000
                 .SHOW_SPLIT = 1

                 ' make sure we go up to the lowest floor, no matter how deep the pit is
                 .SNAP_DISTANCE = 1.0E+30

                 ' extra distance to show at top (negative values are also accepted)
                 .DZ_TOP = 2000

             End With
             .DeveloperName = "VERTICAL_SPLIT"
             .CalculateModelBarrierAcquire()
         End With

         ' create head view: Use a high split count, show highest split
         With .Add(DigiPara.LDX.SheetAddOptions.saoCalculateDefaultPlacement)
             .Reset(DigiPara.LDX.SheetFrameViewType.shfvtVertical, DigiPara.LDX.SheetFrameViewDirections.shfvdToLeftWall, DigiPara.LDX.SheetFrameResetOptions.shfrrstInitText)
             With .VerticalSplits
                 .SPLITS_MODE = .SPLITS_MODE Or DigiPara.LDX.SheetFrameVerticalSplitsModes.sfvsmSettingsInUse
                 .SPLIT_COUNT = 10000
                 .SHOW_SPLIT = .SPLIT_COUNT

                 ' make sure we go down to the highest floor, no matter how high the head and machine room are
                 .SNAP_DISTANCE = 1.0E+30

                 ' extra distance to show at bottom (negative values are also accepted)
                 .DZ_BOTTOM = 2000
             End With
             .DeveloperName = "VERTICAL_SPLIT"
             .CalculateModelBarrierAcquire()
         End With
     End With
 End Sub