Repository.Xfmea.AddXfmeaFailure 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 failure to an FMEA function. Returns a '''Boolean''' value; when true, in…')
 
mNo edit summary
Line 1: Line 1:
{{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}}
{{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}





Revision as of 22:23, 13 November 2015

APIWiki.png


Member of: SynthesisAPI.Repository


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

Syntax

.Xfmea.AddXfmeaFailure(failure, FunctionID)

Parameters

failure

Required. The XfmeaFailure object to be added.

FunctionID

Required. Integer. The record ID of FMEA function to add the failure to.


Example

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

VBA

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


 'Create a new failure. The following code creates a failure described as "Lamp shatters." 
 Dim AFailure As New XfmeaFailure
 AFailure.Dsc = "Lamp shatters"

 'Add the new failure to function #1 located in project #1. 
 MyRepository.Project.SetCurrentProject(1)
 Call MyRepository.Xfmea.AddXfmeaFailure(AFailure,1)
VB.NET

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


 'Create a new failure. The following code creates a failure described as "Lamp shatters." 
 Dim AFailure As New XfmeaFailure
 AFailure.Dsc = "Lamp shatters"

 'Add the new failure to function #1 located in project #1. 
 MyRepository.Project.SetCurrentProject(1)
 MyRepository.Xfmea.AddXfmeaFailure(AFailure,1)