Repository.BlockSim.ExportBlockSimXMLFile: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:APIClass|Repository Class|Repository}}
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.
This Synthesis API allows the programmer to export XML files out of a current project of BlockSim.  


== Syntax  ==
== Syntax  ==
Line 7: Line 7:
Parameters
Parameters
:''FileName'': XML file name.
:''FileName'': XML file name.
{{Template:BooleanReturn.Cmt}}


== Usage Example ==
== Usage Example ==
{{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}}
   Success = MyRepository.[[Repository.ConnectToSQLRepository|ConnectToSQLRepository]]("SQLServerPath", "SQLDatabaseName")
   Success = MyRepository.[[Repository.ConnectToSQLRepository|ConnectToSQLRepository]]("SQLServerPath", "SQLDatabaseName")
  '{{APIComment|Export the XML File out of the Synthesis repository.}}
  '{{APIComment|Export the XML File out of the Synthesis repository.}}
  {{APIPrefix|Dim}}SuccessExportXML{{APIPrefix|As Boolean}}
  {{APIPrefix|Dim}}SuccessExportXML{{APIPrefix|As Boolean}}
   SuccessExportXML = MyRepository.[[Repository.ExportBlockSimXMLFile|ExportBlockSimXMLFile]]("XML_File_Name")
   SuccessExportXML = MyRepository.[[Repository.ExportBlockSimXMLFile|ExportBlockSimXMLFile]]("XML_File_Name")
===Reformatted Usage Example===
{{APIComment|Declare a new repository connection class.}}
        Private WithEvents MyRepository As New Repository
{{APIComment|Connect to the Synthesis repository.}}
        Dim Success As Boolean = False
        Success = MyRepository.[[Repository.ConnectToSQLRepository|ConnectToSQLRepository]]("SQLServerPath", "SQLDatabaseName")
{{APIComment|Export the XML File out of the Synthesis repository.}}
        Dim SuccessExportXML As Boolean
        SuccessImportXML = MyRepository.[[Repository.ExportBlockSimXMLFile|ExportBlockSimXMLFile]]("XML_File_Name")

Revision as of 16:47, 22 May 2015


This Synthesis API allows the programmer to export XML files out of a current project of BlockSim.

Syntax

  • ExportBlockSimXMLFile( FileName As String ) As Boolean

Parameters

FileName: XML file name.

Returns True if successful, otherwise returns False.

Usage Example

' 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")