Newenum, Formatspec, E formatspec o – Echelon OpenLNS User Manual

Page 396

Advertising
background image

OpenLNS Programmer's Reference

359

Added to API

Depends on the object used to access the property. Generally,

this property exists for an object as soon as the object is

added to the API.

_NewEnum

Summary

Enables you to iterate over the objects in a collection using

For Each ... Next statements.

If you are developing your OpenLNS app in Visual C++,

you can browse a collection to find a particular item by

using the _NewEnum property. See the IEnumVARIANT
interface for details.

If you are developing your OpenLNS app in Visual Basic,

you do not need to use the _NewEnum property because

it is automatically used in the implementation of For

Each ... Next statements.

If you are developing your OpenLNS app in C#, you do

not need to use the _NewEnum property explicitly

because it is automatically used in the implemention of

foreach statements.

Availability

Local, full, and lightweight clients.

Syntax

retrievedObject = coll

Object._NewEnum

Element

Description

retrievedObject

An expression that evaluates to the

object retrieved.

collObject

An iterator object that can be used to

access members of the collection.

Data Type

Object.

Read/Write

Read only.

Added to API

OpenLNS.

FormatSpec

A

FormatSpec

object specifies the format to use when reading the formatted value a data

point or monitor point. The information in this object is used to lookup information

OpenLNS uses to format the values in the device resource catalog, such as unit conversion

factors and precision settings.

The

FormatSpec

object contained within the

FormatSpec

property of each

DataPoint

and

NvMonitorPoint

object (as well as within the

InputFormatSpec

and

OutputFormatSpec

properties of each

MsgMonitorPoint

object) is not passed by reference. If you modify the

values assigned to the properties of a local

FormatSpec

object, you must then explicitly

assign the modified

FormatSpec

object back to the

FormatSpec

property of the

NvMonitorPoint

or

DataPoint

object (or to the

InputFormatSpec

and

OutputFormatSpec

properties of each

MsgMonitorPoint

object) for the changes to take effect. This following code

sample demonstrates this procedure:

Advertising