Converting a grouped set of primitives into a primitive

draw.io

I'm trying to develop a set of symbols for our developers to choose from when creating documentation.

I'm confused by the terms ('shape', 'path', 'closed path', 'symbol', 'element') so for the purpose of this post I'm using "primitive" to mean one of those shapes in the palette on the left, like a rectangle, or a cloud, or a disk pack. I can combine these primitives into a more complex shape on draw.io's canvas, and then use Arrange to Group them, and can put these on a diagram specifically intended to be a palette of shapes, but they can easily become ungrouped or otherwise behave in a non-singular way, such as when scaling.

Is there a way to convert a group into a "primitive"?

If there's not a graphical tool for doing this, how about a command-line tool to process the XML?

Or will I have to bite the bullet and learn gory details about SVG?

Best Answer

I've tried @David's solution. It works, but you need to apply part=1 style ONLY to the elements inside the group and not to the group itself. Otherwise, you won't be able to move the entire group. Let's assume, that you have a rectangle with a circle inside the rectangle. Then you group them together. Next, you select one by one, the circle, and then the rectangle inside the group and set the style to part=1 for both using the "Edit Style" option. Then, no matter what you select from that group, you will move all the elements together. Unfortunately, it doesn't protect the grouped shapes from being resized though.