The following example shows how access the Rule Rule1 from an existing RuleSet RS1 of the RuleBase RB1
Dim CATDocs As Document
Set CATDocs = CATIA.Documents
Dim partdoc As PartDocument
Set partdoc = CATDocs.Add("CATPart")
Dim part As Part
Set part = partdoc.Part
Dim relations As Relations
Set relations = part.Relations
Dim Rulebase As ExpertRuleBaseRuntime
Set RuleBase = relations.Item("RB1")
Dim Ruleset As ExpertRuleSetRuntime
Set RuleSet = RuleBase.ExpertRuleBaseComponentRuntimes.Item("RS1")
Dim Rule1 As ExpertRuleRuntime
Set Rule1 = RuleSet.ExpertRuleBaseComponentRuntimes.Item("Rule1")
- See also:
- ,
Properties
- Property Body() As
- Returns or sets the string that defines the body of a Rule. For instance: "if ( H\Diameter > 20mm ) H\Activity = FALSE"
- Property Language() As
- Returns or sets the language of a rule.
- Property Variables() As
- Returns or sets the variables scope of the a Rule. For instance: "H:Hole; P: Pad"