fjwok1 发表于 2002-11-21 15:43:00

大家看看

Public Sub try()

Dim pickObj As AcadEntity
Dim pickPnt As Variant
Dim length As Variant
Dim B As Variant
Dim c As Variant
Dim point(0 To 2) As Variant
'Dim poin As Variant

Dim PROMPT1 As String
PROMPT1 = vbCrLf & "Enter the point of : "
'point = ThisDrawing.Utility.GetPoint(, PROMPT1)
ThisDrawing.Utility.GetEntity pickObj, pickPnt, "choose curve"
point(0) = 225.4166
point(1) = 117.943
point(2) = 0
length = GetCurveLength(pickObj)
MsgBox length
B = GetCurvePointAtDist(pickObj, 10#)
MsgBox B(0)
c = GetCurveDistAtPoint(pickObj, point)
MsgBox c
End Sub

'VLAX 中vlax-curve-getDistAtPoint 如直接在线上取点则
'能返回到起点的长度,若在线上量出坐标输入则得不到结果,好象是
'小数点位数问题,如不是交互输入,在程序中如何解决?
页: [1]
查看完整版本: 大家看看