LlPrintIsVariableUsed

Syntax:

INT LlPrintIsVariableUsed (HLLJOB hJob, LPCTSTR lpszFieldName);

Task:

Specifies whether the given variable is used in one of the expressions or conditions of the project. Note the hints for LlPrintIsFieldUsed.

Parameter:

hJob: List & Label job handle

lpszFieldName: Field name

Return Value:

Value

Meaning

1

Variable is used

0

Variable is not used

LL_­ERR_­UNKNOWN

Variable is not defined

 

A valid value is greater than 0. If the value is less than 0, it shows an errorcode. Please see chapters General Notes About the Return Value and Error Codes for further details.

Hints:

This function can only be called after LlPrintStart() or LlPrintWithBoxStart().

This function needs LL_OPTION_NEWEXPRESSIONS to be set to true (default).

As calling LlDefineVariableStart() clears the "used" flags, this function will return LL_ERR_UNKNOWN or 0 afterwards, regardless of whether the field is actually used or not. Therefore do not use LlDefineVariableStart() after LlPrint[WithBox]Start().

Instead of using a specific variable name, wildcards can be used. For further information see LlPrintIsFieldUsed().

Example:

if (LlPrintIsVariableUsed(hJob, "Name") == 1)
   LlDefineVariableExt(hJob, "Name", <...>);

See also:

LlPrintStart, LlPrintWithBoxStart, LlPrintIsFieldUsed