Run WindFarmer from the Command Line
The WindFarmer application can be run from the command line which may be useful for specific automation tasks. You can open a specified workbook and run a procedure (script) against the opened workbook.
Open a command prompt in Windows. Navigate to the latest WindFarmer installation folder (or use the full path of the WindFarmer executable), then use some or all of the following options:
Option | Action |
---|---|
-open |
only needed when running an inline procedure or a procedure against a specific workbook |
-run |
can contain the name of an inline procedure or a path to an external cs file. Can be chained to run multiple procedures in order |
-open filePath |
Open the specified workbook. If not specified the script will run on a new workbook |
-run procedureName |
Run the specified procedure (must also open a workbook that contains the procedure) |
-close |
Close WindFarmer after completing the procedure (must run a procedure to use this) |
-invisible |
Does not open the application window |
-nosplash |
Hides the splash screen |
For example:
Inline procedure (procedure stored in a workbook)
GH.WindFarmer.exe -open GenericProcedure.wwx -run "Generic Procedure"
-close -invisible
External procedure
GH.WindFarmer.exe -open GenericProcedure.wwx -run "<Path to folder>\Procedure.cs"
-close -invisible
External procedure on empty workbook
GH.WindFarmer.exe -run "<Path to folder>\Procedure.cs"
-close -invisible
Chain Multiple procedures
GH.WindFarmer.exe -run "<Path to folder>\Procedure1.cs" -run "<Path to folder>\ Procedure2.cs"
-close -invisible
GH.WindFarmer.exe -open "C:\Workbooks\My workbook.wwx" -run MyScript ^
-close -invisible -nosplash