DIAdem Help

Method: LoadProperty for Navigator

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

Method: LoadProperty for Navigator

Loads the property values from the results of a search in a DataFinder or a data store as channels into the Data Portal.

Set oElementList = Object.LoadProperty(PathOrIndex, Elements, [ImportAction])
ObjectNavigator
Object with this method
PathOrIndexVariant
Specifies which property to load. If you do not specify this value or if you use the Elements parameter, DIAdem loads all properties as channels into the Data Portal.
ElementsVariant
Specifies the elements from which DIAdem loads the property specified in the PathOrIndex parameter. The elements to load are a type Elements.
[ImportAction]Variant
Specifies how the LoadProperty method transfers the property values into the channels. You can use either the ImportParameter object or one of the following script terms.
Script Term Interface Term, Explanation
"Load"
Load (default)
"Append"
Append
oElementListElementList <Data>
Returned object
Note  If you use the ImportParameter object for the ImportAction parameter, the LoadProperty command supports the properties ImportMode, LoadReturnMode, and AppendCheckGroupName. The method ignores all other properties of the object.
Note  When DIAdem generates a channel in the Data Portal, the program assigns values to the following channel properties:
  • Data storage origin: Specifies the name of the DataFinder or data store from which DIAdem loads the data.
  • Data source type: Specifies the type of the transferred element.
  • Source context: Specifies which property to load.

The following example searches for channels that contain a maximum value greater than 5. Then the example loads all the values of the Maximum property from the search results into a channel in the Data Portal:

VBScriptPython

 

Dim oMyAdvancedQuery
Set oMyAdvancedQuery = Navigator.ConnectDataFinder("My DataFinder").CreateQuery(eAdvancedQuery)
Call oMyAdvancedQuery.Conditions.Add(eSearchChannel,"maximum",">",5)
oMyAdvancedQuery.ReturnType = eSearchChannel
Call Navigator.Display.CurrDataFinder.QueryForm.SetCurrQuery(oMyAdvancedQuery)
Call Navigator.Display.CurrDataFinder.QueryForm.Search()
Call Navigator.LoadProperty ("maximum",Navigator.Display.CurrDataFinder.ResultsList.ResultsElements)

The following example loads the columns you selected in the search results of a data store as channels into the Data Portal:

VBScriptPython

 

Dim oMyResultsList, oReturnType, oMySelection
Set oMyResultsList = Navigator.Display.CurrDataStore.ResultsList
oReturnType = Navigator.Display.CurrDataStore.QueryForm.GetCurrQuery().ReturnType
For Each oMySelection in oMyResultsList.Selection
  Call Navigator.LoadProperty(oMySelection.GetPath(oReturnType),oMyResultsList.ResultsElements)
Next

The following example executes a column-oriented search, displays the return type of the found property, and loads the properties as channels into the Data Portal. The example does not use the PathOrIndex parameter:

VBScriptPython

 

Dim oMyDataFinder, oMyQuery, oMyConditions, oMyResultsColumns, oMyResultsProps
Call Data.Root.Clear()

Set oMyDataFinder = Navigator.ConnectDataFinder("My DataFinder")
Set oMyQuery = oMyDataFinder.CreateQuery(eAdvancedQuery)
oMyQuery.ReturnType = eSearchChannel
Set oMyConditions = oMyQuery.Conditions
Call oMyConditions.RemoveAll()
Call oMyConditions.Add(eSearchChannel,"maximum",">=","10")
oMyConditions.Logic = "C1"

Set oMyResultsColumns = oMyDataFinder.CreateResultsColumns()
Call oMyResultsColumns.RemoveAll
Call oMyResultsColumns.Add(eSearchChannelGroup, "name")
Call oMyResultsColumns.Add(eSearchFile, "fileName")
Call oMyResultsColumns.Add(eSearchFile, "folder")
Call oMyResultsColumns.Add(eSearchChannel, "maximum")

Call oMyDataFinder.SearchProperties(oMyQuery, oMyResultsColumns)
Set oMyResultsProps = oMyDataFinder.ResultsProperties
Call MsgBoxDisp("Result properties return type: " & oMyResultsProps.ReturnType)

Call Navigator.LoadProperty(oMyResultsProps)

The following example searches for channels that contain a maximum value greater than 5. Then the example loads all the values of the Maximum property from the search results list with the loading configuration defined in the oMyImportParameter object into a channel in the Data Portal:

VBScriptPython

 

Dim oMyAdvancedQuery, oMyImportParameter
Set oMyAdvancedQuery = Navigator.ConnectDataFinder("My DataFinder").CreateQuery(eAdvancedQuery)
Call oMyAdvancedQuery.Conditions.Add(eSearchChannel,"maximum",">",5)
oMyAdvancedQuery.ReturnType = eSearchChannel
Call Navigator.Display.CurrDataFinder.QueryForm.SetCurrQuery(oMyAdvancedQuery)
Call Navigator.Display.CurrDataFinder.QueryForm.Search()

Set oMyImportParameter = Navigator.Settings.CreateImportParameter("Load")
oMyImportParameter.AppendCheckGroupName = eAppendCheckGroupNameAutomatic 
oMyImportParameter.ImportMode = eAppend

Call Navigator.LoadProperty ("maximum",Navigator.Display.CurrDataFinder.ResultsList.ResultsElements, oMyImportParameter)