pycatia.knowledge_interfaces.formula¶
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.formula.Formula(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectKnowledgeInterfaces.KnowledgeObjectKnowledgeInterfaces.KnowledgeActivateObjectKnowledgeInterfaces.RelationFormulaRepresents the formula relation.The following example shows how to create a formula that computes the mass of acuboid, given its geometric dimensions and the density of the material it ismade of:Dim CATDocs As DocumentsSet CATDocs = CATIA.DocumentsDim part1 As DocumentSet part1 = CATDocs.Add(“CATPart”)Dim width As RealParamSet width = part1.Part.Parameters.CreateReal(“width”, 1.)Dim height As RealParamSet height = part1.Part.Parameters.CreateReal(“height”, 2.)Dim depth As RealParamSet depth = part1.Part.Parameters.CreateReal(“depth”, 3.)Dim density As RealParamSet density = part1.Part.Parameters.CreateReal(“density”, 1.5)Dim mass As RealParamSet mass = part1.Part.Parameters.CreateReal(“mass”, 0.)Dim computemass As RealParamSet computemass = part1.Part.Relations.CreateFormula(“computemass”,“Computes the cuboid mass”, mass,“(width*height*depth)*density”)Copyright © 1999-2011, Dassault Systèmes. All rights reserved.