Creating an if statement


  
 Applies To 
  
 Product(s):MicroStation
 Version(s):08.05.02.35
 Environment: N\A
 Area: Configuration
 Subarea: Workspaces
 Original Author:Bentley Technical Support Group
  

Problem

Info: Creating an %if statement to pick up a system variable defined at the OS.--setting up:

If Defined $(system variable) and Equal to .....
Else if....

What happens is the pcf file is reading and stopping at the if defined statement.
Has a user defined system variable set on some machines and not on others.
How to handle if the system variable does not exist

Solution

Here is an example of setting this up.

SYSTEM_Variable = $(SYS_Var)

%if $(SYSTEM_Variable) == "MICROSTATION"

Define list of variables here to be processed

%elif $(SYSTEM_Variable) == "POWERSURVEY"

Define list of variables here to be processed

%else

Define list of variables here to be processed

%endif

See Also