Owner manual

OpenLNS Programmer's Reference 579
Syntax
dpObject=networkVariable.DataPoint options
Element
Description
dpObject
The DataPoint object returned.
networkVariable
The NetworkVariable object being
acted upon.
options
This field is fixed at 0, and it is
reserved for future use.
Added to API
LNS Release 3.20.
MoveToInterface
Summary
Moves a dynamic network variable from one custom interface
on a device to another.
Each AppDevice on a network includes an Interface property
that contains the device’s main interface, and an Interfaces
collection that contains the custom interfaces that have been
added to the device dynamically. The interfaces each contain
LonMarkObjects and network variables that reflect the
device’s functionality on the network.
You can use the MoveToInterface method to move a dynamic
network variable or LonMarkObject from one custom
interface on a device to another. An advantage of this is that
you do not have to delete the network variable or
LonMarkObject from the first custom interface, and then add
it back to the second one.
Another advantage of this method is that you can use it to
remove a dynamic network variable from a device’s main
interface. You cannot use the Remove method to remove a
network variable from NetworkVariables collection on a
device's main interface, even if it is a dynamic network
variable. However, you can use the MoveToInterface method
to move a dynamic network variable from the main interface
to a custom interface. Once you have done so, you can remove
the network variable from the custom interface, and its
removal will be propagated to the main interface.
The ability to move a dynamic LonMarkObject or network
variable from one interface to another may also be useful
after you have upgraded a device’s interface with the
Upgrade method. Some static network variables and network
variables that existed on the old interface, but not the new
one, will be converted to dynamic and stored in a custom
Interface object created during the upgrade. You can use this
method to move those objects back to their correct interface.
If either the main interface, or an interface from another
device, is specified as the new interface for the
LonMarkObject or network variable, then the LCA, #4
lcaErrInvalidOleObject exception will be thrown.
If you call this method on a static LonMarkObject or network