- 积分
- 460
- 明经币
- 个
- 注册时间
- 2007-4-12
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2011-11-13 17:28:02
|
显示全部楼层
'自定义函数 返回顺着曲线长度方向任一点的距离
Public Function GetDistanceAtPoint(ByVal mvarEntity As AcadEntity, ByVal Point As Object) As Double
Dim objVLAX As New vlax, retval As Object
objVLAX.SetLispSymbol("d", Point)
objVLAX.EvalLispExpression("(setq ent (handent " & Chr(34) & mvarEntity.Handle & Chr(34) & "))")
objVLAX.EvalLispExpression("(setq pt (vlax-curve-getDistAtPoint ent d))")
retval = objVLAX.GetLispList("pt")
objVLAX.NullifySymbol("ent", "d", "pt")
MsgBox(retval)
GetDistanceAtPoint = retval
objVLAX = Nothing
End Function
返回结果为空值 |
|