潇湘夜雨 发表于 2003-8-31 20:38:00

请教各位大侠,VBA中怎样偏移直线?

请问大家,怎样在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)

mccad 发表于 2003-8-31 21:36:00

晕,R14的BUG也太多了,OFFSET方法,除了Line对象外,其它都可以做。

myfreemind 发表于 2003-8-31 22:20:00

编程申请中有原代码关于偏移直线的,去看看!

潇湘夜雨 发表于 2003-9-1 12:47:00

多谢指点!!
页: [1]
查看完整版本: 请教各位大侠,VBA中怎样偏移直线?