Repository.BlockSim.ImportBlockSimXMLFile: Difference between revisions
Jump to navigation
Jump to search
Alex Ulanov (talk | contribs) |
Alex Ulanov (talk | contribs) |
||
Line 11: | Line 11: | ||
'{{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|Import the XML File to the Synthesis repository.}} | '{{APIComment|Import the XML File to the Synthesis repository.}} | ||
{{APIPrefix|Dim}}SuccessImportXML{{APIPrefix|As Boolean}} | {{APIPrefix|Dim}}SuccessImportXML{{APIPrefix|As Boolean}} | ||
SuccessImportXML = MyRepository. | SuccessImportXML = MyRepository.BlockSim.[[Repository.ImportBlockSimXMLFile|ImportBlockSimXMLFile]]("XMLFilePath") | ||
Revision as of 16:42, 22 May 2015
Synthesis API allows the programmer to import XML files into a current project of BlockSim. The page contains the logic of that importation. All XML files must first be in XML format before they can be successfully imported. This page will demonstrate the importation process.
Syntax
- ImportBlockSimXMLFile( XMLFile As String ) As Boolean
Parameters
- XMLFile: The path for the XML file to import.
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") ' Import the XML File to the Synthesis repository. DimSuccessImportXMLAs Boolean SuccessImportXML = MyRepository.BlockSim.ImportBlockSimXMLFile("XMLFilePath")