Delete only one of several objects connected by magnets

I have a rectangle with four magnets at the corners, and two crossing lines are connected to the corners of the rectangle, as in the following figure:


Normally, when I delete the rectangle, the connected line are deleted as well. Is it possible to delete the rectangle without deleting (or moving) the lines?

I have tried by disabling all magnets (Allow connections from lines and Allow connections to other objects unchecked everywhere), but the objects behave as if they are still connected: for instance, if I move the rectangle, the lines move along with it. Any idea? Using OG 7.18.5.

Clarification required …

Why is that a surprise, why do you expect not-connected behaviour when you have connected the articles ?

My apparently wrong expectation is that, when magnets are turned off, the objects should not attract each other any more, and move independently.


A Magnet is a Magnet, until you delete it.

Connections are connections until you dis-connect them. Both Connect and dis-connect are acts.

If you turn one or more Magnets OFF (by any means), or delete one or all Magnets (by any means), OG does not dis-connect the Line … it is transferred to one of the remaining Magnets, or [for the last Magnet deleted] a default connection to the centre of the Shape.

  • You will or won’t be able to connect the Line again to the Shape (based on the settings you refer to.)

  • But while the connected Line and the Shape exist, the connection will remain.

  • Losing a Connected Line as a consequence of deleting one or more Magnets is definitely undesirable.

Thus your three connected articles will behave as three connected articles. Whether they are Grouped into one Object or not.

If you have difficulty placing the Line near or on top of the Shape (because it automatically connects to the Shape and any Magnet), do not turn off the Magnets or delete them. Instead, do this:

  • position the Line and orient it precisely the way you want it, away from the Shape

  • grab the Line (not an EndPoint or MidPoint) and move it over the Shape,

    • by drag, or by the arrow keys, or by the coordinates fields in the Ruler or Inspector/Property dialogue.

The specific solution to the example given is this. Simply place the Lines on top of the Rectangle as you wish, without connecting them to the Rectangle. You can now delete or move any of the three articles without affecting the others.

If you do want the three articles to move together, simply Group them.


Thanks for your clarification and proposed solution. Now it’s clear to me why this is expected and desirable behaviour.

My use case is that I use a shape as a frame to place a number of lines. Using a script, I accurately add magnets to the shape, and then draw the lines across the shape, connecting them to the shape’s magnets. At the end, I would like to get rid of the shape, leaving the lines at their place: as per your explanation, that is not possible, so I am making the shape invisible instead.

To be clear, I am using a grid, and the shape is aligned to the grid; but the endpoints of the lines are not (think, for example, of lines connecting points on an ellipse).

1 Like

(I have very little experience with using magnets so please excuse if this is stupid)

Wouldn’t it be possible to use the Layers sidebar, select the rectangle, and delete it? I just tried this and it seemed to work but I don’t know if I am using the magnets correctly.

This is not an issue re Magnets. This is an issue re a Line connected to a Shape (at a Magnet, but again the Magnet is not relevant).

It doesn’t matter how you access the Shape to delete it … there are 7 ways … click-through is the most common, but any way is fine. Once the Shape is deleted, the connected Lines are deleted as well.