Remove – Echelon OpenLNS User Manual

Page 661

Advertising
background image

OpenLNS Programmer's Reference

624

Syntax

retrievedObject = collection.

ItemByProgrammaticName

progName

Element

Description

retrievedObject The

NetworkVariable

object to be

retrieved from the collection.

collection

The

NetworkVariables

collection being

acted upon.

progName

The

ProgrammaticName

of the

NetworkVariable

object to be retrieved.

Added to API

LNS Release 3.20.

Remove

Summary

Removes a

NetworkVariable

object from the

NetworkVariables

collection. You must specify the network

variable to be removed by its name, or by its index number

within the collection.

You can use this method to remove network variables from

collections that are contained by dynamic LonMarkObject

objects, or by custom Interface objects.
The indexName element is a Variant type that allows you to

specify the network variable to be deleted by its user name or

by the index value assigned to it within the

NetworkVariables collection.
Note: The index value assigned within the NetworkVariables

collection is not the same as the Index property, which stores

the device index value of the network.
You can determine the user name of a network variable by

reading its Name property. If you use the user name to

identify the network variable, it is important to make certain

that you do not specify a user name that is shared by more

than one network variable.
You should use the RemoveByIndex method to remove a

network variable. This method allows you to specify the

NetworkVariable to be removed by its device index number,

which is guaranteed to be a static, unique value.
If the network variable is a member of a LonMarkObject , it

will be unassigned from the LonMarkObject as it is deleted. If

the network variable is part of a connection, it will not be

deleted, and the NS, #164 lcaErrNsNvmtInUse exception

will be thrown.

Availability

Local, full, lightweight, and independent clients. Note that

some collections are not available to Independent clients.

Syntax

networkVariables.Remove indexName

Element

Description

Advertising