OpenSee running Tcl with Notepad++

Notepad 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,

OpenSee running in Notepad++

Add the path to the environment variable Path (append it at the end, do not overwrite the path),

OpenSee running in Notepad++

Then, open Notepad++, select “Plugins” -> “Plugin Manager” -> “Show Plugin Manager”:

OpenSee running in Notepad++

Find and install “NppExec”, then return to the main interface of Notepad++, select “Plugins” -> “NppExec” -> “Execute…”,

OpenSee running in Notepad++

Add the following command,

1
2
3
npp_save
cd $(CURRENT_DIRECTORY)
opensees "$(FULL_CURRENT_PATH)"

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,

OpenSee running in Notepad++

Re-select “Plugins” -> “NppExec” -> “Advanced Options”,

OpenSee running in Notepad++

Follow the below figure to add a shortcut command for OpenSees,

OpenSee running in Notepad++

Then, add a shortcut key for this command for quick access, select “Settings” -> “Shortcut Mapper”,

OpenSee running in Notepad++

Add your own shortcut key for the OpenSees command, here I chose “Ctrl+Shift+D”,

OpenSee running in Notepad++

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,

OpenSee running in Notepad++

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.