Using Textpad

From SysCAD Documentation
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Navigation: User Guide ➔ Editors and Utilities ➔ TextPad

Related Links: PGM Introduction


Introduction

Although we recommend Notepad++, TextPad is another alternative to Notepad for writing PGM (control programs), RCT (reactions) and SAC (archive report configuration) files.

NOTE: This document was last updated in 2012, likely to be referring to an old version of TextPad.

Textpad Features

  1. Display line numbers
  2. Colour coding of keywords, normal code, comments etc
  3. Drag and drop editing for copying and moving between documents
  4. Unlimited undo/redo capability
  5. Block (column) selection mode, and visible display of tabs and spaces.
  6. Text can be automatically aligned and indented, relative to previous line, to aid block indentation
  7. Other features can be found on this site: http://www.textpad.com/products/textpad/features.html

For example, comparison between Notepad and TextPad

Compare TextPad.png

With all the features it provides, TextPad makes it a easier to see and edit code. We strongly recommend that SysCAD users use Notepad++, however a TextPad license can be purchased and is an alternative with similar features.

TEXTPAD can be found in the following website (http://www.textpad.com), visit the website for downloads and pricing information.

Setting Up TextPad

We have created two Syntax files to best display the PGM and Reaction files. These syntax files are used by TextPad for colour coding of recognised keywords in SysCAD files. After installing TextPad, please copy the PGM.syn and Reaction.syn files into the "...\Program Files\TextPad 5\System" folder. To use these syntax files you need to follow these steps to set up the document classes in TextPad:

1. For adding PGM files syntax.

From Menu Option Configure - New Document Class
  • Document Class Name: PGM Files
  • Class Members: *.pgm
  • select Enable syntax highlighting and pick PGM.syn from list box

2. For adding RCT files syntax.

From Menu Option Configure - New Document Class
  • Document Class Name: Reaction Files
  • Class Members: *.rct
  • select Enable syntax highlighting and pick Reaction.syn from list box

3. For adding SAC files syntax.

From Menu Option Configure - New Document Class
  • Document Class Name: Archive Files
  • Class Members: *.sac
  • select Enable syntax highlighting and pick Archive.syn from list box

Other options:

  1. To allow all files to appear in the same copy of TextPad select "Configure | Preferences" on the menu. Then select "General" in the list on the left hand side and clear the checkbox "Allow multiple instances to run".
  2. To display line numbers in TextPad, select "View | Line Numbers" on the menu.
  3. To change the colour of the find text. Select "Configure | Preferences, Document Classes". You need to change the colour for each of the 3 document classes you added. EG:
Select :PGM Files, Colours
Select Selected text(no focus)
Select "Background color" – choose the colour you would like.

Setting up TEXTPAD in SysCAD

In SysCAD, from menu Options | General, on the "Global" Tab page, use the file browse button and enter the name of the Text editor as shown:

Textpadgeneral.png

Once this is done, the next time you press the Edit_PGM button in SysCAD, TextPad will start up. Editing other types of referenced text files from SysCAD will also be in TextPad.