The following example shows how to retrieve it:
Dim CATDocs As Documents
Set CATDocs = CATIA.Documents
Dim part1 As Document
Set part1 = CATDocs.Add("CATPart")
Dim parameterList As Parameters
Set parameterList = part1.Part.Parameters
Properties
- Property RootParameterSet() As (Read Only)
- Returns the root parameter set of a document. If it doesn't exist, it is created.
- Property Units() As (Read Only)
- Returns the collection of units.
Methods
- Func CreateBoolean( iName, iValue) As
-
Creates a boolean parameter and adds it to
the part's collection of parameters.
- Parameters:
-
- iName
- The parameter name dd>
- iValue
- The parameter value
- Example:
-
This example creates the checked boolean parameter
and adds it to the newly created part:
Dim CATDocs As Documents Set CATDocs = CATIA.Documents Dim part1 As Document Set part1 = CATDocs.Add("CATPart") Dim chk As BooleanParam Set chk = part1.Part.Parameters.CreateBoolean ("checked", False)
- Parameters:
-
- iName
- The dimension name dd>
- iMagnitude
- The dimension magnitude.
Units are those of the IS system.
Valid magnitudes are:
- "LENGTH": the unit is the meter.
- "ANGLE": the unit is the radian.
- iValue
- The dimension value provided as a real number
- Example:
-
This example creates a LENGTH dimension
and adds it to the newly created part. The initial value
is expressed in meters. The new value is expressed in
millimeters.
Dim depth As Dimension Set depth = parameters.CreateDimension("depth", "LENGTH", 20) depth.ValuateFromString("300mm");
- Parameters:
-
- iName
- The parameter name dd>
- iValue
- The parameter value
- Example:
-
This example creates the RevisionNumber integer parameter
and adds it to the newly created part:
Dim CATDocs As Documents Set CATDocs = CATIA.Documents Dim part1 As Document Set part1 = CATDocs.Add("CATPart") Dim revision As IntParam Set revision = part1.Part.Parameters.CreateInteger ("RevisionRumber", 17)
- Parameters:
-
- iName
- The parameter name
- Example:
-
This example creates the ListName list parameter
and adds it to the newly created part:
Set CATDocs = CATIA.Documents Set part1 = CATDocs.Add("CATPart") Set list1 = part1.Part.Parameters.CreateList ("ListName")
- Parameters:
-
- iName
- The parameter name dd>
- iValue
- The parameter value
- Example:
-
This example creates the ReliabilityRate real parameter
and adds it to the newly created part:
Dim CATDocs As Documents Set CATDocs = CATIA.Documents Dim part1 As Document Set part1 = CATDocs.Add("CATPart") Dim rate As RealParam Set rate = part1.Part.Parameters.CreateReal ("ReliabilityRate", 2.5 )
- Parameters:
-
- iName
- The parameter name dd>
- iValue
- The parameter value
- Example:
-
This example creates the responsible string parameter
and adds it to the newly created part:
Set CATDocs = CATIA.Documents Set part1 = CATDocs.Add("CATPart") Set density = part1.Part.Parameters.CreateString ("responsible", "The Boss")
- Parameters:
-
- iIndex
- The index or the name of the parameter to retrieve from the collection of parameters. As a numerics, this index is the rank of the parameter in the collection. The index of the first parameter in the collection is 1, and the index of the last parameter is Count. As a string, it is the name you assigned to the parameter using the property or when creating the parameter.
- Example:
-
This example retrieves the last parameter in the parameters
collection:
Set lastParameter = parameters.Item(parameters.Count)
- Parameters:
-
- iIndex
- The index or the name of the parameter to remove from the collection of parameters. As a numerics, this index is the rank of the parameter in the collection. The index of the first parameter in the collection is 1, and the index of the last parameter is Count. As a string, it is the name you assigned to the parameter using the property or when creating the parameter.
- Example:
-
This example removes the "depth" parameter from the parameters
collection.
parameters.Remove("depth")
- Parameters:
-
- iObject
- The object used to filter the whole parameter collection to get the resulting sub-collection. dd>
- iRecursively
- A flag to specify if children parameters are to be searched for in the returned collection
- Example:
-
This example shows how to retrieve a collection of parameters that are
associated to a Pad.
Dim Parameters1 As Parameters Set Parameters1 = CATIA.ActiveDocument.Part.Parameters gets the collection of parameters in the part Dim Body0 As AnyObject Set Body0 = CATIA.ActiveDocument.Part.Bodies.Item ( "MechanicalTool.1" ) Dim Pad1 As AnyObject Set Pad1 = Body0.Shapes.Item ( "Pad.1" ) gets the pad Pad.1 Dim Parameters2 As Parameters Set Parameters2 = Parameters1.SubList(Pad1,TRUE) gets the collection of parameters that are under the pad Pad.1