Repository.Xfmea.AddXfmeaCause Method: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
Kate Racaza (talk | contribs) No edit summary  | 
				Kate Racaza (talk | contribs) No edit summary  | 
				||
| Line 5: | Line 5: | ||
==Syntax==  | ==Syntax==  | ||
  '''.Xfmea.AddXfmeaCause'''(''Cause'', ''EffectID'')  |   '''.Xfmea.AddXfmeaCause'''(''Cause'', ''EffectID'', ''FailureID'')  | ||
===Parameters===  | ===Parameters===  | ||
| Line 14: | Line 14: | ||
:Required. Integer. The record ID of the effect to add the cause to.    | :Required. Integer. The record ID of the effect to add the cause to.    | ||
''FailureID''  | |||
:Required. Integer. The record ID of the parent failure item.  | |||
==Example==  | ==Example==  | ||
This example assumes that FMEAs exist in a repository. It creates a new cause, and then saves it   | This example assumes that FMEAs exist in a repository. It creates a new cause, and then saves it under one of the effects in the FMEA.  | ||
  '''VBA'''  |   '''VBA'''  | ||
| Line 28: | Line 31: | ||
   ACause.Dsc = {{APIString|"Over pressure in lamp due to no gas"}}  |    ACause.Dsc = {{APIString|"Over pressure in lamp due to no gas"}}  | ||
  {{APIComment|'Add the new cause to effect #  |   {{APIComment|'Add the new cause to project 1, under effect #2 in failure #1.}}  | ||
   MyRepository.Project.SetCurrentProject(1)  |    MyRepository.Project.SetCurrentProject(1)  | ||
   {{APIPrefix|Call}} MyRepository.Xfmea.AddXfmeaCause(ACause,1)  |    {{APIPrefix|Call}} MyRepository.Xfmea.AddXfmeaCause(ACause, 2, 1)  | ||
  '''VB.NET'''  |   '''VB.NET'''  | ||
| Line 43: | Line 46: | ||
   ACause.Dsc = {{APIString|"Over pressure in lamp due to no gas"}}  |    ACause.Dsc = {{APIString|"Over pressure in lamp due to no gas"}}  | ||
  {{APIComment|'Add the new cause to effect #  |   {{APIComment|'Add the new cause to project 1, under effect #2, failure #1.}}  | ||
   MyRepository.Project.SetCurrentProject(1)  |    MyRepository.Project.SetCurrentProject(1)  | ||
   MyRepository.Xfmea.AddXfmeaCause(ACause,1)  |    MyRepository.Xfmea.AddXfmeaCause(ACause, 2, 1)  | ||
Revision as of 20:37, 5 November 2015
![]()  | 
Member of:  SynthesisAPI10.Repository  
Adds a new cause to an effect. Returns a Boolean value; when true, indicates a successful save. 
Syntax
.Xfmea.AddXfmeaCause(Cause, EffectID, FailureID)
Parameters
Cause
- Required. The XfmeaCause object to be added.
 
EffectID
- Required. Integer. The record ID of the effect to add the cause to.
 
FailureID
- Required. Integer. The record ID of the parent failure item.
 
Example
This example assumes that FMEAs exist in a repository. It creates a new cause, and then saves it under one of the effects in the FMEA.
VBA 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... 'Create a new cause. The following code creates a new cause described as "Over pressure in lamp due to no gas." Dim ACause As New XfmeaCause ACause.Dsc = "Over pressure in lamp due to no gas" 'Add the new cause to project 1, under effect #2 in failure #1. MyRepository.Project.SetCurrentProject(1) Call MyRepository.Xfmea.AddXfmeaCause(ACause, 2, 1)
VB.NET 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... 'Create a new cause. The following code creates a new cause described as "Over pressure in lamp due to no gas." Dim ACause As New XfmeaCause ACause.Dsc = "Over pressure in lamp due to no gas" 'Add the new cause to project 1, under effect #2, failure #1. MyRepository.Project.SetCurrentProject(1) MyRepository.Xfmea.AddXfmeaCause(ACause, 2, 1)
