Repository.BlockSim.ImportBlockSimXMLFile: Difference between revisions
Jump to navigation
Jump to search
John Leavitt (talk | contribs) |
John Leavitt (talk | contribs) |
||
Line 17: | Line 17: | ||
'{{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.[[Repository. | SuccessImportXML = MyRepository.[[Repository.ImportBlockSimXMLFile|ImportBlockSimXMLFile]]("XMLFilePath") | ||
===Reformatted Usage Example=== | ===Reformatted Usage Example=== |
Revision as of 20:24, 20 March 2014
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
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") ' Import the XML File to the Synthesis repository. DimSuccessImportXMLAs Boolean SuccessImportXML = MyRepository.ImportBlockSimXMLFile("XMLFilePath")
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")
Import the XML File to the Synthesis repository.
Dim SuccessImportXML As Boolean SuccessImportXML = MyRepository.ImportBlockSimXMLFile("XMLFilePath")