Nastran Extension for Visual Studio Code
This Visual Studio Code extension aims to build
Nastran "language" support with features akin to what software developers are accustomed to in their Integrated Development Environments (IDEs) while programming.
Nastran stands for "NASA STRuctural ANalysis" and is a finite element analysis software used to predict the behavior of a physical structure. While
Nastran is not a programming language itself,
Nastran models share many similarites to a programming language. These models are composed of text files built with a defined structure using keywords to identify model parameters and can be "compiled" and executed.
The ultimate goal of this project is to provide a more efficient means of manipulating
Nastran finite element models at the text file level through elimination of some of the key pain points and provide a more IDE-like experience.
There are several flavors of
Nastran. This extension is specifically built for
MSC Nastran; however, it may be expanded in the future to support
Simcenter Nastran and the original
NASTRAN-95. There is significant overlap between the various versions of
Nastran and this extension may still prove useful even if you are not using
In order to use this extension, the user must have the following installed:
Once the requirements are satisfied and the extension is installed through Visual Studio Marketplace, the extension will automatically activate upon opening a
Nastran file with the following extensions:
If opening a
Nastran file with a different extension, users may set the language by pressing
CTRL + K followed by
M and selecting
Nastran. If you would like to permanently set the language for the given file extension, select the
Configure File Association for 'XXX'... option.
Currently supported features include:
- Color delineation between
- File Management
- Executive Control
- Case Control
- Bulk Data
- Long and short format field highlighting
Documentation on keyword hover
Include file hierarchy tree view for easy navigation of model. Open top level
Nastran run deck and run command to parse include paths and generate tree view. Command tied to "refresh" button on view.
"Find All" command (keybound to
ALT + F) to search model for all substring occurences and provide hyperlink to location in model.
Nastran execution command (keybound to
Nastran keyword arguments may be set via the
Nastran: Set execution keywords command (accessed via
CTRL + SHIFT + P)
In addition to these features, the following are proposed features with no feasibility assessment or time table for implementation:
*.f04 syntax highlighting
- Add documentation hover support for
- Interactive plot view of 3D model highlighting currently selected element / grid / etc.
If you have an idea for a feature, please create an issue and flag it as a
Bug Reporting and Known Issues
Please create an issue as bugs are discovered. Provide specific details including screen shots or specific
Nastran cards causing the bug.
- VS Code does not support hover pane resizing. Depending on the resolution of the monitor, text may be wrapped to a new line and not be presented correctly. Users may find it helpful to reduce font size (
CTRL + -) till hover text is no longer being wrapped or to minimize the explorer pane (
CTRL + B).
- Extension was developed using VS Code's
Dark (Visual Studio) theme. The keyword sections where given colors based off of commonly defined scopes. All colors should update for the themes packaged with VS Code but the chosen color may not be ideal or be distinguishable relative to adjacent colors. The following scopes are defined for each section / keywords:
- Nastran Keyword:
- Section Dividers:
- File Management:
- Executive Control:
- Case Control:
- Bulk Data: