Defining import automation properties – Echelon LonWorks Network XML User Manual

Page 15

Advertising
background image

L

ON

W

ORKS

Network XML Programmer’s Guide

7

Defining Import Automation Properties

You can define standard LNS Plug-in properties and the following import automation properties in the
director application. See Appendix B of the LNS Plug-In Programmer’s Guide for more information
about the standard plug-in properties you can define.

Property Name

Type

Description

XmlFileName

BSTR

Specifies the full path of the XML file to be imported. The
file must already exist.

LogFileName

BSTR

Specifies the full path of a log file to be created during the
import. The log file reports the results of the import. If a
file already exists with the same name, it will be
overwritten.

If you do not specify a name or the field is empty, the log
file is not created

The directory specified for the log file must already exist.

XmlOptions

Long

Specifies export options. You can specify multiple options
by ORing the following values together.

&H01. Suppress status dialog. The XML plug-in does

not display a status dialog. The status dialog shows the
progress of the import operation and any errors.

&H02. Suppress options dialog. The XML plug-in

does not display an import options dialog. If this
option is not set, you are prompted to specify the
import options (including whether to cancel the
import). Defaults for the options dialog are based on
the parameters sent to the plug-in.

&H04. Import the XML data into the subsystem

specified in the

SendCommand request. If you do not

set this option, the data is imported into the subsystem
specified as the root subsystem in the XML file (if the
root subsystem value is empty or missing, the data is
imported into the first top-level subsystem in the
network). The default is to import the data based on the
subsystem specified in the imported XML file.

The following example adds code to set optional import properties.

using

System;

using

System.Collections.Generic;

using

System.IO;

using

System.Text;

using

System.Threading;

using

System.Xml;

using

PlugInWrapper;

namespace

myLmXmlNetwork

{

class

myLmXmlNetwork

{

static

void

Main(

string

[] args)

{

LonMakerXmlPlugIn

m_lmXml =

new

LonMakerXmlPlugIn

();

m_lmXml.NetworkName =

"MyXmlNetwork"

;


// *Insert import automation properties before invoking send command*

Advertising