NameIdPair Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(published changes for 10.1.4)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}  
{{Template:API}}{{Template:APIBreadcrumb}}
Used with the GetAllProjects, GetCurrentProject, GetAllModelsInfo and GetAllXfracasEntities methods in the [[Repository_Class|Repository]] class to store the name and ID of a project, model or XFRACAS entity.
 
 
<onlyinclude>Represents the name and ID pair of a project, XFRACAS entity, model resource, reliability block diagram (RBD) or fault tree.</onlyinclude>


== Properties  ==
== Properties  ==
*Name (as ''string'') {{APIComment|Gets the name.}}
{| {{APITable}}
*ID (as ''integer'') {{APIComment|Gets the ID number.}}
|-
| style="width: 130px;"|Name||Gets or sets the name. '''String'''.
|-
|ID||Gets or sets the numeric ID number. '''Integer'''.
|}
 
 
 
 
 


== Usage Example ==
==See Also==
{{APIComment|'Declare a new repository connection object.}}
*[[Repository.Project.GetAllProjects|Repository.Project.GetAllProjects Method]]
  Dim MyRepository As New Repository
*[[Repository.Project.GetCurrentProject|Repository.Project.GetCurrentProject Method]]
 
*[[Repository.XFRACAS.GetAllXFRACASEntities|Repository.XFRACAS.GetAllXFRACASEntities Method]]
{{APIComment|'Connect to a Synthesis repository.}}
*[[Repository.Model.GetAllModelsInfo|Repository.Model.GetAllModelsInfo Method]]
  Dim Success As Boolean = False
*[[Repository.BlockSim.GetAllRBDs]]
  Success = MyRepository.ConnectToRepository("C:\Users\Name\Documents\ReliaSoft\Files\repository.rsr9")
*[[Repository.BlockSim.GetAllFaultTrees]]
 
{{APIComment|'Get a list of names/IDs describing the projects in the current repository.}}
  Dim ListOfProjects() As NameIdPair
  ListOfProjects = MyRepository.GetAllProjects()
 
{{APIComment|'Get the first project name in the list.}}
  Dim ProjectName As String
  ProjectName = ListOfProjects(0).Name

Latest revision as of 23:36, 6 September 2016

APIWiki.png


Member of: SynthesisAPI


Represents the name and ID pair of a project, XFRACAS entity, model resource, reliability block diagram (RBD) or fault tree.

Properties

Name Description
Name Gets or sets the name. String.
ID Gets or sets the numeric ID number. Integer.




See Also