DIAdem Help

Method: RemoveReference for Elements <DataStore>

  • Updated2024-09-12
  • 2 minute(s) read

Method: RemoveReference for Elements <DataStore>

Removes, in a data store, a reference of a data element.

Object.RemoveReference(Instance)
ObjectElements <DataStore>
Object with this method
InstanceElement <DataStore>
Specifies the instance of the reference to be removed.

Note  The RemoveReference method is not supported by the property RootElements of the DataStore object.

The following example removes a reference from a measurement quantity and adds this reference to a different measurement quantity:

VBScriptPython

 

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)