DIAdem Help

Notes on Creating Scripts for Analysis Automation and Data Preparation

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

Notes on Creating Scripts for Analysis Automation and Data Preparation

Please heed the following information on creating scripts for analysis automation and data preparation.

General

  • To operate SystemLink TDM, you need a valid user profile for the SystemLink TDM account. You can then assign the resources required for the operation of the SystemLink TDM, for example a printer, to this user profile. You create the user profile by logging on to the server machine for the first time with the corresponding SystemLink TDM account. You also need the user profile of the SystemLink TDM account to output PDF documents.
  • As there are many parallel processes running in the background in SystemLink TDM, access issues may occur when several processes access the same resource simultaneously.

Data Preparation

  • You cannot use REPORT objects in the script that you use for validation and verification.
  • You cannot change the name of the data file that is being processed by the data preparation in the steps of a data preparation procedure.

Analysis Automation

  • You cannot use all DIAdem commands in an Analysis script. For example, you cannot use commands which require an interaction with the user, such as dialog boxes or prompts. You can also not use commands that control the DIAdem interface, DIAdem VIEW, Microsoft Office applications or other applications. Commands, such as WndShow or Navigator.Display that access DIAdem windows are also not available. Some DIAdem objects, such as DIAdem DAC, DIAdem VISUAL, or the BarManager are not available. Analysis scripts do not support the Report.ActiveSheet property and the Report.Sheets(x).Activate and SelectReport.Sheets(x).Objects(y).Select methods.
  • The order in which the Analysis script processes the retrieved files is not predictable because the processes run in the background on several instances.
  • The basic DIAdem settings are defined in the Desktop.ddd file. As this file is not located on the SystemLink TDM, you must explicitly define any changes to the DIAdem settings in your analysis script by setting the respective variables.
  • If you want to process a file with a filename extension in an analysis script, and the associated DataPlugin is not installed on the SystemLink TDM by default, SystemLink TDM cannot successfully execute this script. In this case the server system administrator must first install the corresponding DataPlugin on the server.
  • Simplify the creation of analysis scripts by recording the analysis steps, including the required commands and variables, in Recording Mode in a separate script. Customize the recorded script as follows, so that the analysis automation can process the script:
    Combining Logical Statements into Functions Combine logically related statements of the recorded script into Functions. In doing so, also use transfer parameters, for example, for filenames. Use meaningful function names.
    Replacing Paths Replace all relative and absolute paths in the recorded script with paths that are valid on the SystemLink TDM. Do not use the CurrentScriptPath variable. An analysis script uses the variable oContext.Procedure.ScriptPath to access the files in the analysis automation procedure. For example, use the oReport.LoadLayout(oContext.Procedure.ScriptPath &"MyLayout.tdr") command to access a report layout.
    Data Handling If DIAdem deletes, searches, or loads data in the recorded script, you must delete the associated commands from that script. Data handling is done in the main script main.vbsa through the DataLinks collection. For example, use the Navigator.LoadData(oMyDataLink) method to load data, where oMyDataLink is an element of the collection with the search results(oContext.DataLinks).
    References to the Data File For example, if you need information about the file currently being processed by your analysis script for a layout label, you can find this information in the channel origin properties sourcedatafilepath (source file path) and sourcedatafilename (source file).
    Saving the Script Save the customized analysis script under a meaningful name.
    Add Files to Analysis Automation Procedure Copy the analysis script into the analysis automation procedure. Add any other files that were used to the analysis automation procedure. When executing the analysis script, the analysis automation can only use the files that are stored in the analysis automation procedure. For example, if you use a report layout in your analysis script, you must add this layout to the analysis automation procedure.
    Extending Main.vbsa with ScriptInclude Extend the script main.vbsa with the function ScriptInclude() with the name of the analysis script as parameter. Choose a position from which you call the functions of the analysis script you included.
    Testing the Analysis Script To test your analysis script, click the Test Analysis Automation Procedure button in the Configure Analysis Automation Procedure dialog box.

Log in to get a better experience