Indexes
'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
| o Sub GetAttributeValue( | iAttributeName, | |
| oEncapsulatedAttributeValue) |
' 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( | oInstanceName) |
' 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( | iAttributeName, | |
| iEncapsulatedAttributeValue) |
' 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( | iNewInstanceName) |
' 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 © 2006, Dassault Systèmes. All rights reserved.