A configuration block configures the initial state of an analysis. It has two sections: a list of parameter assignments and a list of configuration statements.
Parameterizing an analysis means to inject parameters into the process of opening the file, and optionally configure the analysis further before it becomes interactive to the user. Both actions are defined in a configuration block.
A configuration block is a script-like piece of text. In the following example, the first two lines are parameter assignments, the following lines are configuration statements:
Region = "West";
Acme.Limits = { 10, 100, 1000 };
SetPage(pageTitle = "Overview");
ApplyBookmark(bookmarkName = "UserRegionOnly");
SetFilter(tableName = "Table 1", columnName = "Column 1", values = { "A", "B" });
SetMarking(tableName = "Table 2", whereClause = "Gender = 'Male' AND GeekFactor = 'High'");
Parameter assignments and configuring statements are applied when an analysis containing a configuration block is opened.
- Parameter assignments are used for parameterized analyses, analyses containing data sources, Parameterized Information Links or transformations with parameters.The parameters come into scope before data is loaded. They can be retrieved via the API at any time. Parameters assignments are mandatory whenever the analysis makes use of parameters.
- Configuration statements consist of a method name followed by an argument list. Configuration statements are interpreted after data has been loaded, but before the command history is activated. When the configuration statements have been interpreted, they are discarded. Configuration statements are always optional. Nothing in an analysis requires configuration statements to be defined.
In the API, a configuration block is represented by a text property in the DocumentOpenSettings and DocumentSaveSettings classes, which are used by the AnalysisApplication.Open and AnalysisApplication.Save methods respectively.