Repository.XFRACAS.GetAllXFRACASEntities: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}}
{{Template:Repository.GetAllXFRACASEntities.Cmt}}
 
 
<onlyinclude>Gets a list of all XFRACAS entity names connected to the current repository. Returns a '''[[NameIdPair Class|NameIDPair]]''' object array that contains the entity names and ID numbers.</onlyinclude>


== Syntax ==
== Syntax ==
*GetAllXFRACASEntities() {{APIPrefix|As}} [[NameIdPair Class|NameIdPair]]()
'''.XFRACAS.GetAllXfracasEntities()'''
 


== Usage Example ==
== Example ==
  '{{APIComment|Declare a new repository connection class.}}
  '''VBA|VB.NET'''
{{APIPrefix|Private WithEvents MyRepository As New [[Repository Class|Repository]]}}
  '{{APIComment|Connect to the Synthesis repository.}}
{{APIComment|'Add code to connect to a Synthesis repository.}}
{{APIPrefix|Dim}}Success{{APIPrefix|As Boolean}}={{APIPrefix|False}}
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
Success = MyRepository.[[Repository.ConnectToRepository|ConnectToRepository]]("RepositoryFileNamePath")
  {{APIComment|...}}
  '{{APIComment|Get the list of XFRACAS Entities in the current project in the connected repository.}}
   
{{APIPrefix|Dim}}ListOfXFRACASEntities() {{APIPrefix|As}} [[NameIdPair Class|NameIdPair]]
 
ListOfXFRACASEntities = MyRepository.XFRACAS.[[Repository.GetAllXFRACASEntities|GetAllXFRACASEntities]]()
{{APIComment|'Get a list of all XFRACAS entities in the repository.}}  
  {{APIPrefix|Dim}} ListofEntities() {{APIPrefix|As}} NameIDPair
  ListOfEntities = MyRepository.XFRACAS.GetAllXfracasEntities()
   
{{APIComment|'Output sample: Display the name and ID of the first available entity.}}
  {{APIPrefix|Dim}} EntityName {{APIPrefix|As}} String
  {{APIPrefix|Dim}} EntityID {{APIPrefix|As}} Integer
  EntityName = ListofEntities(0).Name
  EntityID = ListofEntities(0).ID
  MsgBox (EntityName & {{APIString|", "}} & EntityID)

Revision as of 16:52, 18 August 2015

APIWiki.png


Member of: SynthesisAPI10.Repository


Gets a list of all XFRACAS entity names connected to the current repository. Returns a NameIDPair object array that contains the entity names and ID numbers.

Syntax

.XFRACAS.GetAllXfracasEntities()


Example

VBA|VB.NET

 'Add code to connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  ... 

 
 'Get a list of all XFRACAS entities in the repository.  
 Dim ListofEntities() As NameIDPair
 ListOfEntities = MyRepository.XFRACAS.GetAllXfracasEntities()

 'Output sample: Display the name and ID of the first available entity. 
 Dim EntityName As String
 Dim EntityID As Integer
 EntityName = ListofEntities(0).Name
 EntityID = ListofEntities(0).ID
 MsgBox (EntityName & ", " & EntityID)