Repository.Xfmea.AssignControlToXfmeaCause Method

From ReliaWiki
Revision as of 18:12, 2 March 2018 by David J. Groebel (talk | contribs) (Created page with '{{Template:API}}{{Template:APIBreadcrumb|.Repository}} <onlyinclude>Assigns a control to a cause. Returns a '''Boolean''' value; when true, indicates the c…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: SynthesisAPI.Repository

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


.Xfmea.AssignControlToXfmeaCause(ControlID, CauseID)


Control ID

Required. The Control ID of the control 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 controls from project #1. 
  Dim Controls() As cXfmeaControl
  Set Controls = MyRepository.Action.GetAllXfmeaControls()
 '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 Controls 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.AssignControlToXfmeaCause(Controls(0), Causes(0))