pycatia.knowledge_interfaces.rule¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
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.knowledge_interfaces.rule.Rule(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectKnowledgeInterfaces.KnowledgeObjectKnowledgeInterfaces.KnowledgeActivateObjectKnowledgeInterfaces.RelationRuleRepresents the program relation.The following example shows how to create a program that selects a depth withrespect to a mass value. The depth and mass parameters should exist before thecreation of the program (also called Rule) object.Dim CATDocs As DocumentsSet CATDocs = CATIA.DocumentsDim part1 As DocumentSet part1 = CATDocs.Add(“CATPart”)Dim mass As RealParamSet mass = part1.Part.Parameters.CreateReal(“mass”, 5.)Dim depth As RealParamSet depth = part1.Part.Parameters.CreateReal(“depth”, 0.)Dim selectdepth As RelationSet selectdepth = part1.Part.Relations.CreateProgram(“select_depth”,“Select depth with respect to mass”,“if (mass>2kg) { depth=2mm } else { depth=1mm}”)Copyright © 1999-2011, Dassault Systèmes. All rights reserved.