|
发表于 2006-4-6 10:29:00
|
显示全部楼层
[语法]
GetCurvePointAtDist(curve, dist)
[说明]
返回曲线上距曲线起点的指定距离的点
[函数内容]
Public Function GetCurvePointAtDist(curve As AcadEntity, dist
As Double) As Variant
Dim objVLAX As VLAX, retval(2) As Double
Dim tmp, i As Integer
Set objVLAX = New VLAX
objVLAX.EvalLispExpression "(setq curve
(vlax-ename->vla-object (handent " & Chr(34) & _
curve.Handle & Chr(34) & ")))"
objVLAX.SetLispSymbol "dist", dist
tmp = objVLAX.EvalLispExpression("(null (setq pt
(vlax-curve-getPointAtDist curve dist)))")
If IsEmpty(tmp) Then
tmp = objVLAX.GetLispList("pt")
For i = 0 To 2
retval(i) = tmp(i)
Next
End If
objVLAX.NullifySymbol "curve", "dist", "pt"
GetCurvePointAtDist = retval
End Function
[参数]
一个曲线图元和一个代表测量距离的双精度数。
[注意]
如果未找到点,则返回的值为空(Empty)。
这是我在网上找到的一个程序,把曲线起点改成任意一点应该可以了吧,版主帮忙看一下,谢谢
|
|