Inkscape.org
Beginners' Questions Moving a <use> without applying a transform?
  1. #1
    Adam Williams Adam Williams @adamwilliams

    I have a simple SVG which uses a <use> to render two bikes.

    I would like to change the position of the bikes, which I would expect to change the x and y attributes of the <use> element.

    Whenever I drag the bikes around, Inkscape applies a transform (translate) instead of actually changing where the <use> is rendered.

    How can I edit the co-ordinates of the <use>?

    Screenshot From 2025 06 10 21 02 12
  2. #2
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Every SVG is a text file describing graphical shapes. Inkscape could be described as text editor with a fancy interface.

    For a single shape, select the clone and open Inkscape's XML editor [shift+ctrl+x]. If you want to change many clones, it will be quicker to open your SVG file in a text editor with regex. Use find and replace to move coordinates from the transform attribute to x and y attributes. From this...

        <use
           x="0"
           y="0"
           xlink:href="#path1"
           id="use2"
           transform="translate(16,32)" />

    ...to this. (The order of attributes inside the <use .... /> element doesn't matter.) 

        <use
           xlink:href="#path1"
           id="use2"
           x="16"
           y="32" />

     

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Moving a <use> without applying a transform?