Page 1 of 1

Undo / Undo Begin / Undo End in VBA

Posted: Fri Jul 27, 2007 3:05 am
by ENSIGN
hi, can the undo commands be called from withing VBA without using the intellicad.runcommand option, I can't seem to find the calls in the Intellicad object

Posted: Fri Jul 27, 2007 5:20 pm
by John Finlay
ENSIGN,

There are no Undo methods in VBA.

I start a count and loop through the count deleting the last entity

Below is an example of what I use:

' Delete the New Entities
For L = 1 To (FinalCount - StartCount)
LastEnt.Delete
Next L

Public Function LastEnt() As Entity
' This provides the Last entity in the drawing ModelSpace
Set LastEnt = IntelliCAD.ActiveDocument.ModelSpace.Item(IntelliCAD.ActiveDocument.ModelSpace.Count)
End Function