Repository.Xfmea.AddXfmeaEffect Method: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with '{{Template:API}}{{Template:APIBreadcrumb|10|.Repository}} <onlyinclude>Adds a new effect to an FMEA failure. Returns a '''Boolean''' value; when true, indi…')
 
No edit summary
Line 2: Line 2:




<onlyinclude>Adds a new effect to an FMEA failure. Returns a '''Boolean''' value; when true, indicates a successful save. </onlyinclude>
<onlyinclude>Adds a new effect to a failure. Returns a '''Boolean''' value; when true, indicates a successful save. </onlyinclude>


==Syntax==
==Syntax==
Line 12: Line 12:


''FailureID''
''FailureID''
:Required. Integer. The record ID of FMEA failure to add the effect to.  
:Required. Integer. The record ID of the failure to add the effect to.  




==Example==
==Example==
This example assumes that FMEAs exist in a repository. It creates a new effect, and then saves it to one of the FMEA failures in the repository.
This example assumes that FMEAs exist in a repository. It creates a new effect, and then saves it to one of the failures in the repository.
  '''VBA'''
  '''VBA'''
   
   

Revision as of 22:29, 11 September 2015

APIWiki.png


Member of: SynthesisAPI10.Repository


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

Syntax

.Xfmea.AddXfmeaEffect(Effect, FailureID)

Parameters

Effect

Required. The XfmeaEffect object to be added.

FailureID

Required. Integer. The record ID of the failure to add the effect to.


Example

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

VBA

 'Add code to connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  ... 


 'Create a new effect. The following code creates a effect described as "No light, potential injury to user." 
 Dim AEffect As New XfmeaEffect
 AEffect.Dsc = "No light, potential injury to user"

 'Add the new effect to failure #1 located in project #1. 
 MyRepository.Project.SetCurrentProject(1)
 Call MyRepository.Xfmea.AddXfmeaEffect(AEffect,1)
VB.NET

 'Add code to connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  ... 


 'Create a new effect. The following code creates a effect described as "No light, potential injury to user." 
 Dim AEffect As New XfmeaEffect
 AEffect.Dsc = "No light, potential injury to user"

 'Add the new effect to failure #1 located in project #1. 
 MyRepository.Project.SetCurrentProject(1)
 MyRepository.Xfmea.AddXfmeaEffect(AEffect,1)