ENVISION can be executed in “batch” mode by running from a command line using command line arguments. To do this, open a command window and navigate to the Envision directory (usual C:\Envision). Note that this approach launches the full Envision Graphical User Interface; a version without the GUI can be lauched using the envcmd tool described below. Supported command line parameters and switches are described in the following table:

Command line switchArgumentsExamplesNotes
<envxfile>The name of the project (envx) file to load – must be a fully qualified filename or on the Window PATH to be foundEnvision.exe \TestDir\test.envx
Envision.exe “\My Dir\test.envx”
If the path to the envx file contains spaces, it must be enclosed in quotes
/r:<scnIndex> – Run a given scenario and exit The one-based index of the scenario to run, or 0 to run all scenariosEnvision.exe MyProj.envx /r:0 – run all scenarios and exit Envision.exe MyProj.envx /r:2 – run the second scenario and exit Requires envx file be specified on the command line in addition to the /r switch if run in batch mode

 

Additionally, an command-line processing tool ships with Envision envcmd.exe. This tool is capable of performing a number of useful tasks as follows:

TaskSyntaxUsage Notes 
Process commands from an input fileenvcmd /c:cmdFile 
Specify in input shape fileenvcmd /i:inputShapeFile Must be specified for any of the following commands that operate on a shapefile 
Specify an output fileenvcmd /o:outputFileSpecifies the name of the output file associated with additional command switchs 
Subset IDU coverageenvcmd /q:"query"Subset and export based on the specified query.  Allowed query syntax is available at this link. 
Fix topology envcmd /t:ReachIDField Applies to line shape files only.   ReachIDField is optional 
Convert point coverage to linesenvcmd /x:Field 
Set Coverage Fields to Save during command processingenvcmd /f:FieldSpecFieldSpec is a ';' or ',' separated list of field names to be included in the output 
Add one or more fields to a coverageenvcmd /a:FieldSpecFieldSpec is a ';' or ',' separated list of field name:type pairs, where type is one of:
f: float
d: double
l: long
i: integer
 
Run Envision in command-line modeenvcmd <projectfile> /r:scenarioscenario is the one-based index of the scenario to run, or 0 to run all scenarios.  Exits on completion 
  

Note that many of these command line switches can be combined.  For example, to subset a set of polygons from a IDU coverage and save the result in a different file use:


 > envcmd /i:myshapefile.shp /o:newshapefile.shp /q:"CITY=1"
     

A common pattern is specifying an input file (/i:), an operation (e.g. /q:,/t:/f:,/a:), and an output file (/o:)