[Contents] [Intro] [Reference] [Tutorial] [Questions [New [Index]
Overview -> Reference -> API Reference -> Commands of Category Set

daVinci API Definition - Set Commands

On this page, API commands of the set category are described. This category covers all commands to set options in daVinci. The commands of this category are enclosed by keyword set(...). Click here to get an overview of all API commands.

set(layout_accuracy(integer))

Sets the accurary of the graph layout algorithm and thereby the processing cost. The integer parameter of the command need to be in the range between 1 and 5, whereby higher values mean better layout quality. The default value is 3. A higher value may result in fewer edge crossings after using the layout algorithm, but the processing time will rise substantially. So, manipulate this option with caution, especially for very large graphs This setting operation can also be done by the user with menu Options/Layout Algorithm....

set(keep_nodes_at_levels(boolean))

(Only available in daVinci V2.0.2 or higher.) Specifies whether or not nodes should be kept at their current level when the graph layout algorithm is performed. The default value is true. Using argument false will place the nodes back to their initial level with the next run of the layout algorithm (e.g. by using menu Layout/Improve All). This setting operation can also be done by the user with menu Options/Layout Algorithm....

set(font_size(integer))

Sets the font size which is used for drawing the text of nodes in the graph. The size integer is specified in 'point' (pt), the default value is 12. The given integer need to be a supported font size, either 6, 8, 10, 12, 14, 18, 24 or 36. Setting the font size to a smaller value is useful to reduce the scale of a graph without loosing the text of nodes. This setting operation can also be done by the user with menu Options/Layout Dimensions....

set(gap_width(integer))

Sets the minimal gap distance between nodes at the same level to integer. The value need to be in the range between 4 and 300, the default value is 20. This setting operation can also be done by the user with menu Options/Layout Dimensions....

set(gap_height(integer))

Setting the minimal gap distance between the levels to integer. The value need to be in the range between 4 and 300, the default value is 60. This setting operation can also be done by the user with menu Options/Layout Dimensions....

set(multi_edge_gap(integer))

Sets the distance used for drawing multi-edges to integer. The value need to be in the range between 2 and 40, the default value is 10. Multi-edges are used if there is more than one edge between two nodes. The single edges of a multi-edge are spreaded by using this gap. This setting operation can also be done by the user with menu Options/Layout Dimensions....

set(self_edge_radius(integer))

Sets the radius used for drawing self-edges to integer. The value need to be in the range between 8 and 60, the default value is 16. Self-edges are used if the parent and child node of an edge are the same. Self-edges are drawn at the left or lower side of a node using a circle with a radius specified here. This setting operation can also be done by the user with menu Options/Layout Dimensions....

set(scrolling_on_selection(boolean))

(Only available in daVinci V2.0.2 or higher.) This command is used to switch the auto-selection behaviour. If auto-selection is on (true) and the user selects a node in a survey view, then daVinci automatically scrolls to the same node in the corresponding detail view (details about multi-view can be found in the concept document). This behaviour can be switched off using parameter false, the default value is true. This setting operation can also be done by the user with menu Options/General Settings....

set(animation_speed(integer))

Sets the speed used for animation to integer. The value need to be either in the range between 10 and 100 or 0 (0 is a special case to switch the animation off). The default value is 25. Animation is used to focus a new node, for example to show the result of command menu(navigation(find(...))) or menu(navigation(navigator(...))). The smaller the value, the slower the movement from an old point of focus to a new one. This setting operation can also be done by the user with menu Options/General Settings....

set(no_cache(boolean))

Sets the flag for controlling the pixmap cache to boolean. The default value is false. Set this to true if you have problems with memory on your computer.

For efficency reasons, daVinci will never draw a graph visualization directly on the canvas of a window. Instead, the canvas is partitioned into a grid of squares. For each element of the grid, there is a separate pixmap which is only drawn by need if the particualar grid element becomes visible, e.g. after using scrolling. This way, daVinci is even able to handle very large graphs which would usually require a hugh canvas. Already drawn pixmaps are kept in a cache to avoid another redrawing if they will become visible again after they have been invisible before.

You can observe this feature in daVinci: The first time you scroll into a new area of the graph, you will notice a delay which is needed to draw the portion of the graph on the pixmap of the corresponding grid element. Afterwards, the pixmap will be copied to the window canvas. The next time you scroll into this area, you will not notice any delay. The pixmap was cached and only need to be copied into the canvas without any redrawing.

Unfortunately, pixmap caching requires a lot of memory, especially for large graphs. This may crash daVinci with a message X Error: BadAlloc on systems with a small amount of RAM as soon as no more memory is available. You can try to work without the cache in these situations. The disadvantage of turning off caching is a reduced scrolling performance. This setting operation can also be done by the user with menu Options/General Settings....

set(rules_first(boolean))

Controls the attribute evaluation order for the use of visualization definitions as described in the concepts document. This attribute can be set only with this API command. Set this to false to achieve the default behaviour.


daVinci V2.1 Online Documentation - Page update: June 15, 1998