Itembyindex, Itembyprogrammaticname, Itembyindex m – Echelon OpenLNS User Manual

Page 660: Itembyprogammaticname

Advertising
background image

OpenLNS Programmer's Reference

623

acted upon was obtained from a

LonMarkObject

; otherwise, it is

ignored.

Added to API

LNS Release 3.20.

ItemByIndex

Summary

Retrieves a

NetworkVariable

object from a

NetworkVariables

collection. The object to be retrieved must be specified by its

index value.

This property is only supported by NetworkVariables

collections that belong to Interface or LonMarkObject objects.

If this method is invoked on a different type of network

variable collection (one accessed through the NVHubs or

NVTargets property), an invalid type exception (LCA #2) is

raised. If this exception is encountered, it indicates that the

specified collection does not support the ItemByIndex method.
You can use this method when working with a dynamic

network variable, which has an OLE collection index and

name that may change because of the addition or removal of

other dynamic network variables within its collection.

Availability

Local, full, and lightweight clients.

Syntax

itemObject = itemsColl.

ItemByIndex

index

Element

Description

itemObject

The

NetworkVariable

object retrieved

from the collection.

itemsColl

The

NetworkVariables

collection to be

acted on.

index

An Integer value specifying the

Index

property of the

NetworkVariable

object

to be retrieved.

Added to API

LNS Release 3.0.

ItemByProgrammaticName

Summary

Retrieves a

NetworkVariable

object from a

NetworkVariables

collection by its programmatic name.
You can determine the programmatic name of a

NetworkVariable

object by reading its

ProgrammaticName

property. Alternatively, you can retrieve a

NetworkVariable

object from this collection by their user names using the

Item

property.

Availability

Local, full, and lightweight clients.

Advertising