.NET Customisation User Guide

.NET Customisation : Database Interface : Element Access
DbElement is a generic object that represents all database elements regardless of their type.
An instance of a DbElement may be obtained as follows:
There is a static GetElement() method with no arguments to return a 'null' DbElement.
There is a static GetElement() method which returns a DbElement given a name. This name should include the '/'.
There is a static GetElement() method which returns a DbElement given a ref (two long int array) and type. This is only needed where a reference has been stored externally to the AVEVA module.
The DbElement object encapsulates the identity of the database object. Any comparison of database objects must be done using DbElements. The DbElement has 'value' semantics for comparison purposes. i.e. comparing of two DbElements will always return true if they refer to the same element, even if they are different objects. DbElement instances should be used in all cases where the identity of an element is being passed or stored.
A DbElement can be identified externally to the AVEVA module by a combination of the ref number AND type. The ref number is a two long integer, for example: =123/4567.
There is a IsValid()method to test if a DbElement is valid.
If the DbElement is invalid then all attribute access and database navigation will fail for that DbElement.
DbElement has the following basic methods:
ToString()- Returns the Name of the element. If unnamed, it returns the constructed name.
GetElementType()- Returns the DbElementType.

1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Logo