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

API method: ILDXRules5.RemoveAll

Treename: Shaft0.Rules.

 ' from Samples/Src/LDXAPIExamples/Example_LDXRules.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Rules.", "LDXRules~RemoveAll", "Remove rules")>
    Public Shared Sub RemoveRules(ByRef ldxDocument As DigiPara.LDX.LDXDocument)

        If ldxDocument.GetLDXObject("Shaft0.Rules.Rule0.") Is Nothing Then
            MsgBox("Rules in shaft not found!")
            Exit Sub
        End If

        With ldxDocument.Shafts(0).Comp.Rules
            .RemoveAll(True, MsgBox("Remove all rules including ones that have a GUID?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes)
        End With

    End Sub