Repository.Xfmea.AddXfmeaCause Method

From ReliaWiki
Revision as of 20:47, 25 August 2015 by Kate Racaza (talk | contribs) (Created page with '{{Template:API}}{{Template:APIBreadcrumb|10|.Repository}} <onlyinclude>Adds a new cause to an FMEA effect. Returns a '''Boolean''' value; when true, indica…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
APIWiki.png


Member of: SynthesisAPI10.Repository


Adds a new cause to an FMEA effect. Returns a Boolean value; when true, indicates a successful save.

Syntax

.Xfmea.AddXfmeaCause(Cause, EffectID)

Parameters

Cause

Required. The XfmeaCause object to be added.

EffectID

Required. Integer. The record ID of FMEA effect to add the cause to.


Example

This example assumes that FMEAs exist in a repository. It creates a new cause, and then saves it to one of the FMEA effects in the repository.

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 effect #1 located in project #1. 
 MyRepository.Project.SetCurrentProject(1)
 Call MyRepository.Xfmea.AddXfmeaCause(ACause,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 effect #1 located in project #1. 
 MyRepository.Project.SetCurrentProject(1)
 MyRepository.Xfmea.AddXfmeaCause(ACause,1)