Repository.Xfmea.AddXfmeaFunction 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 2: | Line 2: | ||
<onlyinclude>Adds a new FMEA function to a Synthesis | <onlyinclude>Adds a new FMEA function to a Synthesis hierarchy item. Returns a '''Boolean''' value; when true, indicates a successful save. </onlyinclude> | ||
If the system hierarchy item does not already have an FMEA analysis, a new FMEA will be automatically created when you use the API to add a function. | If the system hierarchy item does not already have an FMEA analysis, a new FMEA will be automatically created when you use the API to add a function. |
Revision as of 16:13, 8 April 2016
Member of: SynthesisAPI.Repository
Adds a new FMEA function to a Synthesis hierarchy item. Returns a Boolean value; when true, indicates a successful save.
If the system hierarchy item does not already have an FMEA analysis, a new FMEA will be automatically created when you use the API to add a function.
Syntax
.Xfmea.AddXfmeaFunction(func, HID)
Parameters
func
- Required. The XfmeaFunction object to be added.
HID
- Required. Integer. The record ID of the parent system hierarchy item.
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 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10") '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 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10") '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)