NameIdPair Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}  
{{Template:API}}{{Template:APIBreadcrumbClass}}
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>Stores the name and ID of a project, XFRACAS entity or other Synthesis item.</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 item's name. '''String'''.
== Usage Example ==
|-
{{APIComment|'Declare a new repository connection object.}}
|ID||Gets or sets the item's (system-generated) ID number. '''Integer'''.
  Dim MyRepository As New Repository
|}
 
{{APIComment|'Connect to a Synthesis repository.}}
  Dim Success As Boolean = False
  Success = MyRepository.ConnectToRepository("C:\Users\Name\Documents\ReliaSoft\Files\repository.rsr9")
 
{{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

Revision as of 17:37, 7 August 2015

APIWiki.png


Member of: SynthesisAPI


Stores the name and ID of a project, XFRACAS entity or other Synthesis item.

Properties

Name Description
Name Gets or sets the item's name. String.
ID Gets or sets the item's (system-generated) ID number. Integer.