Hi, I was trying to use this svg to generate code, and it’s not working. Earlier, I tried creating the svg with sublayers for 2 layers of components but i got rid of the sublayers so I thought it would work, but it still sees 0 params, inputs and outputs.
I’ve never used the python script to generate panels but looking at the VCV manual, I think you need exactly 1 layer called components with the component objects on it and the colours of the component objects need to be exactly as described. Maybe you can upload the svg file here so we an have a look it it?
I’ve attached an example which might help.
Edit: Here is the svg file on GitHub: Example VCV Rack .svg panel · GitHub
As @CountModula said, it has a layer called “components” which has some shapes (Inkscape has to see them as “circles”, not “ellipses” or a custom circle shape) filled with the colours set out in the VCV Rack manual (see the “Adding components” section on this page: VCV Manual - Panel Guide).
I also tend to keep a hidden layer which has editable versions of the text labels, in case I want to edit them again. You still have the turn the text into shapes, though.
Hope this helps!
Edit: Whoops. And don’t forget to hide the “components” layer before creating your module with the helper script, as the coloured circles will appear behind the controls when you use your module in Rack.
my svg file is posted above. i do have a components layer with those exact colors as far as i can tell. (<g inkscape:groupmode=“layer” id=“layer2” inkscape:label=“components” style=“display:inline;”> in the svg source) , is it because i didn’t make them into perfect circles? i’ll try that but i thought when i used it earlier, i didn’t need it to be perfect. I like the idea of the code generation as a sketching tool but i will probably end up needing to generate lights programatically.
I’ve found that if Inkscape doesn’t think the shapes are “circles” the helper script doesn’t seem to pick them up…
Edit: Just had a look at your SVG file. Seems Inkscape thinks your circles are ellipses. That’s probably why it ain’t working.
Yeah I ran into this,