通过ActiveX构造LWPolyline
Constructing vlisp lwpolyline via ActiveXIssue
Is the method of passing a list of points from ActiveX to addLWPolyline in
AutoCAD 2000 that same way as in AutoCAD R14 using Visual LISP?
The following error occurs when passing a list:
Error: lisp value has no coercion to VARIANT with this type:
(17509.1 11009.0 17484.1 11009.0 17484.1 11109.0 17509.1 11109.0)
Solution
The passing of lists to ActiveX methods has changed in AutoCAD 2000. You need to
use the vlax-make-safearray, vlax-safearray-fill, vlax-make-variant functions to
pass a list to ActiveX functions. The following code does this:
**** Hidden Message *****
只有一个字:顶顶顶顶 很好,每天都能学到很多
这个方法会不会比entmake复杂呢? 也写个修改的呗... q3_2006 发表于 2014-12-21 13:15
也写个修改的呗...
put. coordinates 每日一码多xue
想要回复啥呢?
用这种方法,好象其中有弧的也不好处理{:soso_e132:} 回复学习一下! Autodesk 建议用 vla- 方式,参数用 variant ,安全类型,但是直至现在还保留的vlax-get vlax-put vlax-invoke 三个函数部分情况下可以直接使用或返回 Lisp 数据,
如 (vlax-invoke modelspace 'AddLine pt1 pt2)
(vlax-invoke ms 'AddLightWeightPolyline 2dpts)
**** Hidden Message ***** 看看这个内容 很好,每天都能学到很多 看看这个内容
学习,学习
页:
[1]
2