Previously, I introduced the latest OpenSees editor, Cypress Editor, which not only provides help but also has the functionality to directly run OpenSees command files. However, the need for registration and potential future charges can make its use somewhat inconvenient. Therefore, it is import to find a suitable editor here. Notepad++, as an open-source text editor, not only supports syntax highlighting for Tcl language but also its built-in plugin library makes running OpenSees command files very straightforward.
Before configuring Notepad++, some preliminary setup is necessary here. To make opensees a system command, we need to add the folder containing opensees.exe to the system path. I placed OpenSees in D:\Program Files\OpenSees,
Add the path to the environment variable Path (append it at the end, do not overwrite the path),
Then, open Notepad++, select “Plugins” -> “Plugin Manager” -> “Show Plugin Manager”:
Find and install “NppExec”, then return to the main interface of Notepad++, select “Plugins” -> “NppExec” -> “Execute…”,
Add the following command,
1 |
|
The second line of the above command ensures that the result files generated by running OpenSees and the Tcl files are in the same directory. Then click “Save…” and save it as OpenSees,
Re-select “Plugins” -> “NppExec” -> “Advanced Options”,
Follow the below figure to add a shortcut command for OpenSees,
Then, add a shortcut key for this command for quick access, select “Settings” -> “Shortcut Mapper”,
Add your own shortcut key for the OpenSees command, here I chose “Ctrl+Shift+D”,
After setting up, we can directly run OpenSees Tcl script files. Here, I opened an example file, and then pressed “Ctrl+Shift+D” in the main interface, and the Tcl file was automatically executed,
Summary: Compared to the latest Cypress Editor, Notepad++ lacks only the command help, but it doesn’t fall short in other functionalities. Moreover, the various themes of Notepad++ make Tcl editing and searching more convenient.