0% found this document useful (0 votes)
125 views18 pages

For Using The ANSYS-Syntax-Highlighter: Quickstart

The document discusses an ANSYS syntax highlighter program that provides several helpful functions for ANSYS users, including syntax highlighting, safety functions to prevent overwriting files, ANSYS-specific functions like multi-row commenting and copying to ANSYS, and advanced functions like auto-completion templates and auto-scanning of declared variables. It provides instructions on installing and configuring the editor program.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views18 pages

For Using The ANSYS-Syntax-Highlighter: Quickstart

The document discusses an ANSYS syntax highlighter program that provides several helpful functions for ANSYS users, including syntax highlighting, safety functions to prevent overwriting files, ANSYS-specific functions like multi-row commenting and copying to ANSYS, and advanced functions like auto-completion templates and auto-scanning of declared variables. It provides instructions on installing and configuring the editor program.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

C.A.T.S.

QUICKSTART for using the Computer Aided Technical Simulations


[email protected]
ANSYS-Syntax-Highlighter (Version 1.85)
• The Syntax-Highlighter is the result of a project with the intention to examine the
most needed and helpful functions which an ANSYS session editor should provide.
• Other ANSYS configurable editor programs (but more global) are i.e. :
Textpad, UltraEdit, SemWare-TSE32, SynEdit
• The software will be distributed as freeware (actual code is based on a GNU-license)
Actually available for Windows NT 4 and NT 5 (Linux-version pending)
• min. Screen-resolution: 1024x768 (more is recommended)
• Try to arrange your windows like this (Save with MenuCtrls + Savemenu-Layout) :

Syntax-Highlighter
(is able to replace
your input window)

Quickstart_Syntax-Editor.ppt 22.06.2002 page 1 / 18


C.A.T.S.
Computer Aided Technical Simulations
[email protected]

Overview of program functions


• Window editor functions (as usual)
• simple workspace-manager
• safety functions
• ANSYS-specific functions of the editor
give exceeded productivity
• Syntax-Highlighting
• Installing and configuring the editor

Quickstart_Syntax-Editor.ppt 22.06.2002 page 2 / 18


C.A.T.S.
Working with the MDI-Windows (Multiple Dokument Interface)
Computer Aided Technical Simulations
[email protected]

Loading files with the Standard-File-Menu


or via Drag&Drop out of the Explorer

Workspace bar

Navigating bars
(Additional to the Standard-Window-Menu for faster access)
Hint gives information for full filename

The program includes a simple workspace-manager: Position Navigating


If you have loaded all files of your project, save this workspace:
• just type in the Name of your workspace
(RETURN key saves the workspace)
• next time you want to change the workspace,
click on the right side Another way to reload the last files
and choose in the list is the Recent-Files menu:

Quickstart_Syntax-Editor.ppt 22.06.2002 page 3 / 18


C.A.T.S.

safety functions of the editor Computer Aided Technical Simulations


[email protected]

Problem description:
• Even at a stand-alone-PC text editors do not check, if the file is already opened
(Word or wordpad do this right, but are bad ANSYS-Editors)
But if you edit an ANSYS-Inputfile two times, you can overwrite a better version.
Our Solution:
• program has to check (and prevent) multi-editing

Problem description:
• many editors delete the Undo-Buffer when saving the file
Our Solution:
• We only delete the buffer, if the file is closed
• unlimited undo-size

Problem description: We recommend the following settings:


(see chapter configuring syn_editor.ini)
• ANSYS under UNIX-11 can crash if textfiles contain tabs
Our Solution:
• We can delete all tabs, exchanging them via space chars
• Indent-Functions uses space chars, not tabs

Quickstart_Syntax-Editor.ppt 22.06.2002 page 4 / 18


C.A.T.S.

ANSYS-specific functions of the editor Computer Aided Technical Simulations


[email protected]
• Multirow-ANSYS-Comment-Switch of marked block:
Select the rows to switch and press
STRG+ALT+W
(every key is user-configurable)
• Nice function for training as well as for power users:
Copy to Ansys using a temp-file and APDL-Clipboard-Text “/inp,” with Parameter 1 (write into log file)
The commands are automatic written
into the ANSYS command line

This avoids ANSYS from crashing under Windows 2000 and enables NT-Systems to use more lines
(ANSYS cuts clipboard lines under NT systems)
In this way it is also possible to use a direct *vwrite-command (no macro needed!)
• Resize ANSYS-Graphics-Window (Dialog-Window)
This is a fast method to resize
the window to a user-specific size
i.e. to create comparable AVI’S
or /UIS-hardcopies Window Title

• Enhanced Dyn.-Prompt-function (we are still looking for the best way)
a) Press SHIFT, click behind the word and move the mouse
b) type command and first comma and wait some seconds
(list appears and stays until next ENTER or ESC) :

Quickstart_Syntax-Editor.ppt 22.06.2002 page 5 / 18


C.A.T.S.
Understanding Highlighting
Computer Aided Technical Simulations
Please load the example “press2d.ans”, goto row 50 and view: [email protected]

Row-comments

APDL-Keywords
Strings

APDL-Programming Try also printing highlighted ANSYS-Files on a black&white-laser:

Before printing try a preview:


Important adjustments are:

Quickstart_Syntax-Editor.ppt 22.06.2002 page 6 / 18


Note: This program uses advanced Highlighting C.A.T.S.
Computer Aided Technical Simulations
This means that text is not only highlighted with colors and text
[email protected]
font properties like bold, italics.
We also use background coloring. To see the difference export your ANSYS-File as a colored HTML-
File and compare screen and printing:

HTML
without advanced
highlighting

Advanced Highlighting
on the screen
or color printing

b&w printing
without coloring backgrounds

Advanced Highlighting
on a b&w printing

Quickstart_Syntax-Editor.ppt 22.06.2002 page 7 / 18


C.A.T.S.
Advanced Functions:
Computer Aided Technical Simulations
Besides highlighting, the program offers other very simple, [email protected]
but helpful ANSYS-specific functions:

• Auto-completion using templates


(using AutoIndent)

• Quicksearch-List

Seems to be more useful than a word-sensitive search


(like i.e. Winword)
• AutoScanning of declared and used ANSYS-variables : Right clicking in the Search-Window
(Using the Quicksearch-List-Window) opens a new editor window for a quick
documentation (STRG for sorting):

NOTE:
The Autoscanning uses only
assignments (*GET, = , also in
commented lines)
Use QuickSearch-List for
searching every position of a
Just click on the variable in the QuickSearch-List
variable.
and the cursor jumps to this position
Quickstart_Syntax-Editor.ppt 22.06.2002 page 8 / 18
C.A.T.S.
Computer Aided Technical Simulations
Context functions:
[email protected]
a very powerful online documentation function is the outline tree.
The structure is based on comments with a limited set of keychars.
The number of keychars shows the outline level.

Keychar is “-” Start tree-example.ans and test ist !!

level 2

“!--” means level 2

Clicking at the outline node


Hint: Use underscores (_) : leads cursor to this position

Quickstart_Syntax-Editor.ppt 22.06.2002 page 9 / 18


C.A.T.S.
Using AutoCompletion and Auto-Indent:
Computer Aided Technical Simulations
Auto-Completion can be used in two different ways: [email protected]

• type in the A.C.-keyword and press STRG+J


• or: double-click the template at the Auto-Complete-List
4the Auto-Complete-Block is automatically placed with an indent fitting to the cursor position

Cursor position for do-template

Cursor position for ife-template


AC-keywords

Auto-Indent

Note:
After insertion of the template the cursor
position is placed to continue editing

Quickstart_Syntax-Editor.ppt 22.06.2002 page 10 / 18


C.A.T.S.
Computer Aided Technical Simulations

Installing the editor [email protected]

Note:
The programs needs no registry-entries.
This means very simple installing by copying all files in one directory.

We recommend to edit the File syn_HIGH-DCI.dst first:

Installation folder

Quickstart_Syntax-Editor.ppt 22.06.2002 page 11 / 18


C.A.T.S.
Computer Aided Technical Simulations
Details for configuring (available, but not fully documented yet) : [email protected]
The pre-defined workspace HIGH-DCI loads all needed files:
Some adjustments are automatically done using the Dialog-Window

Other settings are shown here :

Avoiding multi-changing on
single user-system

Automatic backups when saving See Print preview:

Do not edit Syn_editor.ini


inside of the Highlighter
(programs reads ini-File at
start and writes at the end) Important for UNIX-users:

File-Extensions for Highlighting:

Quickstart_Syntax-Editor.ppt 22.06.2002 page 12 / 18


C.A.T.S.
Details for configuring Auto-completion :
Computer Aided Technical Simulations
There are two methods: [email protected]

a) Highlight-Window based (under construction)


b) manual administration:
Also use pre-defined workspace HIGH-DCI and changing ANSYS.dci.
ANSYS.dci is decribing the hierarchical outline and APDL-templates

Semicolon “;” is a reserved char, followed by the outline


level and outline title

Template Block:
“[“ is a reserved word, followed by
AutoCompletion word and “|” and Hint, ended with “]”)

Multiple Template Name is only a reference:


If the refrence name is used more than one
time, only the first definition is used, all
others are using the same block

Quickstart_Syntax-Editor.ppt 22.06.2002 page 13 / 18


C.A.T.S.
Highlight-Window based Auto-completion configuration
Computer Aided Technical Simulations
(still under construction)
[email protected]
use the Tree-Admin-Button in the Toolbar

( only available if Cursor is in Edit Window ) 1. Choose the position in the tree
2. Edit title, comment, template

Change tree-structure ( At Work )


3. Update Node (if changed)
node must be selected in tree,
(otherwise copy to new position)
Quickstart_Syntax-Editor.ppt 22.06.2002 page 14 / 18
C.A.T.S.
Other Functions:
Computer Aided Technical Simulations
• Column block (use ALT+Mouse-Select) [email protected]

• Fill Block with specific character using STRG+ALT+F


• Set Marker (1..9) using STRG+SHIFT+1..9
• Goto Marker (1..9) using STRG+1..9 (use it instead of tiling the window)
• Match Bracket (see match-example.ans) :
place the cursor in front of “(“ or “)” and press STRG+SHIFT+B :
y12=ARG1*(1-cos(ARG2))
• Still at work
First public version was distributed on the ANSYS-UserMeeting 2001 in Berlin
• For interested ANSYS-Users:
• visit the CATS-Homepage (there will be a Email-Newsgroup for updates)
• visit a training Workshop at Bahlingen (near Freiburg)
• user-specific training (we travel to you)

Quick resizing the List-Windows


by Double-clicking on the title:

Quickstart_Syntax-Editor.ppt 22.06.2002 page 15 / 18


C.A.T.S.
APDL-rules (in German: “Leitfaden”:
Computer Aided Technical Simulations
means standardization of APDL-Inputs => our strategy: [email protected]

• macros and templates in a hierarchical library


• !- for Online-Tree
• !@ for Links (pictures, drawings and more..)
• and many more... we will initiate an APDL-workshop in 2002 to discuss it.

Quickstart_Syntax-Editor.ppt 22.06.2002 page 16 / 18


C.A.T.S.
Additional tips 1/2:
Computer Aided Technical Simulations
[email protected]

Editing synansys.hint gives personal help tips:

Finding Start and end of *if / *do-loops


using grep-Search

Start grep-loops.ans and test ist !!

Quickstart_Syntax-Editor.ppt 22.06.2002 page 17 / 18


C.A.T.S.
Additional tips 2/2 :
Computer Aided Technical Simulations
[email protected]
Very often answered question:
How to indent a line / paragraph without using tabs ?
Solution (test with indent-example.ans)

(A) Good APDL-stuff (B) select block and (C) at the end:
but not easy to read: STRG+SHIFT+K+I for
indenting
(K+U as opposite)

Quickstart_Syntax-Editor.ppt 22.06.2002 page 18 / 18

You might also like