Difference between revisions of "Upload XML File to XFRACAS/VBA"

From ReliaWiki
Jump to navigation Jump to search
(Created page with '{{Template:API}} ==Tutorial: Upload XML file to XFRACAS== Below is the VBA version of the tutorial. '''VBA''' {{APIPrefix|Sub}} Main() {{…')
 
(Redirected page to API Tutorials)
 
Line 1: Line 1:
{{Template:API}}
+
#REDIRECT [[API Tutorials]]
 
 
==Tutorial: Upload XML file to XFRACAS==
 
Below is the VBA version of the [[Upload_XML_File_to_XFRACAS|tutorial]].
 
 
 
'''VBA'''
 
 
{{APIPrefix|Sub}} Main()
 
 
  {{APIComment|'Connect to the Synthesis enterprise repository.}}
 
    {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
 
    {{APIPrefix|Call}} MyRepository.ConnectToSQLRepository({{APIString|"ServerName"}}, {{APIString|"DatabaseName"}}){{APIComment|'Replace with values for test repository.}}
 
 
  {{APIComment|'Get a list of all available XFRACAS entities.}}
 
    {{APIPrefix|Dim}} ListOfEntities() {{APIPrefix|As}} NameIdPair
 
    ListOfEntities = MyRepository.XFRACAS.GetAllXfracasEntities
 
 
  {{APIComment|'Select an XFRACAS entity. This example gets the first available entity in the array.}}
 
    {{APIPrefix|Dim}} EntityID {{APIPrefix|As}} Integer
 
    EntityID = ListOfEntities(0).ID
 
 
  {{APIComment|'Upload the XML file to the import queue of the XFRACAS entity. This code assumes that an XML file}}
 
  {{APIComment|'called XMLData.xml contains XFRACAS incidents and is saved in the C drive.}}
 
    {{APIPrefix|Dim}} j {{APIPrefix|As}} Integer
 
    j = MyRepository.XFRACAS.ImportXfracasXmlFile(EntityID, XFRACASImportType_Incident, {{APIString|"C:\XMLData.xml"}}, {{APIString|"My new data"}})
 
 
 
{{APIPrefix|End Sub}}
 

Latest revision as of 22:15, 12 April 2017

Redirect to: