请问大家,怎样在VBA中偏移直线?下面一段程序是在AutoCAD R14 中画一条直线,然后偏移之,运行到最后语句显示:”方法Offset作用于对象IAcadLine时失败“,请赐教!谢谢!
Dim LineObj As AcadLine
Dim StartPoint(0 To 2) As Double
Dim EndPoint(0 To 2) As Double
StartPoint(0) = 30: StartPoint(1) = 55
EndPoint(0) = 30: EndPoint(1) = 255
Set LineObj = ThisDrawing.ModelSpace.AddLine(StartPoint, EndPoint)
Dim OffsetObj As Variant
OffsetObj = LineObj.Offset(25)