Repository.Xfmea.GetAllXfmeaFunctions Method: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
Kate Racaza (talk | contribs) No edit summary  | 
				Kate Racaza (talk | contribs) No edit summary  | 
				||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Template:API}}{{Template:APIBreadcrumb  | {{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}  | ||
<onlyinclude>  | <onlyinclude>Returns an array of '''[[XfmeaFunction Class|XfmeaFunction]]''' objects that represent the FMEA functions associated with a system hierarchy item.</onlyinclude>     | ||
== Syntax ==  | == Syntax ==  | ||
| Line 9: | Line 9: | ||
===Parameters===  | ===Parameters===  | ||
''HID''  | ''HID''  | ||
:Required. Integer. The   | :Required. Integer. The record ID of the system hierarchy item.  | ||
''IncludeLinkedAnalyses''  | ''IncludeLinkedAnalyses''  | ||
| Line 20: | Line 20: | ||
  '''VBA|VB.NET'''  |   '''VBA|VB.NET'''  | ||
  {{APIComment|'  |   {{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}}  | ||
    {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository  |     {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository  | ||
   MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}})  | |||
  {{APIComment|'Get a list of all FMEA functions associated with system hierarchy item #1 in project #1.}}  |   {{APIComment|'Get a list of all FMEA functions associated with system hierarchy item #1 in project #1.}}  | ||
   {{APIPrefix|Dim}} ListofFunctions() {{APIPrefix|As}} XfmeaFunction  | |||
   MyRepository.Project.SetCurrentProject (1)     | |||
   ListofFunctions = MyRepository.Xfmea.GetAllXfmeaFunctions(1,{{APIPrefix|True}})  | |||
  {{APIComment|'Output sample: Display the number of elements in the array.}}  |   {{APIComment|'Output sample: Display the number of elements in the array.}}  | ||
   {{APIPrefix|Dim}} NumberofElements {{APIPrefix|As}} Integer  | |||
   NumberofElements = UBound(ListofFunctions) - LBound(ListofFunctions) + 1  | |||
   MsgBox (NumberofElements)  | |||
Latest revision as of 18:38, 9 June 2016
![]()  | 
Member of:  SynthesisAPI.Repository   
Returns an array of XfmeaFunction objects that represent the FMEA functions associated with a system hierarchy item.  
Syntax
.Xfmea.GetAllXfmeaFunctions(HID, IncludeLinkedAnalyses)
Parameters
HID
- Required. Integer. The record ID of the system hierarchy item.
 
IncludeLinkedAnalyses
- Required. Boolean. Indicates whether to include linked FMEAs in the array.
 
Example
This example assumes that system hierarchy items with FMEA functions exist in the first available project of a repository.
VBA|VB.NET 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10") 'Get a list of all FMEA functions associated with system hierarchy item #1 in project #1. Dim ListofFunctions() As XfmeaFunction MyRepository.Project.SetCurrentProject (1) ListofFunctions = MyRepository.Xfmea.GetAllXfmeaFunctions(1,True) 'Output sample: Display the number of elements in the array. Dim NumberofElements As Integer NumberofElements = UBound(ListofFunctions) - LBound(ListofFunctions) + 1 MsgBox (NumberofElements)
