Altium Designer Documentation

ShowCodeTemplates

Created: July 27, 2015 | Updated: April 11, 2017
Now reading version 17.1. For the latest, read: ShowCodeTemplates for version 21
Applies to Altium Designer versions: 15.1, 16.0, 16.1, 17.0 and 17.1

Parent page: TextEdit Commands

The following pre-packaged resource, derived from this base command, is available:


Applied Parameters: None

Summary

This command is used to place a code template into the current document. Code templates are predefined blocks of code that can be automatically placed in a coding-aware text-based file, and are an excellent productivity aid when you are writing code in a particular language. Each code template has three properties: a name, a description, and the actual code to be inserted by the template.

Access

This command can be accessed from the Text Editor (or any coding-aware variant of the Text Editor), by:

  • Choosing the Tools » Show Code Templates command from the main menus.
  • Clicking the  button on the Utilities toolbar.
While typing within the editor, the command can be easily accessed by using the Alt+T, T keyboard sequence.

Use

The command can be used in two ways:

  • Enter the defined name for the required code template, then launch the command. The code template with that name will be placed (replacing the template name you just typed). If you can't remember the full name of the required template, simply start typing characters, then launch the command - a pop-up listing all defined code templates with that root naming will appear, from which to choose.
  • Place the cursor at the required location in the file, then launch the command. A pop-up window listing all available code templates defined for the associated language will appear. Simply choose the required entry to place that template.

Tips

  1. Each code template is identified by its name, as specified in the Code Templates Editor dialog. Access to this dialog can be made from the Language Setup dialog (click  on the Utilities toolbar), by choosing the Templates command from the Menu.

 

Found an issue with this document? Highlight the area, then use Ctrl+Enter to report it.

Contact Us

Contact our corporate or local offices directly.

We're sorry to hear the article wasn't helpful to you.
Could you take a moment to tell us why?
200 characters remaining
You are reporting an issue with the following selected text
and/or image within the active document: