Fastener (Object)


Properties


Property Color() As
Returns or sets the color of the fastener.
Example:
This example sets the Color type of the fastener to red
 redCol  =16711680 'Encoded RGB color within long integer (R=255 G=0 B=0)
 MyFastener.Color = redCol
 
Property ProcessType() As (Read Only)
Returns or sets the Process Type as a string.
Example:
This example gets the Process Type of the fastener
 Dim PrType
 PrType = MyFastener.ProcessType
 

Methods


Func AllPartsLoaded() As
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
Func GetDoubleUserAttribute( iAttributeLabel) As
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")  
 
Func GetIntUserAttribute( iAttributeLabel) As
Func GetPart( index) As
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)
 
Sub GetParts( 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)
 
Func GetProcess( index) As
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)
 
Func GetStringUserAttribute( iAttributeLabel) As
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")  
 
Func NumberOfAssignedProcesses() As
Returns Number of processes assigned with the fastener
Example:
Dim Num Num = MyFastener.NumberOfAssignedProcesses
Func NumberOfJoiningParts() As
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
 
Sub RemoveFromPPR( iForceRemoveIfAssigned, 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
Sub SetDoubleUserAttribute( iAttributeLabel, 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)  
 
Sub SetIntUserAttribute( iAttributeLabel, iIntValue)
Sub SetStringUserAttribute( iAttributeLabel, 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)  
 
Sub SetTextIDVisibility( 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)