Repository.Xfmea.AddXfmeaFunction Method: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 2: Line 2:




<onlyinclude>Adds a new Xfmea function to a Synthesis repository. Returns a '''Boolean''' value; when true, indicates a successful save. </onlyinclude>
<onlyinclude>Adds a new FMEA function to a Synthesis repository. Returns a '''Boolean''' value; when true, indicates a successful save. </onlyinclude>


==Syntax==
==Syntax==
Line 16: Line 16:


==Example==
==Example==
This example assumes that system hierarchy items exist in a repository. It creates a new Xfmea function, and then saves it to one of the system hierarchy items in the repository.
This example assumes that system hierarchy items exist in a repository. It creates a new FMEA function, and then saves it to one of the system hierarchy items in the repository.
  '''VBA'''
  '''VBA'''
   
   
Line 24: Line 24:
   
   
   
   
  {{APIComment|'Create a new Xfmea function. The following code creates a function described as "New_Function."}}
  {{APIComment|'Create a new function. The following code creates a function described as "New_Function."}}
   {{APIPrefix|Dim}} Function1 {{APIPrefix|As New}} XfmeaFunction
   {{APIPrefix|Dim}} Function1 {{APIPrefix|As New}} XfmeaFunction
   Function1.Dsc = {{APIString|"New_Function"}}
   Function1.Dsc = {{APIString|"New_Function"}}
Line 39: Line 39:
   
   
   
   
  {{APIComment|'Create a new Xfmea function. The following code creates a function described as "New_Function."}}
  {{APIComment|'Create a new function. The following code creates a function described as "New_Function."}}
   {{APIPrefix|Dim}} Function1 {{APIPrefix|As New}} XfmeaFunction
   {{APIPrefix|Dim}} Function1 {{APIPrefix|As New}} XfmeaFunction
   Function1.Dsc = {{APIString|"New_Function"}}
   Function1.Dsc = {{APIString|"New_Function"}}

Revision as of 22:31, 11 September 2015

APIWiki.png


Member of: SynthesisAPI10.Repository


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

Syntax

.Xfmea.AddXfmeaFunction(func, HID)

Parameters

func

Required. The XfmeaFunction object to be added.

HID

Required. Integer. The Hierarchy ID or record ID of the system hierarchy item to add the function to.


Example

This example assumes that system hierarchy items exist in a repository. It creates a new FMEA function, and then saves it to one of the system hierarchy items in the repository.

VBA

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


 'Create a new function. The following code creates a function described as "New_Function." 
 Dim Function1 As New XfmeaFunction
 Function1.Dsc = "New_Function"

 'Add the new function to system hierarchy item #1 located in project #1. 
 MyRepository.Project.SetCurrentProject(1)
 Call MyRepository.Xfmea.AddXfmeaFunction(Function1,1)
VB.NET

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


 'Create a new function. The following code creates a function described as "New_Function." 
 Dim Function1 As New XfmeaFunction
 Function1.Dsc = "New_Function"

 'Add the new function to system hierarchy item #1 located in project #1. 
 MyRepository.Project.SetCurrentProject(1)
 MyRepository.Xfmea.AddXfmeaFunction(Function1,1)