Option Explicit Dim xOrigin Dim yOrigin Dim zOrigin xOrigin = 0 yOrigin = 0 zOrigin = 0 Dim gxLayer Dim gxURec Dim gxPlayList Dim gxSelList On Error Resume Next Set gxPlayList = ActiveDrawing.GraphicSets("PlayList") if (Err.Number <> 0) then Set gxPlayList = ActiveDrawing.GraphicSets.Add("PlayList", false) else gxPlayList.Clear End If On Error GoTo 0 On Error Resume Next Set gxSelList = ActiveDrawing.GraphicSets("SelectionList") if (Err.Number <> 0) then Set gxSelList = ActiveDrawing.GraphicSets.Add("SelectionList", false) else gxSelList.Clear End If On Error GoTo 0 Set gxURec = ActiveDrawing.AddUndoRecord("Script Play Modify") Dim gxChild Dim gxBBox Set gxBBox = Selection.CalcBoundingBox() On Error Resume Next Dim i i = 0 For Each gxChild in Selection i = i + 1 gxURec.AddGraphicForModify gxChild gxChild.Properties("Info") = i Next gxBBox.Union Selection.CalcBoundingBox ActiveDrawing.Views.InvalidateObject gxBBox Selection.Select On Error GoTo 0 gxURec.Close gxPlayList.Delete Set gxPlayList = Nothing gxSelList.Delete Set gxSelList = Nothing