Repository.BlockSim.ExportBlockSimXMLFile: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
Line 18: Line 18:
   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|'Set a first available project as current.}}
  MyRepository.Project.SetCurrentProject(0)
 
  '{{APIComment|Export the XML File from the current project.}}
  {{APIPrefix|Dim}}SuccessExportXML{{APIPrefix|As Boolean}}
  {{APIPrefix|Dim}}SuccessExportXML{{APIPrefix|As Boolean}}
   SuccessExportXML = MyRepository.BlockSim.ExportBlockSimXMLFile("XML_File_Name")
   SuccessExportXML = MyRepository.BlockSim.ExportBlockSimXMLFile("XML_File_Name")

Revision as of 20:55, 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")

 'Set a first available project as current. 
 MyRepository.Project.SetCurrentProject(0)
' Export the XML File from the current project. 
DimSuccessExportXMLAs Boolean
 SuccessExportXML = MyRepository.BlockSim.ExportBlockSimXMLFile("XML_File_Name")