Editor for Object Dependencies
In the modeling environment for Variant Configuration
, you can use an editor to create, edit, or check the source code for an object dependency. The help functions provided by the editor enable you to enter parameters and suitable source code modules much more
easily.
For general information about the syntax of object dependencies, see Object Dependency Syntax: General Rules.
You can start the editor from the detailed view of the object dependency you want to edit.
The source code of an object dependency is not activated until you release the dependency. If you make changes to object dependencies that already exist, the dependencies will be locked when you exit the editor if the source code contains syntax errors.
Before you can use the editor to edit the source code for an object dependency, the dependency must already exist.
The editor provides the following tools for editing source code:
Input help (F4) for creating or editing source code with the correct syntax
Drag and drop functionality for copying objects from the model tree to the source code
Syntax check
Import and export of source code
Open the detailed view of the object dependency you want to edit with the editor. Choose the Editor
tab page and
(Change
) to open the source
code window for editing. Position your cursor in the empty editor window or at the point in the source code that you want to edit and enter the text or call the input help (F4).
To call the input help, choose
(Individual Help
) in the toolbar or press F4.
Note that the input help takes information from the worklist. In other words, the input help can propose only source code elements that exist in the worklist.
A separate window is then displayed with source code proposals. These depend on the type of the object dependency you are editing and the current context. Select the source code element that matches the purpose of the dependency. Confirm your selection and copy the element by double-clicking it.
The source code usually starts with a keyword, such as $SELF, $SET_DEFAULT, or TABLE. You then include the objects of the model (such as characteristics, characteristic values, variant tables, or classes) according to the current requirement and context. You can use punctuation to separate or group these elements.
You can transfer classes and characteristic values from the model tree or worklist to the editor using drag and drop.

Example of drag and drop
You can check the syntax of the source code you have just edited. To do so, choose
(Check
) from the editor toolbar. A message is then displayed indicating the result of
the check. If syntax errors were found, the message lists the possible causes of these. Lines with syntax errors are displayed with an inverted blue background color. The line numbers of the errors are included in the dialog box for syntax error messages. In addition, your cursor is positioned at the
start of the first element with errors in the source code.
Naturally, the syntax check is restricted to formal correctness. To check whether the dependency works as planned in your model, you can use the configuration simulation function.
You can import or export object dependencies to and from a text file.
To import a file, choose
(Import
).
To export a file, choose
(Export
).
The editor shows additional context information for object dependencies for characteristics or characteristic values. This information is displayed above the editor window.
In the active configuration process, a characteristic must be assigned a value so that the object dependency created for it is executed. The same applies to characteristic values with object dependencies. Object dependencies created for the configuration profile, however, are executed independently of individual value assignment steps. For this reason, additional context information is not available for object dependencies assigned to the configuration profile.
You can hide this context information if necessary. To do so, choose .