All Frameworks  Object Hierarchy  This Framework  Indexes   

GenericActionFactory (Object)

Interface representing GenericAction factory.

Role: This allows the creation of a GenericAction under an Operation
The following code snippet can be used to obtain a GenericActionFactory from a selected Operation
   Dim oSelectAct As Activity
   set oSelectAct = CATIA.ActiveDocument.Selection.FindObject("CATIAActivity")
   Dim objGenActFact As GenericActionFactory
   set objGenActFact = oSelectAct.GetTechnologicalObject("GenericActionFactory")
 

Method Index

CreateGenericAction
Creates an Action based on the specified type

Methods


o Func CreateGenericAction( iActionType,
iBefore,
iReferenceActivity) As
Creates an Action based on the specified type
Parameters:
iActionType
Type of Action to be created.
iBefore
Created Action can be Predecessor/Successor.
iReferenceActivitiy
The Reference Activity Before/After which the Action needs to be created.
oGenericAction
Created Action.
Returns:
An HRESULT.
Legal values:
S_OK
Action is successfully created and the interface pointer is successfully returned
E_FAIL
Action was successfully created, but the interface query failed
E_NOINTERFACE
Action was successfully created, but the it doesn't implement the requested interface
E_OUTOFMEMORY
The component allocation failed
Example:
   Dim objGenActFact As GenericActionFactory
          ......
   Dim refAct As Activity
   Dim objGenAct as GenericAction CATIASelection
          ......
   Before = TRUE
   set refAct = CATIA.ActiveDocument.Selection.FindObject("CATIAActivity")
   set objGenAct = objGenActFact.CreateGenericAction("DNBIgpSpotWeld", False, refAct)
   ..
   

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