pycatia.dnb_fastener_interfaces.fastener

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_fastener_interfaces.fastener.Fastener(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
Fastener
all_parts_loaded() bool

Note

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

Gets the loading status of the joining parts of the fastener If all the joining parts are
loaded in the V5 session then it returns TRUE If no parts or some parts are loaded in the
V5 session then it returns FALSE Return type : 1,0

Example:
Dim AllPartsLoaded AllPartsLoaded = MyFastener.AllPartsLoaded
Return type:

bool

get_double_user_attribute(i_attribute_label: str) float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetDoubleUserAttribute(CATBSTR iAttributeLabel) As
double

Returns the value of user attribute whoes name matches the
input
string. Valid for attributes of type double. User attributes
are
created from Process Engineer user attributes only.

Parameters:

iAttributeLabel
The label of user attribute of double type

Example:
This example gets value of double user attribute “PLATE SIZE” on
Process Engineer fastener

DblAttrVal = MyFastener.GetDoubleUserAttribute (“PLATE SIZE”)
Parameters:

i_attribute_label (str) –

Return type:

float

get_int_user_attribute(i_attribute_label: str) int

Note

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

i_attribute_label (str) –

Return type:

int

get_part(index: int) Product

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetPart(short index) As Product

Returns the product at the specified index from list of parts joined by
fastener.

Parameters:

index
Index should be greater than equal to 1.

Example:
This example gets the part at index 1

Dim MyProduct As Product
Set MyProduct = MyFastener.GetPart(1)
Parameters:

index (int) –

Return type:

Product

get_parts(o_list_of_parts: tuple) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub GetParts(CATSafeArrayVariant oListOfParts)

Returns the list of parts joined by fastener.

Parameters:

oListOfParts
The list of parts

Example:
This example gets list of parts joined by fastener

Dim NumberOfParts
Dim JoiningParts()
NumberOfParts = MyFastener.NumberOfJoiningParts
ReDim JoiningParts(NumParts-1)
MyFastener.GetParts(JoiningParts)
Parameters:

o_list_of_parts (tuple) –

Return type:

None

get_process(index: int) Activity

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetProcess(short index) As Activity

Returns the activity, at the specified index, on which the fastener is
assigned

Parameters:

index
Index should be greater than equal to 1.

Example:
This example gets the activity at index 1

Dim MyActivity As Activity
Set MyActivity = MyFastener.GetProcess(1)
Parameters:

index (int) –

Return type:

Activity

get_string_user_attribute(i_attribute_label: str) str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetStringUserAttribute(CATBSTR iAttributeLabel) As
CATBSTR

Returns the value of user attribute whoes name matches the
input
string. Valid for attributes of type string. User attributes
are
created from Process Engineer user attributes only.

Parameters:

iAttributeLabel
The label of user attribute of string type

Example:
This example gets value of string user attribute “PLATE NAME” on
Process Engineer fastener

Dim StrAttrVal As String
StrAttrVal = MyFastener.GetStringUserAttribute (“PLATE NAME”)
Parameters:

i_attribute_label (str) –

Return type:

str

number_of_assigned_processes() int

Note

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

Returns Number of processes assigned with the fastener

Example:
Dim Num Num = MyFastener.NumberOfAssignedProcesses
Return type:

int

number_of_joining_parts() int

Note

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

Returns the number of parts joined by fastener.

Parameters:

oNumOfParts
The number of parts

Example:
This example gets number of parts joined by fastener

Dim NumberOfParts
NumberOfParts = MyFastener.NumberOfJoiningParts
Return type:

int

remove_from_ppr(i_force_remove_if_assigned: bool, e_status: int) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub RemoveFromPPR(boolean iForceRemoveIfAssigned,
DNBPPRRemoveStatus eStatus)

Removes the fastener from the current session without deleting it in the
Manufacturing HUB project.

Parameters:

in
iForceRemoveIfAssigned Valid Param : 1 : for removing fastener from session even in
case it is assigned to a process or resource. The product/resource to fastener relation
remains un-affected in PPRHUB. 0 : for NOT removing the fastener from session in case it
is assigned to a process or resource.
out
eStatus Status of remove call. See DNBPPRRemoveStatus definition
above. *

Example:
Dim RemoveStatus As EnumParam MyFastenerPPRServices.RemoveFromPPR 1,
RemoveStatus MsgBox RemoveStatus
Parameters:
  • i_force_remove_if_assigned (bool) –

  • e_status (int) – enum dnbppr_remove_status

Return type:

None

set_double_user_attribute(i_attribute_label: str, i_double_value: float) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetDoubleUserAttribute(CATBSTR iAttributeLabel,
double iDoubleValue)

Set the value of user attribute whoes name matches the
input
string. Valid for attributes of type double. User attributes
are
created from Process Engineer user attributes only.

Parameters:

iAttributeLabel
The label of user attribute of double type

Example:
This example gets value of double user attribute “PLATE SIZE” on
Process Engineer fastener

MyFastener.GetDoubleUserAttribute (“PLATE SIZE”,DblAttrVal)
Parameters:
  • i_attribute_label (str) –

  • i_double_value (float) –

Return type:

None

set_int_user_attribute(i_attribute_label: str, i_int_value: int) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetIntUserAttribute(CATBSTR iAttributeLabel,
long iIntValue)
Parameters:
  • i_attribute_label (str) –

  • i_int_value (int) –

Return type:

None

set_string_user_attribute(i_attribute_label: str, i_string_value: str) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetStringUserAttribute(CATBSTR iAttributeLabel,
CATBSTR iStringValue)

Set the value of user attribute whoes name matches the
input
string. Valid for attributes of type string. User attributes
are
created from Process Engineer user attributes only.

Parameters:

iAttributeLabel
The label of user attribute of string type

Example:
This example gets value of string user attribute “PLATE NAME” on
Process Engineer fastener

Dim StrAttrVal As String
StrAttrVal = “Name”
MyFastener.SetStringUserAttribute (“PLATE NAME”,StrAttrVal)
Parameters:
  • i_attribute_label (str) –

  • i_string_value (str) –

Return type:

None

set_text_id_visibility(i_status: bool) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetTextIDVisibility(boolean iStatus)

Sets the Hide/Show status of the text ID of the fastener in the 3D window Valid Param : 1,0

Example:
//to make the fastener id visible in 3D MyFastener.SetIDVisibility(1) //to
make the fastener id hidden in 3D
MyFastener.SetIDVisibility(0)

Copyright © 1999-2011, Dassault Systèmes. All rights
reserved.
Parameters:

i_status (bool) –

Return type:

None