Inkscape.org
Beyond the Basics Adding a clone to Symbols
  1. #1
    spiffspaceman spiffspaceman @spiffspaceman

    I created a drawing of a left foot.
    Then I cloned and flipped it horizontally to get a right foot.

    Now my question: if I try to add the left foot to the library of symbols there is no problem. But if I try to do the same with the right foot, the clone, it doesn't work: the object get not added to the Symbols. 

    Something interesting is that even if after having tried to add the clone no object is visible in Symbols, actually, something happened to the Symbols. In fact when Symbols is empty it shows the text "No symbols found.". After I added the clone the text "No symbols found" disappear like if something is there but it is not visible. 

    What's happening? Is there any way to add clones to the Symbols?
     

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Yes, but you can't see them in the Symbols dialog... it was not built to recursively navigate the XML to find the parent. 

    A symbol made from a clone can be duplicated if it is selectable on the canvas... that behaves like dragging a symbol from the dialog.

  3. #3
    spiffspaceman spiffspaceman @spiffspaceman

    @Tyler Durden, thank you for your answer! That's make Symbols dialog a bit less useful for me.

    If I understand correctly, Symbols dialog is just a facility to work more... neatly. I can do exactly the same putting the objects I need to work with on the canvas (maybe in a separated layer) and cloning/duplicating it when I need to use them and/or changing their parent when I need to updated them.

    Thanks!

  4. #4
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Drag your "left foot" from the symbol dialog into the canvas.
    Unlink the symbol from the parent [Edit > Clone > Unlink Clone] or [shift+alt+d].
    Ungroup the result [Object > Ungroup] or [shift+ctrl+g]. 
    [Object > Flip Horizontally] or [h] to create the "right foot". 
    Copy to the clipboard [ctrl+c].
    Paste to the symbol dialog.

  5. #5
    spiffspaceman spiffspaceman @spiffspaceman
    *

    @Paddy_CAD the procedure you propose is fine except that the left and right feet became two independent objects so that if I modify the left foot the right one didn't get updated.

    It's more important to me to be able to maintain the relationship between the two feet than the convenience of using the symbol dialog. If I make changes to one object I need all the descendant objects to be updated. 

    I've also tried using Find/Replace by replacing, as you advised, the reference to the "parent" (or even changing the parent id). This works but it changes the position of the objects on the canvas so it's impractical for me.

  6. #6
    Aero Aero @Aero◻️

    Using Inkscape 1.2-rc, the issue mentioned in #1 seems fixed.

  7. #7
    spiffspaceman spiffspaceman @spiffspaceman

    @Aero: wow!!! I install and try it....

    Thanks!!!!

  8. #8
    spiffspaceman spiffspaceman @spiffspaceman

    Sorry, how does it work the installation of 1.2rc? Before installing the RC version should I remove version 1.1? 

  9. #9
    spiffspaceman spiffspaceman @spiffspaceman

    I answer to myself in case someone read this thread:

    > How does it work the installation of 1.2rc? Before installing the RC version should I remove version 1.1? 

    From:https://inkscape.org/release/1.2rc/windows/

    [...]

    Please note: Always remove/uninstall the previous version before updating!

    If you should experience any difficulties launching Inkscape after installing/updating please see the relevant FAQ entry.

    For parallel installations of different versions use the compressed .7z archives. Make sure to extract them into an empty folder (we recommend the free software 7-Zip to extract) and create program shortcuts manually if required.

  10. #10
    Tyler Durden Tyler Durden @TylerDurden
    spiffspaceman

    I can do exactly the same putting the objects I need to work with on the canvas (maybe in a separated layer) and cloning/duplicating it when I need to use them and/or changing their parent when I need to updated them.

    Correct. 

    Symbols are clones, but hidden in the Defs section of the document. They can also be collected in separate documents accessible by the Symbols dialog.

  11. #11
    Aero Aero @Aero◻️

    Symbols and clones are two different elements. It is recommended but not required that symbols are stored in defs. Either way, symbols are hidden until you reference them using the <use> element (clone).

    https://developer.mozilla.org/en-US/docs/Web/SVG/Element/symbol

  12. #12
    inklinea inklinea @inklinea⛰️

    Replacing objects across documents is not difficult.

    Getting the position to match is difficult ( at least for me ) 

    Matching the transforms - makes my brain hurt. I can get it to work if there is just translate involve. However if there is scaling on the substitute object - it all goes wrong :(