Repository.Xfmea.AddXfmeaFunction Method

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 MyRepository Repository MyRepository.ConnectToAccessRepository Function1 XfmeaFunction Function1.Dsc = MyRepository.Project.SetCurrentProject(1) MyRepository.Xfmea.AddXfmeaFunction(Function1,1)

VB.NET MyRepository Repository MyRepository.ConnectToAccessRepository Function1 XfmeaFunction Function1.Dsc = MyRepository.Project.SetCurrentProject(1) MyRepository.Xfmea.AddXfmeaFunction(Function1,1)