pycatia.knowledge_interfaces.parameter¶
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.parameter.Parameter(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectParameterRepresents the parameter.It can be computed from a relation: formula, program, or check. It is anabstract object which is not intended to be created as such, but from which theinteger, bolean, real, and string parameters derive. Here is an example tocreate one:Dim CATDocs As DocumentsSet CATDocs = CATIA.DocumentsDim part1 As DocumentSet part1 = CATDocs.Add(“CATPart”)Dim density As RealParamSet density = part1.Part.Parameters.CreateReal(“density”, 2.5)See also:IntParam, BoolParam, RealParam, StrParam, Formula, Rule, Check- property comment: str¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Comment() As CATBSTRReturns or sets the parameter object comment.
- Return type:
str
- property context: AnyObject¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Context() As AnyObject (Read Only)Returns the context of the parameter : a part, a product, a drafting, a process, depending wherethe parameter is.
- Return type:
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Hidden() As booleanReturns or sets whether the parameter is hidden or should be hidden or not.
- Return type:
bool
- property is_true_parameter: bool¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property IsTrueParameter() As boolean (Read Only)Returns a boolean saying if the parameter is a true one (real, dimension,string, etc.) or a geometrical one (isolated points, curves, surfaces).
- Return type:
bool
- property optional_relation: Relation¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property OptionalRelation() As Relation (Read Only)Returns the relation that can be used to compute the parameter. As thisrelation might not exist, NULL may be returned, so a test isrequired.Example:This example checks if there is a relation to compute the param1parameter, and if no relation exists, displays a messagebox:Set param1_rel = param1.OptionalRelationIf param1_rel is Nothing ThenMsgBox “No relation to compute param1”End If
- Return type:
- property read_only: bool¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property ReadOnly() As boolean (Read Only)Returns whether the parameter can be modified.Example:This example checks if the param1 parameter can be modified, and if itcannot, displays a message box:If ( param1.ReadOnly ) ThenMsgBox “No way to change param1”End If
- Return type:
bool
- rename(i_name: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Rename(CATBSTR iName)Renames the parameter.Parameters:iNameThe new name of the parameter. If iName contains “Local:” prefixthe rename will affect the local name. If not, it will affect the global name.Example:This example renames the param1 parameter toPartSeatbodyMinimumThickness:Call param1.Rename(“PartSeatbodyMinimumThickness”)
- Parameters:
i_name (str) –
- Return type:
None
- property renamed: bool¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Renamed() As boolean (Read Only)Returns a boolean saying if the parameter is a renamed parameter or not.
- Return type:
bool
- property user_access_mode: int¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property UserAccessMode() As long (Read Only)Returns the user access mode of the parameter.0Read only parameter (cannot be destroyed).1Read/write parameter (cannot be destroyed).2User parameter (can be read, written and destroyed).Methodso Sub Rename(CATBSTR iName)Renames the parameter.Parameters:iNameThe new name of the parameter. If iName contains “Local:” prefixthe rename will affect the local name. If not, it will affect the global name.Example:This example renames the param1 parameter toPartSeatbodyMinimumThickness:Call param1.Rename(“PartSeatbodyMinimumThickness”)o Sub ValuateFromString(CATBSTR iValue)Valuates a parameter using a string as input. The string depends onparameter nature :“True” or “False” for Booleana numerical value for Integer or Reala numerical value with or without a unit for DimensionParameters:iValueThe value to assign to the dimension parameterExample:This example sets the value of the existing dimension parameter to anew value:dimension.ValuateFromString(“300mm”);o Func ValueAsString() As CATBSTRReturns the value of the parameter as a string.Example:This example gets the value of the existing dimension parameter and showsit in a message boxDim strstr = dimension.ValueAsString;MessageBox strCopyright © 1999-2011, Dassault Systèmes. All rightsreserved.
- Return type:
int
- valuate_from_string(i_value: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub ValuateFromString(CATBSTR iValue)Valuates a parameter using a string as input. The string depends onparameter nature :“True” or “False” for Booleana numerical value for Integer or Reala numerical value with or without a unit for DimensionParameters:iValueThe value to assign to the dimension parameterExample:This example sets the value of the existing dimension parameter to anew value:dimension.ValuateFromString(“300mm”);
- Parameters:
i_value (str) –
- Return type:
None
- value_as_string() str ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func ValueAsString() As CATBSTRReturns the value of the parameter as a string.Example:This example gets the value of the existing dimension parameter and showsit in a message boxDim strstr = dimension.ValueAsString;MessageBox strCopyright © 1999-2011, Dassault Systèmes. All rightsreserved.
- Return type:
str