Repository.XFRACAS.GetAllXFRACASEntities: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:




<onlyinclude>Gets a list of all XFRACAS entities connected to the current repository. Returns a '''[[NameIdPair Class|NameIDPair]]''' object array that contains the entity names and ID numbers.</onlyinclude>
<onlyinclude>Gets a list of XFRACAS entities connected to a Synthesis repository. Returns a '''[[NameIdPair Class|NameIDPair]]''' object array that contains all the entities connected to that repository.</onlyinclude>


== Syntax ==
== Syntax ==
Line 20: Line 20:
   ListOfEntities = MyRepository.XFRACAS.GetAllXfracasEntities()
   ListOfEntities = MyRepository.XFRACAS.GetAllXfracasEntities()
   
   
  {{APIComment|'Output sample: Display the name and ID of the first available entity.}}
  {{APIComment|'Output sample: Display the number of elements in the array.}}
   {{APIPrefix|Dim}} EntityName {{APIPrefix|As}} String
   {{APIPrefix|Dim}} NumberofElements {{APIPrefix|As}} Integer
  {{APIPrefix|Dim}} EntityID {{APIPrefix|As}} Integer
   NumberofElements = UBound(ListofEntities) - LBound(ListofEntities) + 1
   EntityName = ListofEntities(0).Name
   MsgBox (NumberofElements)
  EntityID = ListofEntities(0).ID
   MsgBox (EntityName & {{APIString|", "}} & EntityID)

Revision as of 16:33, 25 August 2015

APIWiki.png


Member of: SynthesisAPI10.Repository


Gets a list of XFRACAS entities connected to a Synthesis repository. Returns a NameIDPair object array that contains all the entities connected to that repository.

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.  
 Dim ListofEntities() As NameIDPair
 ListOfEntities = MyRepository.XFRACAS.GetAllXfracasEntities()

 'Output sample: Display the number of elements in the array. 
 Dim NumberofElements As Integer
 NumberofElements = UBound(ListofEntities) - LBound(ListofEntities) + 1
 MsgBox (NumberofElements)