Hi Partick - have the script find the To and From points, and create a vector from these points, then usse that to move all the objects. Are you using Python/RhinoscriptSynatax, or? I think there is a rhinoscriptsyntax function that moves multiple objects on one vector simultaneously.
Moves one or more objects
object_ids ([guid, ...]): The identifiers objects to move
translation (vector): list of 3 numbers or Vector3d
list(guid, ...): identifiers of the moved objects if successful
import rhinoscriptsyntax as rs
ids = rs.GetObjects("Select objects to move")
start = rs.GetPoint("Point to move from")
end = rs.GetPoint("Point to move to")
translation = end-start
rs.MoveObjects( ids, translation )
Sorry but I don’t have scripting knowledge and it might be a bit difficult for me to use this rhinoscriptsyntax function. By any chance do you know how I can achieve this operations (move all selected objects to the center) in a simpler way ? Thanks for your help.
Now you should have this command/alias autocomplete: MoveSelectedToCenter
and can add this to button, macro or keyboard shortcut. It should keep your grouping. It is simply using the center of the selection’s bounding box.