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-idSpecify the ID of the object for a query.
-S, --query-allReturn 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).
     
svg2293,26.447175,24,97.105652,92.450851 layer1,26.447175,24,97.105652,92.450851 MyStar,26.447175,24,97.105652,92.450851
-X, --query-xAsk for the x position of an object.
-Y, --query-yAsk for the y position of an object.
-W, --query-widthAsk for the width of an object.
-H, --query-heightAsk for the height of an object.
© 2005-2017 Tavmjong Bah.![]()  | ![]()  |