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

API method: ILDXRule5.GUID

Treename: Shaft0.Rules.

 ' from Samples/Src/LDXAPIExamples/Example_LDXRules.vb

    <APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Shaft0.Rules.", "LDXRule~GUID", "Get rules")>
    Public Shared Sub GetRules(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

        Dim rules As String = ""
        For Each ldxRule As DigiPara.LDX.LDXRule In ldxDocument.Shafts(0).Comp.Rules
            rules += String.Format("{0} ({1}){2}", ldxRule.ProfileGrpRulesTab.GetValue("PGR_DESC"), IIf(ldxRule.Mode = DigiPara.LDX.RuleModes.rlInsertedWithGUID, ldxRule.GUID, "No GUID"), Environment.NewLine)
        Next

        MsgBox("Rules within Shaft:" + Environment.NewLine + rules)

    End Sub