|
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 如直接在线上取点则
'能返回到起点的长度,若在线上量出坐标输入则得不到结果,好象是
'小数点位数问题,如不是交互输入,在程序中如何解决? |
|