08-21-2009 06:03 PM - edited 08-21-2009 06:06 PM
Hello,
I am using the following vbscript to load data into the DIAdem Data Portal:
Set dataFinder = Navigator.ConnectDataFinder("My DataFinder")
Set queryForm = Navigator.CreateQuery(eAdvancedQuery)
queryForm.ReturnType = eSearchFile
Call queryForm.Conditions.Add (eSearchFile, "name", "=", "*.tdm")
dataFinder.Search(queryForm)
Set dataFinderResults = dataFinder.Results
Call Navigator.LoadData (dataFinderResults).
This works fine as long as the My DataFinder's Search Area has been previously defined via the DIAdem Navigator Panel.
We are starting DIAdem from a Visual C# application and the vbscript above is part of a vbscript that is passed into DIAdem when it is started via the /CScriptStart argument. I would like to dynamically set the My DataFinder's Search Area based a path argument that is also passed into DIAdem.
Is there a way to configure the My DataFinder's Search Area with vbscript?
Also,
Is there a way to have DIAdem run in the background without having the DIAdem screen flash when it is first started?
Thank you so much for any help with this,
Renette
Solved! Go to Solution.
08-22-2009 12:39 PM
Hi Renette,
As of DIAdem 11.1, newly released this past July, we now have a VBScript interface to define Search Areas and other aspects of the DataFinder. DIAdem 11.1 also has the ability to save off a DataFinder configuration file and load it, both interactively and programmatially. Earlier versions of DIAdem did not have any way to programmatically affect Search Areas.
Note that setting the Search Areas programmatically will not immediately result in all files being indexed and ready to be queried-- that may take a little time after you set the new Search Areas, depending on how many files are in each Search Area you add.
You are currently starting DIAdem with a DOS extension to have it run a VBScript right after launching. The advantage of this approach is that DAdem persists as an independent application even after the calling application ends.
You could alternatively call one of DIAdem's two ActiveX servers, which would invisibly start DIAdem and allow you to stay in contact with that DIAdem instance and read DIAdem variables and execute further DIAdem commands or VBScripts. The disadvantage of this approach is that if your calling program terminates, so does the ActiveX connection, and that shuts down the DIAdem instance launched by that ActiveX connection.
Ask if you have further questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments