Repository.BlockSim.ImportBlockSimXMLFile: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) mNo edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 17: | Line 17: | ||
'''VBA|VB.NET''' | '''VBA|VB.NET''' | ||
{{APIComment|' | {{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}} | ||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | ||
MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}}) | |||
{{APIComment|'Import the data from the XML file into project #1 in the repository.}} | {{APIComment|'Import the data from the XML file into project #1 in the repository.}} | ||
MyRepository.Project.SetCurrentProject(1) | MyRepository.Project.SetCurrentProject(1) | ||
MyRepository.BlockSim.ImportBlockSimXMLFile({{APIString|"C:\BlockSimData.xml"}}) | MyRepository.BlockSim.ImportBlockSimXMLFile({{APIString|"C:\BlockSimData.xml"}}) |
Revision as of 18:56, 8 April 2016
Member of: SynthesisAPI.Repository
Imports data from an XML file into a BlockSim project. Returns a Boolean value; when true, indicates a successful import.
In BlockSim, the XML files can include the block properties and information on how the blocks are connected in a reliability block diagram or fault tree diagram. Data on visual aspects, such as diagram style settings, block style settings, etc., are not supported.
Syntax
.BlockSim.ImportBlockSimXMLFile(XMLFile)
Parameters
XMLFile
- Required. String. The complete path to the XML file to be imported.
Example
This example assumes that an XML file called "BlockSimData.xml" exists in the C: drive. The code ignores the return value.
VBA|VB.NET 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10") 'Import the data from the XML file into project #1 in the repository. MyRepository.Project.SetCurrentProject(1) MyRepository.BlockSim.ImportBlockSimXMLFile("C:\BlockSimData.xml")