|
|
Line 1: |
Line 1: |
| =DRAFT= | | =DRAFT= |
| {{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}
| |
|
| |
|
| |
| <onlyinclude>Gets a list of all BlockSim fault trees associated with a project. Returns a '''[[NameIdPair Class|NameIdPair]]''' object that represents the name and ID pairs of the fault trees.</onlyinclude>
| |
|
| |
| == Syntax ==
| |
| '''.BlockSim.GetAllFaultTrees()'''
| |
|
| |
|
| |
| ==Example==
| |
| '''VBA|VB.NET'''
| |
|
| |
| {{APIComment|'Connect to a Synthesis repository.}}
| |
| {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
| |
| MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}})
| |
|
| |
| {{APIComment|'Connect to project#1 in the repository.}}
| |
| MyRepository.Project.SetCurrentProject (1)
| |
|
| |
| {{APIComment|'Get a list of all fault trees in project #1.}}
| |
| {{APIPrefix|Dim}} ListofFTs() {{APIPrefix|As}} NameIdPair
| |
| ListofFTs = MyRepository.BlockSim.GetAllFaultTrees()
| |
|
| |
| {{APIComment|'Output sample: Display the number of fault trees in the project.}}
| |
| {{APIPrefix|Dim}} NumberofElements {{APIPrefix|As}} Integer
| |
| NumberofElements = UBound(ListofFTs) - LBound(ListofFTs) + 1
| |
| MsgBox (NumberofElements)
| |