pycatia.general_knowledge_interfaces.expert_rule_set¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357
Warning
The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.
- class pycatia.general_knowledge_interfaces.expert_rule_set.ExpertRuleSet(com_object)¶
Note
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectGenKnowledgeInterfaces.ExpertRuleBaseComponentRuntimeGenKnowledgeInterfaces.ExpertRuleSetRuntimeExpertRuleSetRepresents the ExpertRuleSet object which is the editable part of a RuleSet ora RuleBase.The following example shows how to access the RuleSet of the rule BaseRB1Dim CATDocs As DocumentsSet CATDocs = CATIA.DocumentsDim partdoc As DocumentSet partdoc = CATDocs.Add(“CATPart”)Dim part as PartSet part = partdoc.PartDim relations as RelationsSet relations = part.RelationsDim RuleBase as ExpertRuleBaseRuntimeSet RuleBase = relations.Item(“RB1”)Dim RuleSet as ExpertRuleSetSet RuleSet = RuleBase.RuleSet- create_check(i_name: str, i_check_variables: str, i_check_body: str, i_rule_set: str) ExpertCheck ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func CreateCheck(CATBSTR iName,CATBSTR iCheckVariables,CATBSTR iCheckBody,CATBSTR iRuleSet) As ExpertCheckCreates a check and adds it to the RuleSet.Parameters:iNameThe check nameiCheckVariablesdefine variables of the check.iCheckBodyThe check definitioniRuleSetThe ruleset name where the check is to be aggregated.If this macro is used from the RuleSet where wewant to create the check, the param must be equal to value : “”.Returns:The created checkExample:This example creates the SolidActivity check and adds it to the newlycreated RuleSet.1 RuleSet then creates the HoleActivity check and adds it tothe newly created RuleSet.2 RuleSetDim CATDocs As DocumentsSet CATDocs = CATIA.DocumentsDim partdoc As DocumentDim part as PartDim CheckSolid as ExpertCheckDim ruleset as ExpertRuleSetDim CheckHole as ExpertCheckSet partdoc = CATDocs.Add(“CATPart”)Set part = partdoc.PartSet CheckSolid = part.Relations.Item(“RuleBase”).RuleSet.CreateCheck(“SolidActivity”,“Sol : Solid”,“Sol.Activity == True”,“RuleSet.1”)Set ruleset = part.Relations.Item(“RuleBase”).RuleSet.CreateRuleSet(“RuleSet.2”,“”)Set CheckHole = ruleset.CreateCheck(“HoleActivity”,“H : Hole”,“H.Activity == True”,“”)
- Parameters:
i_name (str) –
i_check_variables (str) –
i_check_body (str) –
i_rule_set (str) –
- Return type:
- create_rule(i_name: str, i_rule_variables: str, i_rule_body: str, i_rule_set: str) ExpertRule ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func CreateRule(CATBSTR iName,CATBSTR iRuleVariables,CATBSTR iRuleBody,CATBSTR iRuleSet) As ExpertRuleCreates a rule and adds it to the RuleSet.Parameters:iNameThe rule nameiRuleVariablesdefine variables of the rule.iRuleBodyThe check definitioniRuleSetThe RuleSet name where this rule aggregated. If this macro is used from the ruleset wherewe want to aggregate the rule, the param must be equal to value : “”.Returns:The created ruleExample:This example creates the DesactivateIfActivatedOnSolid rule and adds itto the newly created RuleSet.1 RuleSet then creates theDesactivateIfActivatedOnHole rule and adds it to the newly created RuleSet.2RuleSetDim CATDocs As DocumentsSet CATDocs = CATIA.DocumentsDim partdoc As DocumentSet partdoc = CATDocs.Add(“CATPart”)Dim part as PartSet part = partdoc.PartDim rulesolid as ExpertRuleSet rulesolid = part.Relations.Item(“RuleBase”).RuleSet.CreateRule(“DesactivateIfActivatedOnSolid”,“Sol : Solid”,“Sol.Activity == True then Sol.Activity = False”,“RuleSet.1”)Dim ruleset as ExpertRuleSetSet ruleset = part.Relations.Item(“RuleBase”).RuleSet.CreateRuleSet(“RuleSet.2”,“”)Dim rulehole as ExpertRuleSet rulehole = ruleset.CreateRule(“DesactivateIfActivatedOnHole”,“H : Hole”,“H.Activity == True then H.Activity = False”,“”)
- Parameters:
i_name (str) –
i_rule_variables (str) –
i_rule_body (str) –
i_rule_set (str) –
- Return type:
- create_rule_set(i_name: str, i_rule_set: str) ExpertRuleSet ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func CreateRuleSet(CATBSTR iName,CATBSTR iRuleSet) As ExpertRuleSetCreates a RuleSet and adds it to the RuleSet.Parameters:iNameThe ruleset nameiRuleSetThe ruleset name where this ruleset is to be aggregated. If this macro is used from theruleset or the rulebase where we want to aggregate the ruleset, the param must be equalto value : “”.Returns:The created rulesetExample:This example, firstly, creates the RuleSet.1 RuleSet and adds it to thenewly created RuleBase. Secondly, it creates RuleSet.2 RuleSet and adds it tothe ruleset RuleSet.1Dim CATDocs As DocumentsSet CATDocs = CATIA.DocumentsDim partdoc As DocumentSet partdoc = CATDocs.Add(“CATPart”)Dim part as PartSet part = partdoc.PartDim RS1 as ExpertRuleSetRS1 = part.Relations.Item(“RuleBase”).RuleSet.CreateRuleSet(“RuleSet.1”,“”)Dim RS2 as ExpertRuleSetRS2 = part.Relations.Item(“RuleBase”).RuleSet.CreateRuleSet(“RuleSet.2”,“RuleSet.1”)
- Parameters:
i_name (str) –
i_rule_set (str) –
- Return type: