Showing results for 
Search instead for 
Do you mean 

Exporting XML Programmatically

by Community Manager Community Manager ‎04-18-2016 11:04 AM - edited ‎04-18-2016 11:06 AM

The following explains how to programmatically create an XML from Rulestream Engineer to simulate a user choosing “Model -> Export XML” from the menu.

 

ObjectManager.SaveXML Method (String, Int32, String, String, Int16, Boolean) saves the information required to rehydrate this model into XML

 

Namespace:  RuleStream.Kernel
Assembly:  Kernel (in Kernel.dll)

 

Syntax

 Public Function SaveXML ( _

        strProject As String, _

        lngLineItem As Integer, _

        strComment As String, _

        strXMLFile As String, _

        intSaveMode As Short, _

        TestMode As Boolean _

) As Boolean

 

 

Parameters

strProject

  • Type: String
  • ProjectID to put into the Model node (can be used to specify a recommended ProjectID to use at load-time).

 

lngLineItem

  • Type: Int32
  • LineItemID to put into the Model node (can be used to specify a recommended LineItemID to use at load-time).

 

strComment

  • Type: String
  • Comment to be put into the Model node.

 

strXMLFile

  • Type: String
  • Filename (and path) to save the XML file to.

 

intSaveMode

  • Type: Int16
  • [Optional] The number of levels down the Model to save. Passing -1 forces all levels to be saved, not just the properties with overrides.

 

TestMode

  • Type: Boolean
  • [Optional] Set to True to denote test mode.

 

Return Value

status as Boolean [True = success]

Contributors