Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Config.pro Syntax Highlighting 1

Status
Not open for further replies.

tydguy

Mechanical
May 2, 2006
34
0
0
CA
This tip is for those of you who work directly with the various configuration files for Pro/E, and are tired of the limitations of notepad to edit these files.

PSPad is freeware text editor for windows. I've known about this program for a while (as I'm sure many of you have too), but recently I've been using it for editing my configuration files because of its ability to have multiple files open in tabs. PSPad is a powerful editor with many useful features including a few I use most often:
* As mentioned, opens files in tabs.
* Almost unlimited undo operations.
* A great find and replace tool
* Saves state on close so your last open documents reopen on startup.
* Moniters file and alerts you to changes while open. Useful if you save changes in pro/e while the config file is open.
* Spellchecker
* Macro Recorder
* Split window vertically or horizontally or arrange windows side-by-side for comparison
* Extensive and customizable user syntax highlighting (discussed below)
* Free for commercial and government use.
* Many more features!

The most useful feature I've found (and what prompted me to write this tip) is custom user syntax highlighting. With a few straight forward settings, you can define different text styles for comments, config.pro settings, and mapkeys.

1. Download PSPad editor: 2. In the program, select Settings menu > User Highlighter.
3. Click Cancel on the Open *.ini screen
4. Fill in name (PROE), and file types with *.pro, *.sup and any other extension from your config files you wish to edit (ie. *.old)
5. Check off the '!' as your comment only
6. Set Allowed Chars in Keywords to '@_().' (minus quotations, I believe these are all that appear in the keywords)
7. Uncheck all checkboxes (especially 'Preprocessors' and 'Words are Case Sensitive')
8. Under the number 1 tab (key word tabs) enter in 'mapkey', and 'mapkey(continued)' and any other words you wish to have highlighted the same
9. Go to Olaf Corten's website ( and copy the complete list of config options for your version of Pro/E. Paste into editor (like Word) and remove all spaces and '(hidden)' comments. Copy again and paste into the 2nd tab of keywords.
10. Save and Close!
11. Select Settings menu > Highlighter settings.
12. Select Specification tab.
13. On the left (highlighter) list, click on one of the bolded highlighters.
14. On the right side is a list of user highlighters, select Pro/E.
15. On the Color tab, you can select which settings you will prefer. I use green italics for comments, navy for config options, navy bold italics for mapkeys, and navy italics for mapkeys(continued).

Thats it! Now everytime you open a config.pro file, it will highlighted and a lot easier to work with. Play around with it as there is a lot of features in this program that can't all be covered here.

~Tyler
 
Status
Not open for further replies.
Back
Top