Repository.BlockSim.ImportBlockSimXMLFile: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:


== Usage Example ==
== Usage Example ==
{{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}}
        Dim Success As Boolean = False
Success = MyRepository.[[Repository.ConnectToSQLRepository|ConnectToSQLRepository]]("SQLServerPath", "SQLDatabaseName")
        Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName")
'{{APIComment|Import the XML File to the Synthesis repository.}}
 
{{APIPrefix|Dim SuccessImportXML {{APIPrefix|As Boolean}}
{{APIComment|Import the XML File to the Synthesis repository.}}
SuccessImportXML = MyRepository.[[Repository.ImportXFRACASXMLFile|ImportXFRACASXMLFile]]("XMLFilePath")
        Dim SuccessImportXML As Boolean
        SuccessImportXML = MyRepository.ImportBlockSimXMLFile("XMLFilePath")


=Reformatted Usage Example=
=Reformatted Usage Example=
== Usage Example ==
== Usage Example ==


{{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.}}
         Dim Success As Boolean = False
         Dim Success As Boolean = False
         Success = MyRepository.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.}}
         Dim SuccessImportXML As Boolean
         Dim SuccessImportXML As Boolean
         SuccessImportXML = MyRepository.ImportBlockSimXMLFile("XMLFilePath")
         SuccessImportXML = MyRepository.[[Repository.ImportXFRACASXMLFile|ImportXFRACASXMLFile]]("XMLFilePath")

Revision as of 16:00, 18 October 2013


Imports from XML file

Method Syntax

Public Function ImportBlockSimXMLFile( ByVal XMLFile As String ) As As Boolean
Imports from XML file to the current project.

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. 
{{APIPrefix|Dim SuccessImportXML As Boolean
SuccessImportXML = MyRepository.ImportXFRACASXMLFile("XMLFilePath")

Reformatted Usage Example

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.ImportXFRACASXMLFile("XMLFilePath")