Copy method example
Sub Copy_and_Rotate_Example()
Dim myLine As AcadLine
Dim myStartPt(0 To 2) As Double
Dim myEndPt(0 To 2) As Double
myStartPt(0) = 4: myStartPt(1) = 4: myStartPt(2) = 0
myEndPt(0) = 7: myEndPt(1) = 3: myEndPt(2) = 0
Set myLine = ThisDrawing.ModelSpace.AddLine(myStartPt, myEndPt)
myLine.Update
Dim copyMyLine As AcadLine
Set copyMyLine = myLine.Copy()
copyMyLine.Rotate myStartPt, 10
MsgBox "Rotated the copied line 10 radians."
ThisDrawing.Application.ZoomExtents
End Sub
© Bricsys NV. All rights reserved. |