What attribute to use as layer name in SVG for axicli

Home Evil Mad Scientist Forums AxiDraw What attribute to use as layer name in SVG for axicli

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28308
    Nailunia
    Participant

    Hello,

    I’m using the AxiDraw exclusively through the axicli (I create my SVGs through JavaScript and then save the output). The axicli documentation is very thorough, however I’m unable to figure out the layers. What SVG attribute do I need to set as the layer name? The documentation talks about “names”, but does that mean the “name”, “class”, “label”, “id”, or some other attribute name that I can give the SVG through JavaScript?

    Also, does this need to be a “g” (group) element, or can I also have an SVG without groups but with 2 separate “path” elements, one is “named” something starting with the number 1 and another with the number 2, and then use the –layer command?

    #28309
    Windell Oskay
    Keymaster

    The layer feature is set up to work such that if you created a document in Inkscape that had layers, it would work. If you’re hand-coding SVG, you’ll need to emulate that structure. Some of our AxiDraw example files include layers. You can open up those files in a text editor and look at how they are structured.

    An Inkscape layer is a g element with attribute inkscape:groupmode="layer". The layer name is specified by an attribute like inkscape:label="1-Yellow".

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.