StartUndoMark Example

Using Programming Languages other than VBA

Sub Example_StartUndoMark()
	' This example creates a series of lines, each with an undo marker
	' defined for it. After lines are created, you can switch to AutoCAD and type
	' the Undo command, and only one line at a time will be undone. If StartUndoMark
	' call is not made, an undo in AutoCAD will undo all the lines at once.

	Dim line As AcadLine
	Dim stPnt(0 To 2) As Double
	Dim endPnt(0 To 2) As Double
	stPnt(0) = 1: stPnt(1) = 2: stPnt(2) = 0
	endPnt(0) = 2: stPnt(1) = 1: stPnt(2) = 0

	' Create the lines
	Dim j As Integer
	For j = 0 To 3
		ThisDrawing.StartUndoMark
		Set line = ThisDrawing.ModelSpace.AddLine(stPnt, endPnt)
		stPnt(0) = stPnt(0) + 3
		endPnt(0) = endPnt(0) + 3
		ThisDrawing.EndUndoMark
	Next
	ZoomAll

End Sub

 

   Comments? 
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@entercad.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.