DigiPara Liftdesigner LDX API
Loading...
Searching...
No Matches
Remove forces

API method: ILDXForces5.Clear

Treename: Shaft0.Car.Frame.Buffer0.

 ' from Samples/Src/LDXAPIExamples/Example_LDXBuffer.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Car.Frame.Buffer0.", "LDXForces~Clear", "Remove forces")>
    Public Shared Sub RemoveForces(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

        If ldxDocument.GetLDXObject("Shaft0.Car.Frame.Buffer0.Force0.") Is Nothing Then
            MsgBox("Forces not found! Please reload the relevant .lde file.")
            Exit Sub
        End If

        With ldxDocument.GetLDXComp("Shaft0.Car.Frame.Buffer0.").Forces
            If MsgBox("Remove all the forces from the buffer? If not the first force in the list will be removed.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
                .Clear()
            Else
                .RemoveAt(0)
            End If
        End With

    End Sub