Repository.BlockSim.ExportBlockSimXMLFile: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 11: Line 11:
=== Parameters ===
=== Parameters ===
''FileName''
''FileName''
:String. The name for the new XML file.
:String. The save location and name for the new XML file.




Line 23: Line 23:
   
   
   
   
  {{APIComment|'Export the data from project #1 in the repository.}}
  {{APIComment|'Export the data from project #1 in the repository. Name the file "MyBlockSimData.xml" and save it in the C: drive.}}
   MyRepository.Project.SetCurrentProject(1)
   MyRepository.Project.SetCurrentProject(1)
   MyRepository.BlockSim.ExportBlockSimXMLFile({{APIString|"MyBlockSimData.xml"}})
   MyRepository.BlockSim.ExportBlockSimXMLFile({{APIString|"C:\MyBlockSimData.xml"}})

Revision as of 20:04, 30 July 2015

APIWiki.png


Member of: SynthesisAPI10.Repository


Exports data from a BlockSim project to a new XML file. Returns a Boolean value; when true, indicates a successful export.

In BlockSim, the XML files 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 included.

Syntax

.BlockSim.ExportBlockSimXMLFile(FileName)

Parameters

FileName

String. The save location and name for the new XML file.


Example

This example assumes that reliability block diagrams exist in the first available project in the repository.

VBA|VB.NET 

 'Add code to connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  ... 


 'Export the data from project #1 in the repository. Name the file "MyBlockSimData.xml" and save it in the C: drive. 
  MyRepository.Project.SetCurrentProject(1)
  MyRepository.BlockSim.ExportBlockSimXMLFile("C:\MyBlockSimData.xml")