[Warning] Warning

This section not yet updated for Inkscape v0.92.

Query Command Line Options

The query options allow you to determine position and size information for any object in an SVG file. The key here is knowing the ID (name) of the object for which you desire the information. The ID name must be given. The exported numbers use the SVG coordinate system.

Here is an example of finding the x position of the zoom-in icon in the default icon file on a Linux system:

inkscape --query-id=zoom-in -X /usr/share/inkscape/icons/icons.svg

-I, --query-id

Specify the ID of the object for a query.

-S, --query-all

Return a comma separated list of id, x, y, w, and h for all objects (including SVG file, Layers, and Groups) in file. Each object is on its own line.

Here is an example from querying MyStar.svg (used in the example at the start of this chapter).

-X, --query-x

Ask for the x position of an object.

-Y, --query-y

Ask for the y position of an object.

-W, --query-width

Ask for the width of an object.

-H, --query-height

Ask for the height of an object.