Manual

Main uDraw(Graph) Tools

# uDraw(Graph) Tools

Beside the useful graph editor application you will find other tools in the "bin" directory of the uDraw(Graph) distribution.

Note: these are command-line tools. Using the command-line may be unusual for users familiar with Microsoft® Windows®. Refer to your Windows® documentation on how to get access to the command-line. Make sure, that the "$UDG_HOME/bin" directory is listed in your PATH environment variable or change the current working directory to "$UDG_HOME/bin" and use the tools as described below.

## checkterm

Syntax:
checkterm <term-representation-file>

This tool can be used to check the syntax of a file containing a graph in the term representation format. Of course this analysis is also performed by uDraw(Graph) when a graph is loaded, but "checkterm" is much faster and even simpler to use. Furthermore this tool can be used without a window environment.

## formatterm

Syntax:
formatterm [-i <indent>] <term-representation-file>

This tool is used for pretty printing of a file containing a uDraw(Graph) graph in term representation format. "formatterm" is used to fill a term representation with blank and return characters (i.e. ASCII 10 and/or 13) so it can be read easily in textual form. In the formatted term representation, each node and edge of the graph is placed on a separate line by using return characters. Different indent widths are used to clarify the level of the nodes. With option -i you can specify the indent of each level. The default value is 8 blanks. "formatterm" copies the original source file for backup by appending a percent character to the file name. The name of the destination file is the same as the original name of the source file.

It is possible to load a formatted term representation in uDraw(Graph), but it is not possible to send it to the API, because return characters are only allowed at the end of an API command. In this case, use tool "flattenterm" to undo pretty printing.

## flattenterm

Syntax:
flattenterm <term-representation-file>

With this tool, pretty printing is undone for a file containing a uDraw(Graph) graph in term representation format. This is simply done by removing all blanks, tabulators and return characters between terminal symbols of the term representation. The white space inside strings is left untouched. "flattenterm" copies the original source file for backup by appending a percent character to the file name. The name of the destination file is the same as the original name of the source file.

It is possible to load an unformatted term representation in uDraw(Graph) as well as sending it to the API.

## gml2udg

Syntax:
gml2udg <gml-file> [<term-representation-file>]

This tool translates a graph stored in a GML (Graph Modelling Language) representation into the respective term representation of uDraw(Graph).

The following GML attributes are supported and converted to a suitable, equivalent representation in uDraw(Graph):

- Graph level:
  - node
  - edge
  - directed
- Node level:
  - id (must be unique)
  - name
  - label
  - graphics
- Edge level:
  - source (node must exist)
  - target (node must exist)
  - label
  - graphics
- Graphics level:
  - type (node values: bitmap, image, oval, polygon, rectangle, text, triangle, ellipse, rhombus, circle. edge values: single, single;solid, single;dotted, single;dashed, double, double;solid, double;dotted, double;dashed)
  - visible (only for nodes, values: 0,1)
  - fill (for nodes and edges, value: a valid uDraw(Graph) color)
  - width (only for edges, value: positive number)
  - image (only for nodes, value: filename)
  - arrow (only for edges, values: none, first, last, both)
  - smooth (only for edges, values: 0,1)
  - font (for nodes and edges, values: lucida, times, courier, helvetica)