Method: AddReference for Elements <DataStore>
- Updated2024-09-12
- 2 minute(s) read
DIAdem NAVIGATOR > Methods > Method: AddReference for Elements <DataStore>
Method: AddReference for Elements <DataStore>
Adds an already existing element to a collection of elements, in a data store.
![]() | Note The AddReference method is not supported by the property RootElements of the DataStore object. |
Set oElement = Object.AddReference(Instance, SetInvers)
| Object | Elements <DataStore> Object with this method |
| Instance | Element <DataStore> Specifies the element to be added. |
| SetInvers | Variant Specifies whether the AddReference method sets the inverse reference. If the value is FALSE, the AddReference method does not set the inverse reference, even if the inverse reference is defined in the data model.If the value is TRUE , or the parameter is missing, the AddReference method sets the inverse reference. |
| oElement | Element <DataStore> Returned object |
The following example removes a reference from a measurement quantity and adds this reference to a different measurement quantity:
| VBScript | Python |
Dim oMyDataStore, oMyElement, oMyMeaQuantity Set oMyDataStore = Navigator.ConnectDataStore("ASAM Browse Settings Example") Set oMyElement = oMyDataStore.RootElements("MyRootElement").Children("MyFirstChildren").Children("MySecondChildren") Set oMyMeaQuantity = oMyElement.Children("MyThirdChildren").Children(1) Call oMyElement.Children("MyThirdChildren").Children.RemoveReference(oMyMeaQuantity) Call oMyElement.Children("MyFourthChildren").Children.AddReference(oMyMeaQuantity, TRUE)
See Also
Procedures
Configuring the Search Results | Defining Search Areas | Executing a Search with OR Operations | Executing a Text Search | Indexing Search Areas | Optimizing Custom Properties | Saving and Loading a Search Query | Searching for Data on a Different Computer in the Network | Searching for Multiple Properties | Sorting Search Results before Executing a Search
Examples
Brake Tests for Trucks | Checking DataPlugins for Timeout | Combining DataFinder Search Results | Context Menu for the Search Results of the DataFinder | Creating ATFX Files from the Context Menu of an ASAM Data Store | Customized User Interface | Evaluation Wizard for the Search Results of the DataFinder | Filtering Data with a Dialog Box | Filtering Data without a Dialog Box | Search and Evaluation Functions in User Dialog Boxes | Searching for and Evaluating Channels | Searching for Channels in the NAVIGATOR | Searching for Data Sets Marked "Failed" in Data Stores | Searching for Data Sets Marked "Failed" | Searching for Properties and Evaluating the Associated Channels | Varying Browse Settings of a Data Store
