Repository.Xfmea.AddItemToSystemHierarchy Method

Adds a new system hierarchy item to the current project. Returns a Boolean value; when true, indicates a successful save.

Syntax
.Xfmea.AddItemToSystemHierarchy(Item, ParentID)

Parameters
Item
 * Required. The XfmeaItem object that represents the system hierarchy item to be added.

ParentID
 * Required. Integer. The record ID of the parent item. The new system hierarchy item will be saved as a next level item under the parent item.

Example
This example assumes that system hierarchy items exist in the first available project of repository. The code creates a new system hierarchy item, and then saves it to the repository. VBA MyRepository Repository MyRepository.ConnectToAccessRepository NewItem XfmeaItem NewItem.Nm = MyRepository.Project.SetCurrentProject(1) MyRepository.Xfmea.AddItemToSystemHierarchy(NewItem,1)

VB.NET MyRepository Repository MyRepository.ConnectToAccessRepository NewItem XfmeaItem NewItem.Nm = MyRepository.Project.SetCurrentProject(1) MyRepository.Xfmea.AddItemToSystemHierarchy(NewItem,1)