Repository.Xfmea.AssignActionToXfmeaCause Method

From ReliaWiki
Jump to navigation Jump to search

Member of: SynthesisAPI.Repository

Assigns an action to a cause. Returns a Boolean value; when true, indicates the action was assigned successfully.


.Xfmea.AssignActionToXfmeaCause(ActionID, CauseID)


Action ID

Required. The Action ID of the action that is to be assigned to the cause.

Cause ID

Required. The Cause ID of the cause to which the action is to be assigned.



 'Declare a new Repository object and connect to a repository. 
  Dim MyRepository As New Repository
 'Get a list of actions from project #1. 
  Dim Actions() As cAction
  Set Actions = MyRepository.Action.GetAllActions()
 'Get a list of causes for failure #1 from project #1. 
  Dim Causes() As cCause
  Set Causes = MyRepository.Xfmea.GetAllXfmeaCauses(1)

 'Assign the first item in the Actions array to be assigned to the first item in the Causes array. For VB.NET, dictionaries could also be used. 
  Dim bOK As Boolean
  bOK = MyRepository.Xfmea.AssignActionToXfmeaCause(Actions(0), Causes(0))