All Frameworks Object Hierarchy This Framework Indexes Previous Next
ParameterProfiles (Object)
Interface to manage an user-defined applicative parameter profile.
Role: This interface allows the end-user to handle Applicative
parameter profiles attributes. To create them, please refer to
ParameterProfilesFactory.
Applicative profiles are defined using a Feature Dictionary Editor
application. The name of the attributes don't change after the CATFct
file has been defined. End-user must know what the name of the attributes
are.
To get a handle on the robot, the product must be the assembly node
representing the robot (the one with a robot icon).
The following code can be used to retrieve a handle on a profile
'current document is a product
'the root product is a robot
'retrieving the root product
Dim MyProduct As Product
Set MyProduct = CATIA.ActiveDocument.Product
'retrieving the handle
Dim MyProfileFactory As ParameterProfilesFactory
Set MyProfileFactory = MyProduct.GetTechnologicalObject("ParameterProfilesFactory")
...
'retrieving the list of profiles as an array
Dim MyListOfProfiles() As ParameterProfiles
MyProfileFactory.GetAllProfileInstances(MyListOfProfiles)
'loop for each profile to get the name
Dim MyCurrentProfile as ParameterProfiles
Dim MyCurrentProfileName
For Each MyCurrentProfile In MyListOfProfiles
MyCurrentProfileName.GetName(MyCurrentProfileName)
Next
ParameterProfilesFactory
Method Index
-
GetAttributeValue
- Gets the attribute value for the attribute mentioned
-
GetName
- Gets the new name for the Profile instance
-
SetAttributeValue
- Sets a new attribute value for the attribute mentioned
-
SetName
- Sets a new name for the Profile instance
Methods
o Sub GetAttributeValue( | CATBSTR | iAttributeName, |
| CATBSTR | oEncapsulatedAttributeValue) |
-
Gets the attribute value for the attribute mentioned
- Parameters:
-
- iAttributeName
- Name of the attribute for which the value has to be set (input)
- oEncapsulatedAttributeValue
- Value of the attribute encapsulated as a CATBSTR string (output)
- Example:
-
' declaration of handle for the profile
Dim MyProfile As ParameterProfiles
' valuation
Set MyProfile= ...
' declaration of variable for name
Dim AttributeName
Dim AttributeValue
' valuation based on user inputs
AttributeName = "MyAttributeName" 'example
' getting the attribute value
MyProfile.GetAttributeValue(AttributeName,AttributeValue)
o Sub GetName( | CATBSTR | oInstanceName) |
-
Gets the new name for the Profile instance
- Parameters:
-
- oInstanceName
- Name of the Profile instance (output)
- Example:
-
' declaration of handle for the profile
Dim MyProfile As ParameterProfiles
' valuation
Set MyProfile= ...
' declaration of variable for name
Dim InstanceName
' setting the name
MyProfile.GetName(InstanceName)
o Sub SetAttributeValue( | CATBSTR | iAttributeName, |
| CATBSTR | iEncapsulatedAttributeValue) |
-
Sets a new attribute value for the attribute mentioned
- Parameters:
-
- iAttributeName
- Name of the attribute for which the value has to be set (input)
- iEncapsulatedAttributeValue
- Value of the attribute encapsulated as a CATBSTR string (input)
- Example:
-
' declaration of handle for the profile
Dim MyProfile As ParameterProfiles
' valuation
Set MyProfile= ...
' declaration of variable for name
Dim AttributeName
Dim AttributeValue
' valuation based on user inputs
AttributeName = "MyAttributeName" 'example
AttributeValue= "MyAttributeValue" 'example
' setting the attribute value
MyProfile.SetAttributeValue(AttributeName,AttributeValue)
o Sub SetName( | CATBSTR | iNewInstanceName) |
-
Sets a new name for the Profile instance
- Parameters:
-
- iNewInstanceName
- New name of the Profile instance (input)
- Example:
-
' declaration of handle for the profile
Dim MyProfile As ParameterProfiles
' valuation
Set MyProfile= ...
' declaration of variable for name
Dim InstanceName
' valuation
InstanceName = "MyInstanceName.2" 'example
' setting the name
MyProfile.SetName(InstanceName)
Copyright © 2003, Dassault Systèmes. All rights reserved.