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.
Note There are several flavors of
Nastran
. This extension is specifically built forMSC Nastran
; however, it may be expanded in the future to supportSimcenter Nastran
and the originalNASTRAN-95
. There is significant overlap between the various versions ofNastran
and this extension may still prove useful even if you are not usingMSC Nastran
.
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:
*.bdf
*.dat
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:
Syntax Highlighting
Nastran
sections
Documentation on keyword hover
Include file hierarchy tree view for easy navigation of model. Open top level Nastran
run deck and run command (keybound to F7
) to parse include paths and generate tree view. Command tied to "refresh" button on view.
Open file right click context menu for INCLUDE
lines.
"Find All" command (keybound to ALT + F
) to search model for all substring occurrences and provide hyperlink to location in model.
Nastran
execution command (keybound to F6
)
Nastran
keyword arguments may be set via the Nastran: Set execution keywords
command (accessed via CTRL + SHIFT + P
)Text completions with field names for rapid editing
Command to insert short and long field delineation comments (F9
, F10
)
Nastran: Set short field delineation comment
and Nastran: Set long field delineation comment
commands (accessed via CTRL + SHIFT + P
)In addition to these features, the following are proposed features with no feasibility assessment or time table for implementation:
*.f06
and *.f04
syntax highlightingDMAP
sectionIf you have an idea for a feature, please create an issue and flag it as a Feature Request
.
Please create an issue as bugs are discovered. Provide specific details including screen shots or specific Nastran
cards causing the bug.
CTRL + -
) till hover text is no longer being wrapped or to minimize the explorer pane (CTRL + B
).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 vscode but the chosen color may not be ideal or be distinguishable relative to adjacent colors. The following scopes are defined for each section / keywords:
string.regexp
invalid
markup.inserted
string
entity.name.tag.css
constant.language
constant.regexp