DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

ReturnType of Navigator.DataStore.Query other than child or child.child from RootElements (ASAM-ODS DataBase)

Hi All,

 

we are running an Asam-ODS based Database to store our Data.

If I use a QueryObject (Navigator.DataStore.Query) to search several Instances, the attribute 'ReturnType' specifies the type of (application-)elements to search for.

Is there a way to select other (application)elements than AsamOds-BaseElements of the type 'AoSubTest', 'AoMeasurement' or 'AoMeasurementQuantity'?

 

If I try to set the ReturnType to another ApplicationElement an error occurs:

'Der Text ... ist kein gültiger Wert für die Eigenschaft ReturnType'

('The text ... is not a valid value for the attribute ReturnType')

 

Our ApplicationModel:

'Root': AoTest

Child of AoTest: AoSubTest (first layer)

Child of AoSubTest: another AoSubTest (the second layer)

Child of 2nd AoSubTest: AoMeasurement

etc

Each AoMeasurement is linked via 'References' to one ore more Elements of Type 'AoParameterSet'.

 

If I use a Query described above, I can't set the 'ReturnType' to the first layer of 'AoSubTest'.

How may I select the linked 'AoParameterSet?

 

Thanks 4 reading 🙂

 

Greetings from Germany

Contur

0 Kudos
Message 1 of 4
(4,010 Views)

We connect to the database thru the AOP5 plugin from NI.

0 Kudos
Message 2 of 4
(4,003 Views)

Hi Contur,

DIAdem allows searching for ASAM elements using the Query object only for those ASAM elements which directly maps to the 3 tier hierarchy of the Data Portal, which is the "lowest" AoSubTest, followed by "AoMeasurement" and "AoMeasurementQuantity".


Conditions applied to a query may use other elements which are referenced by any element used within the path used for browsing (you might want to try DIAdem 2011 beta and see how the browse path can be interactively changed Settings>>Current Data Provider>>Browse Settings ...). 

 

You can do this interactively by open the drop-down box of the Property column and use the property browser to select the property of interest.

 

 

You can do the same by using a script:

 

Dim oMyDataStore : Set oMyDataStore = Navigator.ConnectDataStore("ASAM Browse Settings Example")

Dim oMyQuery : Set oMyQuery = oMyDataStore.CreateQuery()
oMyQuery.ReturnType = "MeaQuantity"
Call oMyQuery.Conditions.Add("Test","Engine.Fuel","=","Diesel")
 
Call oMyDataStore.Search(oMyQuery)
Dim oMyResults : Set oMyResults = oMyDataStore.Results
 
MsgBox oMyResults(1).Name

 

 


 

Greetings from sunny Aachen

Stefan

 

0 Kudos
Message 3 of 4
(3,986 Views)

Hi Stefan,

 

thx for your reply.

It's a great pity, that I only may select the mentioned elements.

As a result I have to iterate over a huge amount of data and for each element of this data I have to access the refering element by the given reference (which seems to be (very) slow, but I have to evaluate this a litle bit longer first).

 

Perhaps there will be a possibillity in an a further version of DIAdem.

SQL-like things as 'Order By' or 'Distinct' will be neat features too to work with a database.

 

Once more thanks 🙂

 

Greetings from Germany

Contur

 

 

 

 

0 Kudos
Message 4 of 4
(3,961 Views)