Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Size of imported svg symbols

0 votes
Hi

I tried yed as a replacement for viso to draw network diagrams.

I downloadd some svg files from openclipart.org and added them to a section (Import symbols).

All imported symbols are resized and the height is always around 400.

Even if I resize them with inkscape the imported symbol is always the same size.

If I set the size to 60x100, the size of the preview in the section gets very small.

How do I set a size according to the predefined symbols without loosing the preview size?
in Help by

1 Answer

0 votes

Hard to tell what is going wrong without knowing the "resized" SVG document(s). Hazarding a wild guess, I suggest looking for a viewBox attribute and removing that. If you upload one of your resized documents here, I will take a look.

by [yWorks] (161k points)
Hi

Thanks for your reply.
I made some screenshots and uploaded the original svg and the modified svg.
https://94.231.88.54/yed-size.zip    (Sorry for the ssl error, it's just a testserver)

On the screenshot image-viewer it looks like the svg was resized correctly.
On the screenshot yed1 you see the properties of the imported file (small version) and on yed2 you see it after I changed the properties in yed.
I just don't get it where the size of the importet svg comes from because it's not the original size nor the resized size.
What I would like to achieve is that the size of the imported symbol matches the size of the already included symbols (In preview and if placed on the graph).

Thanks in advance for your help!
Thank you very much for the screenshots and SVG documents. Turns out, I misunderstood your problem. Now that this is no longer the case, I suggest the following approach:
1. Import all the desired SVG documents.
2. For each imported symbol, open its context menu, choose "Properties", and specify the desired width and height.
(After step 2, all the previews should have the undesired small size.)
3. Open the palette section's context menu once again and choose "Convert to Document".
4. Open the palette section's context menu a final time and choose "Adopt from Document".
Repeat steps 3 and 4 for each palette section with resized templates.
Alternatively, you can quit and restart yEd once after resizing all symbols instead of repeating steps 3 and 4 for each palette section.

Hope this helps.
Hi

It worked, thank you very much!
I still don't get why the symbols are resized when imported and it is quit a lot of initial work but I have my sections as I wanted.
I had the same problem. It turned out that Yed does not verify the last modified date of the imported document (if you resize it and save it with the same name and then tried to import it again, the old size will persist). I restarted Yed the symbol is imported with the new size!
Legal Disclosure | Privacy Policy
...