Dynamic Arguments are a way to create input parameters to an ANP dynamically. Dynamic Arguments can be used to exchange values between procedures.
There are several caveats to be aware of when using Dynamic Arguments:
- They must be created in the On_Initialize sub of your analysis script.
- They can only be read. Once created, you cannot change their value.
- They cannot be set interactively from the SystemLink Web UI.
- Dynamic Arguments can only be used in ANPs configured for Parallel Evaluation.
- Parallel Evaluation: each element retrieved from the Search Query is processed individually (in parallel).
- Comparative Evaluation: all elements retrieved from the Search Query are processed together.
Tutorial
Follow the steps below to create an ANP that uses Dynamic Arguments.
- In DIAdem, select the SCRIPT tab.
- From the top menu bar, select Settings >> SystemLink TDM >> Analysis Automation Procedure...

- In the pop-up window, click New Analysis Automation Procedure.
- Configure a Name, Description, Author and Environment. Then click OK to apply changes.
- This tutorial will uses a VB-Script environment, but the same concepts apply when using Python.
- In the Search Query tab, connect to a DataFinder Instance of your choice and apply a search query.
- In the Analysis Script tab, ensure that Parallel evaluation is selected.
- Double-click the Main analysis script to open it.
- Within the On_Initialize sub, enter the below line of code where:
- Name is the name of your argument as a string.
- Value is the value of the argument.
- Type is an Integer defining the data type. Note: 0 = Double, 1 = Integer, 2 = Text, 3 = Boolean.
- Description is a description for the argument as a string.
- In the image below, an argument called AdditionalArgument that is a string with value StringValue is created.
Call oContext.DynamicArguments.Add(<Name>,<Value>,<Type>,<Description>)
- Within the On_Run_AnalysisProcedure sub, enter the following lines of code to read the value of the Dynamic Argument and print it to the log.
- Replace <Argument Name> with the name of your argument as a string.
- In the example image, the argument AdditionalArgument is being read.
Dim sExchangeArg
sExchangeArg = oContext.DynamicArguments.Item(<Argument Name>).Value
oContext.LogResult("Value of Argument: " & sExchangeArg)
- Save the ANP.
- Execute the ANP in DIAdem to verify that it works.