Repository.BlockSim.ExportBlockSimXMLFile: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 11: Line 11:
{{APIComment|Code Block}}
{{APIComment|Code Block}}
  '{{APIComment|Declare a new repository connection class.}}
  '{{APIComment|Declare a new repository connection class.}}
  {{APIPrefix|Private WithEvents MyRepository As [[New Repository]]}}
  {{APIPrefix|Private WithEvents MyRepository As New Repository}}
  '{{APIComment|Connect to the Synthesis repository.}}
  '{{APIComment|Connect to the Synthesis repository.}}
  {{APIPrefix|Dim}}Success{{APIPrefix|As Boolean}}={{APIPrefix|False}}
  {{APIPrefix|Dim}}Success{{APIPrefix|As Boolean}}={{APIPrefix|False}}
Line 22: Line 22:


{{APIComment|Declare a new repository connection class.}}
{{APIComment|Declare a new repository connection class.}}
         Private WithEvents MyRepository As [[New Repository]]
         Private WithEvents MyRepository As New Repository


{{APIComment|Connect to the Synthesis repository.}}
{{APIComment|Connect to the Synthesis repository.}}

Revision as of 22:24, 23 May 2014


Synthesis API allows the programmer to export XML files out of a current project of BlockSim. The page contains the logic of that importation. This page will demonstrate the exportation process.

Syntax

  • ExportBlockSimXMLFile( FileName As String ) As Boolean

Parameters

FileName: XML file name.

Usage Example

Code Block

' Declare a new repository connection class. 
Private WithEvents MyRepository As New Repository
' Connect to the Synthesis repository. 
DimSuccessAs Boolean=False
 Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName")
' Export the XML File out of the Synthesis repository. 
DimSuccessExportXMLAs Boolean
 SuccessExportXML = MyRepository.ExportBlockSimXMLFile("XML_File_Name")

Reformatted Usage Example

Declare a new repository connection class.

       Private WithEvents MyRepository As New Repository

Connect to the Synthesis repository.

       Dim Success As Boolean = False
       Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName")

Export the XML File out of the Synthesis repository.

       Dim SuccessExportXML As Boolean
       SuccessImportXML = MyRepository.ExportBlockSimXMLFile("XML_File_Name")