It can be computed from a relation: formula, program, or check. It is an abstract object which is not intended to be created as such, but from which the integer, bolean, real, and string parameters derive. Here is an example to create one:
Dim CATDocs As Documents
Set CATDocs = CATIA.Documents
Dim part1 As Document
Set part1 = CATDocs.Add("CATPart")
Dim density As RealParam
Set density = part1.Part.Parameters.CreateReal("density", 2.5)
- See also:
- , , , , , ,
Properties
- Property Comment() As
- Returns or sets the parameter object comment.
- Property Context() As (Read Only)
- Returns the context of the parameter : a part, a product, a drafting, a process, depending where the parameter is.
- Property Hidden() As
- Returns or sets wether the parameter is hidden or should be hidden. or not.
- Property IsTrueParameter() As (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).
- Property OptionalRelation() As (Read Only)
-
Returns the relation that can be used to compute the parameter.
As this relation might not exist, NULL may be returned,
so a test is required.
- Example:
-
This example checks if there is a relation to compute the
param1 parameter, and if no relation exists, displays a
message box:
Set param1_rel = param1.OptionalRelation If param1_rel is Nothing Then MsgBox "No relation to compute param1" End If
- Property ReadOnly() As (Read Only)
-
Returns whether the parameter can be modified.
- Example:
-
This example checks if the param1 parameter can be modified,
and if it cannot, displays a message box:
If ( param1.ReadOnly ) Then MsgBox "No way to change param1" End If
- Property Renamed() As (Read Only)
- Returns a boolean saying if the parameter is a renamed parameter or not.
- Property UserAccessMode() As (Read Only)
- Returns the user access mode of the parameter.
Methods
- Sub Rename( iName)
-
Renames the parameter.
- Parameters:
-
- iName
- The new name of the parameter. If iName contains "Local:" prefix the rename will affect the local name. If not, it will affect the global name.
- Example:
-
This example renames the param1 parameter
to PartSeatbodyMinimumThickness:
Call param1.Rename("PartSeatbodyMinimumThickness")
"True" or "False" for Boolean
a numerical value for Integer or Real
a numerical value with or without a unit for Dimension
- Parameters:
-
- iValue
- The value to assign to the dimension parameter
- Example:
-
This example sets the value of the existing dimension parameter
to a new value:
dimension.ValuateFromString("300mm");dd>
Dim str str = dimension.ValueAsString; MessageBox str