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?
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".