This might get you going
John
Sub Example_AppendItems()
' Create the new group
Dim groupObj As AcadGroup
Dim appendObjs() As AcadEntity
Set groupObj = ThisDrawing.Groups.Add("TEST_GROUP")
Dim DRWPOLY1 As AcadLWPolyline
Dim I As Integer
I = 0
Dim approachpoints1(0 To 7) As Double
approachpoints1(0) = 0: approachpoints1(1) = 0:
approachpoints1(2) = 10: approachpoints1(3) = 0:
approachpoints1(4) = 10: approachpoints1(5) = 145:
approachpoints1(6) = 0: approachpoints1(7) = 145:
Set DRWPOLY1 =
ThisDrawing.ModelSpace.AddLightWeightPolyline(approachpoints1)
DRWPOLY1.Closed = True
ReDim Preserve appendObjs(I)
Set appendObjs(I) = DRWPOLY1
I = I + 1
Dim DRWPOLY2 As AcadLWPolyline
Dim approachpoints2(0 To 7) As Double
approachpoints2(0) = 20: approachpoints2(1) = 0:
approachpoints2(2) = 30: approachpoints2(3) = 0:
approachpoints2(4) = 30: approachpoints2(5) = 145:
approachpoints2(6) = 20: approachpoints2(7) = 145:
Set DRWPOLY2 =
ThisDrawing.ModelSpace.AddLightWeightPolyline(approachpoints2)
DRWPOLY2.Closed = True
ReDim Preserve appendObjs(I)
Set appendObjs(I) = DRWPOLY2
' Add the array of objects to the group
groupObj.AppendItems appendObjs ' THIS COMBINES THE ITEMS INTO THE GROUP.
MsgBox "Group " & Chr(34) & "TEST_GROUP" & Chr(34) & " contain" & vbCr & _
groupObj.Count & " objects"
End Sub
wrote in message news:5868061@discussion.autodesk.com...
I am looking for a way to select objects made after a certain point in the
middle of the sub and out them all in a group. Anyone have any suggestions?