The new MTF Snippets functionality in 12d Model allows for the creation of dynamic, intelligent and reusable objects that can be quickly and easily used in your design projects. Those writing, or even viewing, MTF snippets often do so in a text editor. To make it easier and clearer for snippet authors (aka snippeteers), I have created a User Defined Language (UDL) file for the excellent and highly-recommended Notepad++ text editor. This provides MTF Snippets syntax highlighting for any MTF Snippet files (file extension .mtfsnippet).
At the moment, the MTF Snippets syntax highlighting supports the following features:
- Line and block comments
- PARAMETER, DISPLAY and INFO special definitions
- V10 C-preprocessor directives, e.g. #define, #ifdef
- New V11 snippet preprocessor directives, e.g. @ def_tok , @ if_tok
- Parameter and token substitution as $VAL and $(VAL)
- Snippet-specific commands- variable, link_variable, user_message*
- Snippet helper functions and mathematical functions, e.g. sin, rel_offset
- Most, if not all, MTF Modifier commands, e.g. insert, remove, named_grade
- Most, if not all, of the MTF Modifier keywords, e.g. absolute, extra_start, unknown
I will add features as they are added to 12d Model. The file is current for V11 C1h.
- Download the 12d MTF Snippets language file from the links below.
- Open Notepad++
- Select from the main menu
- From the panel that appears, click the Import button
- Browse for and select the file you downloaded
- If the import is successful, it should pop-up a dialog saying so.
- Close and restart Notepad++
- Any file with a .mtfsnippet extension should automatically use the new MTF Snippets syntax highlighting.
- Otherwise, to manually use the MTF Snippets syntax highlighting, select the menu item (near the bottom)
You can change the colours, fonts and styling used for the different categories and keywords by opening thepanel in Notepad++ and clicking on the Styler buttons for the various sections.
Screenshots for instructions:
If you have any problems, feedback or requests, leave a comment below.