LlGetUsedIdentifiers Does not Return the Correct Variables

Valid from List & Label 24
The LlGetUsedIdentifiers function returns the variables, fields and chart fields used in the specified project as a semicolon-separated list. It may happen that after saving and closing the Designer, the function still returns the variables that should already be deleted and no longer be used. This leads to the output of incorrect values. Only after reopening and changing the file the correct values will be returned!

The technical reason for this behavior is, that when loading the project, where all expressions are parsed, it is noted for each variable and each field, whether it is used in one of the expressions or not. No refcounting with reference source takes place here (among other things, for performance and memory consumption reasons). Only one bit is set in the structure of the variable. This means that when a field is deleted, it is not known whether this is the only place where it is used.

This information can only be determined with certainty when the project is reloaded.
 
IDKBTE001369 KBTE001369