Indexes   

ParameterProfilesFactory (Object)

Interface to manage an user-defined applicative parameter profile(s) defined on a robot controller.

Role: This interface allows the end-user to handle Applicative parameter profiles on a robot controller. It works on both:

Applicative profiles are defined using a Feature Dictionary Editor application. The application will save CATFct files that must be referenced with a file Profile.xml, referenced through the environment variable CATDisciplinePath. For more information, please refer to the Device Building product documentation in the Advanced Tasks section on the setup.

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 snippet shows how to retrieve the handle on the factory.
   '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
   Dim MyCurrentProfile as ParameterProfiles
   For Each MyCurrentProfile In MyListOfProfiles
      ...
   Next
 

ParameterProfiles CATSafeArrayVariant

Method Index

CreateProfileInstance
Instantiates a particular profile type.
DeleteProfileInstance
Deletes a particular profile instance
GetAllProfileInstances
Gets the array of all the handles of the profile instances (belonging to all profile types)
GetProfileInstance
Gets the handle to the profile instance against the instance name
GetProfileInstances
Gets the array of handles of the profile instances belonging to a particular profile type

Methods


o Sub CreateProfileInstance( iProfileType,
iInstanceName,
oAppParameterProfile)
Instantiates a particular profile type. The profile type is user-defined: it is the name the user has set when defining the profile in the CATFct file.
Parameters:
iProfileType
Profile type name for which the instance has to be created (input)
iInstanceName
Desired instance name for the instance to be created( input)
oAppParameterProfile
Handle to the profile instance thus created (output)
Example:
   ' declaration of 2 variable handles
   Dim MyNewProfile As ParameterProfiles
   Dim MyProfileFactory As ParameterProfilesFactory

   ' valuation 
   Set MyProfileFactory= ...

   ' declaration of variables for names
   Dim InstanceName
   Dim DefaultName
   DefaultName = "MyChoice." 'example

   'Create 10 instances of the profile type MyProfileType
   For i=1 to 10
       'concatenation of default name and index
       InstanceName = DefaultName & i
       ParmProfileFact.CreateProfileInstance(
                                           "MyProfileType",
                                           InstanceName,
                                           MyNewProfile)
   Next
   
o Sub DeleteProfileInstance( ioParameterProfile)
Deletes a particular profile instance
Parameters:
ioParameterProfile
Handle to the profile instance which should be deleted( input)
Example:
   ' declaration of 2 variable handles
   Dim MyProfileToDelete As ParameterProfiles
   Dim MyProfileFactory As ParameterProfilesFactory

   ' valuation 
   Set MyProfileToDelete= ...
   Set MyProfileFactory= ...

   'deletion of the object
   MyProfileFactory.DeleteProfileInstance(MyProfileToDelete);
   
o Sub GetAllProfileInstances( oAllInstancesOnProduct)
Gets the array of all the handles of the profile instances (belonging to all profile types)
Parameters:
oAllInstancesOnProduct
The array of all the handles to all the profile instances of all the profile types(output)
Example:
   'retrieving the handle on the profile factory
   Dim MyProfileFactory As ParameterProfilesFactory
   set MyProfileFactory = ...
   ...
   'retrieving the list of profiles as an array
   Dim MyListOfProfiles() As ParameterProfiles
   MyProfileFactory.GetAllProfileInstances(MyListOfProfiles)

   'loop for each profile
   Dim MyCurrentProfile as ParameterProfiles
   For Each MyCurrentProfile In MyListOfProfiles
      ...
   Next
   
o Sub GetProfileInstance( iInstanceName,
oProfileInstance)
Gets the handle to the profile instance against the instance name
Parameters:
iInstanceName
The name of the profile instance(input)
oProfileInstance
Handle to the profile instance which has the above name( output)
Example:
   'retrieving the handle on the profile factory
   Dim MyProfileFactory As ParameterProfilesFactory
   set MyProfileFactory = ...
   ...
   'defining the type
   Dim MyProfileName
   set MyProfileName= "MyProfile.1" 'example
   
   'retrieving the profile
   Dim MyCurrentProfile as ParameterProfiles
   MyProfileFactory.GetProfileInstances(
                                           MyProfileName,
                                           MyListOfProfiles)

   
o Sub GetProfileInstances( iProfileType,
oProfiles)
Gets the array of handles of the profile instances belonging to a particular profile type
Parameters:
iProfileType
The Profile Type (input)
oProfiles
The array of handles to the profile instances of the type specified above(output)
Example:
   'retrieving the handle on the profile factory
   Dim MyProfileFactory As ParameterProfilesFactory
   set MyProfileFactory = ...
   ...
   'defining the type
   Dim MyProfileType
   set MyProfileType = "MyProfileType" 'example
   
   'retrieving the list of profiles as an array
   Dim MyListOfProfiles() As ParameterProfiles
   MyProfileFactory.GetProfileInstances(
                                           MyProfileType,
                                           MyListOfProfiles)

   'loop for each profile
   Dim MyCurrentProfile as ParameterProfiles
   For Each MyCurrentProfile In MyListOfProfiles
      ...
   Next
   

Copyright © 2006, Dassault Systèmes. All rights reserved.