You can erase or delete individual objects by using the Delete method.
This example creates a lightweight polyline, then deletes it.
Sub Ch4_DeletePolyline() ' Create the polyline Dim lwpolyObj As AcadLWPolyline Dim vertices(0 To 5) As Double vertices(0) = 2: vertices(1) = 4 vertices(2) = 4: vertices(3) = 2 vertices(4) = 6: vertices(5) = 4 Set lwpolyObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(vertices) ZoomAll ' Erase the polyline lwpolyObj.Delete ThisDrawing.Regen acActiveViewport End Sub