next up previous contents index
Next: Memory Management Up: Marks Previous: Marks   Contents   Index


The !mark Command: Create User Marks

Syntax: !mark l|b|t|u|c|e|d|w|r [attr_flags]
This command allows the user to add annotation marks to the cell display, physical or electrical. These marks are not part of the design and will not be saved in output, but are useful for temporarily marking or highlighting an area for reference. They will appear on plots of the cell.

The marks are persistent to a cell, meaning that they will appear whenever the cell is displayed as the top-level cell in a window. Each cell in memory can have its own set of marks. Marks are not displayed in expanded subcells.

The first argument is a letter giving the initial type of mark to create. When the command is active, any of these letters may be typed in a drawing window, which will change the current mark type. While the command is active, clicking twice or dragging will produce a mark, and Shift-clicking in an existing mark will delete the mark.

The optional attr_flags is a decimal number representing flags bits that control presentation format of the mark. The bits are

bit 0
When set, a dashed line is used, otherwise solid.
bit 1
When set, the mark will blink.
bit 2
When set, an alternate color will be used for the mark (bit 1 is ignored). The default is the normal highlighting color.

The value is a digit representing the set bits, for example 3 sets bits 0 and 1, 5 sets bits 0 and 2, etc. A value 0 is the default.

When the command is active, pressing a digit key will reset the current attribute flags for subsequent marks.

The following marks are available:

l
Draw a line. Click twice or drag to define the line endpoints.

b
Draw an open box. Click twice or drag to define the box boundary.

t
Draw an open ``horizontal'' triangle, with the base a vertical line, and the third point pointing to the left or right at the midpoint of the base. The triangle will fit inside of the ghost-drawn box shown during creation. The initial press location sets the x coordinate of the triangle base.

u
Draw an open ``vertical'' triangle, with the base a horizontal line, and the third point pointing up or down at the midpoint of the base. The triangle will fit inside of the ghost-drawn box shown during creation. The initial press location sets the y coordinate of the triangle base.

c
Draw an open circle. The press location is the center of the circle, and the distance to the second point sets the radius.

e
Draw an open ellipse. The ellipse will fit inside of the ghost-drawn box shown during creation.

To delete a mark, while the !mark command is active, click on the mark to delete with the Shift key held. Any mark under the click location will be deleted, not just those of the current type.

Marks can be saved to a file, and restored from a file. This is accomplished by giving the following code letters, which can appear in the same contexts as the mark code letters.

d or w
The user will be prompted for the name of a file, then the existing marks in the current cell will be written to the file.

r
The user will be prompted for the name of a file, which should be in the format produced with the d or w option. If the file was produced for the same cell name and display mode of the current cell, the marks will be read from the file and added to the current cell.

The file format is not currently documented, but is very simple and should be easy to figure out by inspection.

The marks manipulated with the mark command are the same as the marks produced with the AddMark script function. Note that AddMark can create additional mark types not (yet) supported by the command interface.


next up previous contents index
Next: Memory Management Up: Marks Previous: Marks   Contents   Index
Stephen R. Whiteley 2017-11-08