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
Parameters:
object_ids ([guid, ...]): The identifiers objects to move
translation (vector): list of 3 numbers or Vector3d
Returns:
list(guid, ...): identifiers of the moved objects if successful
Example:
import rhinoscriptsyntax as rs
ids = rs.GetObjects("Select objects to move")
if ids:
start = rs.GetPoint("Point to move from")
if start:
end = rs.GetPoint("Point to move to")
if end:
translation = end-start
rs.MoveObjects( ids, translation )
See Also:
MoveObject
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.