pycatia.dnb_igp_setup_interfaces.generic_action_factory

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.dnb_igp_setup_interfaces.generic_action_factory.GenericActionFactory(com_object)

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
GenericActionFactory

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”)
create_generic_action(i_action_type: str, i_before: bool, i_reference_activity: Activity) GenericAction

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func CreateGenericAction(CATBSTR iActionType,
boolean iBefore,
Activity iReferenceActivity) As GenericAction

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)
..
Parameters:
  • i_action_type (str) –

  • i_before (bool) –

  • i_reference_activity (Activity) –

Return type:

GenericAction