本帖最后由 作者 于 2009-2-23 19:51:13 编辑
贴个返回曲线上定距离点坐标的函数吧. Public Function GetcurvePoint_at_dist1(ByVal dist As Double, curve As AcadEntity) As Variant Dim obj As VLAX, retVal Set obj = New VLAX obj.EvalLispExpression "(setq curve (handent " & Chr(34) & curve.Handle & Chr(34) & "))"
obj.EvalLispExpression "(setq cpnt (vlax-curve-getPointAtDist curve " & dist & "))" retVal = obj.GetLispList("cpnt") '释放内存,函数返回 Set obj = Nothing GetcurvePoint_at_dist1 = retVal End Function |