DIAdem Help

Method: ConnectDataStoreByParameter for Navigator

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

Method: ConnectDataStoreByParameter for Navigator

Opens a connection to an ASAM data store without using the user interface. Use the corresponding parameters to determine the ASAM data store.

Set oDataStore = Object.ConnectDataStoreByParameter(PluginName, Params, [Reserved])
ObjectNavigator
Object with this method
PluginNameString
Specifies the name of the DataPlugin that DIAdem uses to open the ASAM data store.
ParamsString
Specifies an XML string with parameters. To generate the XML string for an ASAM data store, press the shortcut <Ctrl-Shift-C> in one of the dialog boxes where you configure data stores. Then open DIAdem SCRIPT and insert the clipboard contents with <Ctrl-V> into a script in order to get the string. You generate the XML string in the Data Stores - Settings or Create Data Store dialog boxes.
[Reserved]Variant
Is for later extensions.
oDataStoreDataStore
Returned object

The following example opens the file DataBase.atf with the Atf-DataPlugin:

VBScriptPython

 

Function FileOpenXmlParameter(filePath, readonly)
  FileOpenXmlParameter = "<filename"
  If(readonly) Then
    FileOpenXmlParameter = FileOpenXmlParameter & " readonly=""yes"""
  End If
  FileOpenXmlParameter = FileOpenXmlParameter & ">" & Replace(Replace(filePath, "&", "&amp;"), "<", "&lt;") & "</filename>"
End Function

Dim oMyStore
Set oMyStore = Navigator.ConnectDataStoreByParameter("ATF",FileOpenXmlParameter(ProgramDrv & "Examples\Data\ASAMMultipleChildren.atfx"), false)

Log in to get a better experience