Symbol Editor


1. Introduction
2. Drawing Symbol Elements
    2.1 Graphics Elements
        2.1.1 Rectangle
        2.1.2 Circle
        2.1.3 Arc
        2.1.4 Vector
        2.1.5 Label
    2.2 Ports
    2.3 Symbol Properties / Macros
3 Moving Symbol Elements
    3.1 Drawing a Symbol Property
    3.2 Viewing Symbol Properties
4 Modifying Symbol Elements
    4.1 Modifying a Label or Symbol property
    4.2 Modifying a Rectangle, Circle, Arc, or Vector
5. Deleting a Symbol Element
6. Creating a Symbol from a Schematic
7. Scaling Help for "Fancy" Symbols

1. Introduction to Symbol Editing

The Symbol editor is an integral part of the tdct application. It allows drawing of the following elements:

The selected drawing mode is displayed on the status bar. A drawing mode can be aborted at any time by pressing the ESC key.

New symbols are created by selecting from the main menu:  File >> New Symbol.
Existing symbols are opened from the main menu: File >> Open Symbol.
Recently modified symbols are opened from the main menu: File >> Open Recent.

The Symbol Editor and the Schematics Editor can be active in the same session. Multiple symbols and schematics can be edited in the same session in different tabs.

When a user symbol is edited and saved, all symbol instances using this user symbol will be updated on all canvases.
A menu command "Symbol >> Reload" exists which allows updating of all instances of a selected user symbol, in case the symbol has been edited on disk with a text editor.

2. Symbol Elements

A symbol may contain three different types of elements:

2.1 Graphics Elements

2.1.1 Rectangle

Drawing a Rectangle
Select from the main menu  Draw >> Rectangle.
Press the left mouse button, drag a rectangle and release the mouse.

2.1.2 Circle

Drawing a Circle
Select from the main menu  Draw >> Circle.
Press the left mouse button where you want the circle centre, drag a rectangle to a point on the circle's circumference and release the mouse.

Note: the "active" area for selecting a circle is the bounding rectangle.

2.1.3 Arc

Drawing an Arc
Select from the main menu  Draw >> Arc.
Press the left mouse button where you want the arc's circle centre, drag a rectangle to the starting point of the arc and release the mouse. You will be prompted for the arc angle (in degrees).

Note: the "active" area for selecting an arc is the rectange determined by the arc's endpoints. Note that this in a somwhat counterintuitive selection area for arcs with an angle of more than 180 degrees.

2.1.4 Vector

Drawing a Vector
Select from the main menu  Draw >> Vector.
Click the left mouse button for the first point, drag the mouse to the next location, click for the next point, etc.  right-click to terminate vector drawing.
Use the ESC key, to abort vector drawing at any moment.

2.1.5 Label

Drawing a Label
Select from the main menu  Draw >> Label.
Press the left mouse button, drag a rectangle and release the mouse. You will be prompted for the label text.




2.2 Ports

Ports are symbol elements to which wires can be attached.

If the symbol represents an EPICS record, a Port represents an EPICS record field with the same name.
If the symbol represents a schematic, a port represents a hierarchical connector with the same name on the corresponding schematic.

Note that a port consists of two or three elements: a port symbol, a stem (horizontal vector) and an optional bulb (a circle at the vector end opposite the port symbol. The vector and bulb are for optics purposes only. They don't play any role in EPICS database building. Especially, the bulb does not imply any signal inversion.

Tdct enforces a minimum vertical port spacing in order to allow easy connecting of wires to ports.

2.2.1 Input Ports

Drawing an Input Port
Select from the main menu  Draw >> In port or Draw >> In port no bulb.
There are two options for placing the port on the symbol:
a) left-click the mouse where you want to place the right end of the port vector (or the bulb if you draw a port with bulb).
b) Press the left mouse button where you want to place the right end of the port vector, drag a vertically narrow rectangle to the location of the port symbol and release the mouse.

Note: the the port vector will always be drawn horizontally.

2.2.2 Output Ports

Drawing an Output Port
Select from the main menu  Draw >> Out bort or Draw >> Out port no bulb.
There are two options for placing the port on the symbol:
a) left-click the mouse where you want to place the left end of the port vector (or the bulb if you draw a port with bulb).
b) Press the left mouse button where you want to place the left end of the port vector, drag a vertically narrow rectangle to the location of the port symbol and release the mouse.

Note: the the port vector will always be drawn horizontally.







2.3 Symbol Properties / Macros

A symbol property defines a macro name and a default value for the macro. When a symbol is instantiated on a schematic, the default value for the macro may be overridden. In addition, the symbol property has a property name, which is for internal use of tdct only and is automatically assigned by tdct. The property name is only visible in the schematic editor and in the property dialog for user symbols..

On the corresponding schematic, the macro name is used as a placeholder in the form $(macro name). When an EPICS database is generated, the placeholder is resolved to an instance value.

        Example:
        The symbol defines a property   HW ???

        An instance of the symbol  is placed on  a schematic and the property value is redefined, say to HW Modtcp.

        If the schematic which corresponds to the symbol contains the macro $(HW), it will be replaced with the macro value Modtcp during database building or on-line display.

Empty Macro Values

Tdct provides two options in the configuration files to deal with empty macro values in different ways:
If an empty macro value is desired it can be explicitly indicated by instantiating the macro value to "".



3.1 Drawing a Symbol Property
With no element selected, CTRL-right-click with the mouse at the location where you want the symbol property displayed.
Alternatively, use the Properties >> Add menu.

You will be prompted to enter the property name and value.
The format for entering a property must be strictly followed:
      <name> <value>
i.e. enter the property name <name> separated by one space from the property value <value>.

Tdct automatically assigns a property identifier of the form set<x> where <x> is an arbitrary alphanumeric string. The property is stored in the symbol file in the form
set<x>:<name> <value>.

Each property of a symbol must have a unique name.

You can set the display mode (Value Only, All, Nothing) by selecting the appropriate radio button. Default is Value Only, which displays <name> <value>. If All is selected,
set<x>:<name> <value> is displayed.

3.2 Viewing Symbol Properties

If you right-click on a symbol canvas when no symbol element is selected a dialog with a property sheet for all symbol properties will be displayed, which also allows editing of the properties.




3 Moving Symbol Elements

Each symbol element can be moved by selecting it (color changes to red (default)) and dragging to new position.

Special considerations for symbol ports:
A port consists of  two or three elements:
- the port symbol, which determines the port direction (input or output)
- the optional port bulb, which is located where the port connects to the symbol
- the port stem which connects the port symbol with the bulb or (for ports without bulb) with the symbol
Only the port symbol is important to the function of the symbol, the bulb and stem are for optics only.

To move a port, select all three elements by drawing a selection rectangle around them. Then drag.







4. Modifying Symbol Elements

4.1 Modifying a Label or Symbol Property

Select the label or property by left-clicking on the text. (Note the change of the cursor to a hand, when the mouse is in a position to select the item).

You may also draw a selection rectangle to select the label or property.

The color of the label / property changes.

Then right-click. You will be prompted to enter the new label text or  property name and value.

Special considerations for properties:

You may also modify property names, values and font sizes by calling up the property sheet for the symbol. This is done by right-clicking on the symbol canvas when no symbol element is selected or by using the Properties >> Show menu.

Note that the format for entering a property must be strictly followed:
 <name> <value>
<name> the property name separated by one space from the property value <value>.
Each property on a symbol must have a unique name.
You can change the display mode (Value Only, All, Nothing) by selecting the appropriate radio button. Default is Value Only, which displays <name> <value>. If All is selected,
set<x>:<name> <value> is displayed.
If the display mode is set to Nothing, it is challenging to select a property for further modification. Use the property dialog to change the display mode of a property.

4.2 Modifying a Rectangle, Circle, Arc, or Vector

In order to edit an existing rectangle, circle, arc or vector, select it by left-clicking on its "active" area.

Available editing functions for a selected element:


4.3 Modifying a Port Name

Select the port by left-clicking on the text. (Note the change of the cursor to a hand, when the mouse is in a position to select the item).

You may also draw a selection rectangle to select the port. Select the port symbol only, i.e. exclude the stem (and optional bulb).

Then right-click to open the rename dialog.



5. Deleting a Symbol Element

Select the element by left-clicking within its bounds or draw a selection rectangle. Note the color change of the selected element.

Press the DELETE key.

If a property is selected, it can also be deleted using the Properties >> Delete menu.

6. Creating a Symbol from a Schematic

If you create a new schematic with the schematic editor, you can automatically create the corresponding symbol prototype.
Select from the main menu  Symbol >> Create symbol from schematic.

This will open a new symbol tab and produce symbol prototype with a rectangular symbol shape. All hierarchical connectors of the schematic will be displayed as ports and all macros used in the schematic will be available as symbol properties.

7. Scaling Help for "Fancy" Symbols

Drawing of Vectors, Arcs, and Rectangles is tied to the standard grid snap.

In order to allow drawing of small patterns which make symbols more distinct, a scaling facility was added to the symbol editor. Use it as follows: