pycatia.dmaps_interfaces.activity

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.dmaps_interfaces.activity.Activity(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
Activity

The object that represents an activity.

It groups the most important methods related to an activity and enables to get
the management interfaces (hierarchy management, control flow management, *
…).
add_activity_constraint(i_activity: Activity, i_constraint_type: str) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub AddActivityConstraint(Activity iActivity,
SPPProcessConstraintType iConstraintType)

Create a constraint between current activity and input
activity

Parameters:

iActivity
Activity with which the constraint to be created.
iConstraintType
Type of the Constraint. It may be one of the following:
Precedence_Constraint, Start_Constraint, End_Constraint,


Returns:
S_OKOn Success
S_FALSEIf a constraint already exists.
E_FAILIf the constraint is NOT created.
Parameters:
  • i_activity (Activity) –

  • i_constraint_type (str) –

Return type:

None

add_attr(i_attribute_name: str, attr_type: str, i_attribute_prompt_name: str) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub AddAttr(CATBSTR iAttributeName,
SPPProcessAttributeType AttrType,
CATBSTR iAttributePromptName)

Adds attribute to an Activity.

Parameters:

iAttributeName
Name of the attribute to add
AttrType
Type of the attribute to add. It may be one of the following:
Integer_Attribute or 0 for integer, Double_Attribute or 1 for double, or
String_Attribute or 2 for string
iAttributePromptName
Prompt Name of the attribute to add
Parameters:
  • i_attribute_name (str) –

  • attr_type (str) –

  • i_attribute_prompt_name (str) –

Return type:

None

property attr_count: int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property AttrCount() As long (Read Only)

This property returns the number of attributes of the current
activity.

Returns:
oNbAttr The number of attributes
Return type:

int

attr_name(i_index: int) str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func AttrName(long iIndex) As CATBSTR

This method returns the name for the specified attribute.

Parameters:

iIndex
The attribute index
oName
The attribute name
Parameters:

i_index (int) –

Return type:

str

attr_value(i_index: cat_variant) cat_variant

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func AttrValue(CATVariant iIndex) As CATVariant

This method returns the value for the specified attribute.

Parameters:

iIndex
The attribute identifier

Returns:
oAttVal The attribute value
Parameters:

i_index (cat_variant) –

Return type:

cat_variant

property beginning_date: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property BeginningDate() As double

This property returns the beginning date of the current
activity.

Returns:
oBegin The beginning date of the current activity
Return type:

float

property calculated_begin_time: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property CalculatedBeginTime() As double (Read Only)

This property returns and calculated time cyle on the current
activity.

Returns:
oCBT The calculated begin time of the current activity
Return type:

float

property calculated_cycle_time: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property CalculatedCycleTime() As double (Read Only)

This property returns and sets the calculated time cyle on the current
activity.

Returns:
oCCT The calculated time cycle of the current activity
Return type:

float

property children_activities: Activities

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property ChildrenActivities() As Activities (Read Only)

This property returns the interface which manages the children hierarchy on
the activity. Please note that it used to return all children, but from R20SP4
it returns only exposed children, which could be different from all children.
Return type:

Activities

create_child(i_type_of_child: str) Activity

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func CreateChild(CATBSTR iTypeOfChild) As Activity

This method creates a new child activity of the requested
type.

Parameters:

iTypeOfChild
The type of the child activity to create.
oCreatedChild
The new created child activity.
Parameters:

i_type_of_child (str) –

Return type:

Activity

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub CreateLink(Activity iSecondActivity)

This method creates a link from the current activity to another
activity.

Parameters:

iSecondActivity
The activity that will be linked to the current
activity.
Parameters:

i_second_activity (Activity) –

Return type:

None

property cycle_time: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property CycleTime() As double

This property returns and set the time cyle on the current
activity.

Returns:
oCT The time cycle of the current activity
Parameters:

iCT
The specified time cycle of the current activity
Return type:

float

property description: str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Description() As CATBSTR

This property returns and set the description on the current
activity.

Returns:
oDescriptionBSTR The description of the current activity

Parameters:

iDescriptionBSTR
The specified description of the current activity
Return type:

str

property end_date: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property EndDate() As double (Read Only)

This property returns the end date of the current
activity.

Returns:
oEnd The end date of the current activity. Till V5R13, this method is
returning S_OK even if there is no good implementation. Starting from V5R14
this method will return E_NOIMPL. Hence all the scripts that use this method
would have to be updated to accomodate this change.
Return type:

float

get_activity_constraints(i_constraint_type: str, o_constrt_list: Activities) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub GetActivityConstraints(SPPProcessConstraintType
iConstraintType,
Activities oConstrtList)

Get List of constraint activities that exists on the current
Activity

Parameters:

iConstraintType
Type of the Constraints to be returned. It may be one of the
following: Precedence_Constraint, Start_Constraint, End_Constraint,
All_Constraints

Returns:
oConstrtList ( Allocate the memory.If not, it allocates internally and
you need to clean it after usage)
List of Activities with which the current activity has
constraints
Returns:
oConstraintTypeList (It is an optional output used only if user
interested) ( Allocate the memory.If not, it allocates internally and you need
to clean it after usage)
List of constraint types for each actvity that exists in
oConstrtList
Current activity has a constraint with first activity in oConstrtList and
its constraint type is mentioned in first field of
oConstraintTypeList
Parameters:
  • i_constraint_type (str) –

  • o_constrt_list (Activities) –

Return type:

None

get_technological_object(i_application_type: str) AnyObject

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetTechnologicalObject(CATBSTR iApplicationType) As
CATBaseDispatch

Returns the process’s applicative data which type is the given parameter.
The data returned can be either a collection or a simple
object.

Parameters:

iApplicationType
The type of applicative data searched.

Example:

This example retrieves the GraphEditor position for
the
Loading1 activity.


Dim GEPosition
Set GEPosition = Loading1.GetTechnologicalObject(“GEPosition”)
Parameters:

i_application_type (str) –

Return type:

AnyObject

is_sub_type_of(i_name: str) bool

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func IsSubTypeOf(CATBSTR iName) As boolean

This method allows to test the type of a specific
activity.

Parameters:

iName
The name of the type to test

Returns:
oVal The logical value returned by the test
Parameters:

i_name (str) –

Return type:

bool

property items: Items

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Items() As Items (Read Only)

This property returns the interface which manages the items or input
products/components assigned to the current activity
Return type:

Items

property next_cf_activities: Activities

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property NextCFActivities() As Activities (Read Only)

This property returns the interface which manages the downstream control
flow hierarchy on the activity.
Return type:

Activities

property next_prf_activities: Activities

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property NextPRFActivities() As Activities (Read Only)

This property returns the interface which manages the downstream product
flow hierarchy on the activity.
Return type:

Activities

property outputs: Outputs

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Outputs() As Outputs (Read Only)

This property returns the interface which manages the output
products/components of the current activity
Return type:

Outputs

property parameters: Parameters

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Parameters() As Parameters (Read Only)

This property returns the interface which manages the knowlegde parameters
of the activity.
Return type:

Parameters

property possible_precedence_activities: Activities

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property PossiblePrecedenceActivities() As Activities (Read
Only)

This property returns list of Possible Precedence Activities defined on
Current Activity.

Parameters:

oActivities
List of Activities that must precede the Current
Activity
Return type:

Activities

property precedence_activities: Activities

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property PrecedenceActivities() As Activities (Read Only)

This property returns list of Precedence Activities defined on Current
Activity.

Parameters:

oActivities
List of Activities that must precede the Current
Activity
Return type:

Activities

property previous_cf_activities: Activities

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property PreviousCFActivities() As Activities (Read Only)

This property returns the interface which manages the upstream control flow
hierarchy on the activity.
Return type:

Activities

property previous_prf_activities: Activities

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property PreviousPRFActivities() As Activities (Read Only)

This property returns the interface which manages the upstream product flow
hierarchy on the activity.
Return type:

Activities

property process_id: str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property ProcessID() As CATBSTR (Read Only)

This property returns process identifier on the current
activity.

Parameters:

oProcessID
The process ID of the current activity
Return type:

str

property relations: Relations

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Relations() As Relations (Read Only)

This property returns the interface which manages the knowlegde relations
of the activity.
Return type:

Relations

remove_activity_constraint(i_activity: Activity, i_constraint_type: str) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub RemoveActivityConstraint(Activity iActivity,
SPPProcessConstraintType iConstraintType)

Remove a constraint between current activity and input
activity

Parameters:

iActivity
Activity with which the constraint to be removed.
iConstraintType
Type of the Constraint to be removed. It may be one of the
following: Precedence_Constraint, Start_Constraint, End_Constraint,
All_Constraints

Returns:
S_OKOn Success
S_FALSEIf a constraint does not exists.
E_FAILIf the constraint can not be removed or the Function fails because
of any reason.
Parameters:
  • i_activity (Activity) –

  • i_constraint_type (str) –

Return type:

None

remove_attr(i_attribute_name: str) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub RemoveAttr(CATBSTR iAttributeName)

Removes attributes to an Activity type.

Parameters:

iAttributeName
Name of the attribute to remove
Parameters:

i_attribute_name (str) –

Return type:

None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub RemoveLink(Activity iSecondActivity)

This method removes a link existing on the current
activity.

Parameters:

iSecondActivity
The activity on which the link will be removed.
Parameters:

i_second_activity (Activity) –

Return type:

None

property resources: Resources

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Resources() As Resources (Read Only)

This property returns the interface which manages the resources hierarchy
on the activity.
Return type:

Resources

set_process_id(i_process_id: str, i_check_unique: bool) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetProcessID(CATBSTR iProcessID,
boolean iCheckUnique)

Sets the process ID of the current activity

Parameters:

iProcessID
Input Process ID string
iCheckUnique
Option to enable uniqueness check
Parameters:
  • i_process_id (str) –

  • i_check_unique (bool) –

Return type:

None

property type: str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Type() As CATBSTR (Read Only)

This method returns the type of the current activity.

Parameters:

oType
The type of the current activity
Return type:

str