Bulk snap lines to objects

I have a diagram with many objects and lines. It’s easy to generate the objects by a set of bulk-select/copy/paste/move operations. And same with the lines.

Now, I just want a way to “snap all of the endpoints of all of the selected lines to the nearest magnet” (or vice versa).

After that, I’d be willing to either (a) manually tweak the couple of lines that snapped to the wrong magnet, or (b) undo, bulk-move objects or lines, and try again. I could improve the odds by first snapping everything to the grid.

I don’t see a way to do this (using OG 6*). Maybe I’m missing something?

My answers are for OG V5.4 … but it should be the same in later releases (otherwise the later releases of OG are totally broken).


Select-many/Copy/Paste works just fine. All Lines remain connected to whatever Magnets they were connected to.

If you are doing that in two steps

  • Select-Objects/Copy/Paste,
  • then Select-Lines/Copy/Paste),

well that is wrong. First you are copying the Objects minus their connected Lines, and then you are copying the Lines minus the connected Objects.

Do it in one step. Select the Objects and their connected Lines together, then Copy, then Paste. The Lines will be connected to whatever Magnets they were connected to in the source set.

  • (We definitely positively absolutely do not want “nearest Magnet”, we want the Magnet selected in the source set to remain connected.)

Caveat • Bug

There is a bug, that when you copy such a set (Objects plus connected Lines together) to a different Canvas, which means a single target Layer, the connections are lost. This is visible in that the Lines are completely wrong, they are positioned correctly but they look independent of the Objects they are connected to. This is easily fixed (yes fixed, because it is an error) with a manual step:

  • move the Objects-and-Lines (still Selected, from the Paste operation) one GridUnit left (or right or up or down),
  • and then back again.

The lines correct themselves as a result of this simple fix-up operation.

I usually have my Lines on a Layer that is separate to the Objects. If so, Select and move the Lines to the correct target Layer after the above operation.