ahfoon 发表于 2010-8-13 20:51:00

看起来是很神奇的

qingtao210 发表于 2010-8-15 23:55:00

好牛啊,看来路还长

Gu_xl 发表于 2010-8-17 11:07:00

hpy发表于2010-8-9 13:23:00static/image/common/back.gif如果能支持高版本的CAD就更好了。


<p>测试了2008版本,可以正常运行!</p>

kkt123 发表于 2010-8-23 07:29:00

<p>只能纯欣赏了!</p>
<p>感谢楼主分享!</p>

yfywk 发表于 2010-9-5 17:35:00

<p>试着运行了依稀,生成的代码如下,但就是不知道怎样使用?</p>
<p><font face="Verdana">(defun MakeBlock-jt (/ obj obj1 obj2 objHatch HatchobjAray )<br/>&nbsp;&nbsp; (setvar "clayer" "0")<br/>&nbsp;&nbsp; (setq obj (GXL-AX:ADDBLOCK '(0 0 0) "jt"))<br/>&nbsp;&nbsp; (setq obj1 (GXL-AX:ADDLINE obj '(-1.0 0.0 0.0) '(1.0 0.0 0.0)))<br/>&nbsp;&nbsp; (vla-put-color (vla-item (vla-get-Layers *ACDOCUMENT*) "0") "7")<br/>&nbsp;&nbsp; (vla-put-color obj1 "256")<br/>&nbsp;&nbsp; (setq axErr (VL-CATCH-ALL-APPLY 'vla-load (list (vla-get-Linetypes *ACDOCUMENT*) "ByLayer" "acadiso.lin")))<br/>&nbsp;&nbsp; (if (VL-CATCH-ALL-ERROR-P axErr) (setq axErr (VL-CATCH-ALL-APPLY 'vla-load (list (vla-get-Linetypes *ACDOCUMENT*) "ByLayer" "EstateCADTools.lin"))))<br/>&nbsp;&nbsp; (if (not (VL-CATCH-ALL-ERROR-P axErr)) (vla-put-linetype obj1 "ByLayer"))<br/>&nbsp;&nbsp;&nbsp; (vla-put-LinetypeScale obj1 1)<br/>&nbsp;&nbsp; (setq obj1 (vla-AddLightWeightPolyline obj (vlax-make-variant (vlax-safearray-fill (vlax-make-safearray vlax-vbdouble (cons 1 4))'(-0.459619 -0.459619 0.459619 0.459619)))))<br/>&nbsp;&nbsp; (vla-put-color (vla-item (vla-get-Layers *ACDOCUMENT*) "0") "7")<br/>&nbsp;&nbsp; (vla-put-color obj1 "256")<br/>&nbsp;&nbsp; (vla-put-ConstantWidth obj1 0.45)<br/>&nbsp;&nbsp; (setq axErr (VL-CATCH-ALL-APPLY 'vla-load (list (vla-get-Linetypes *ACDOCUMENT*) "ByLayer" "acadiso.lin")))<br/>&nbsp;&nbsp; (if (VL-CATCH-ALL-ERROR-P axErr) (setq axErr (VL-CATCH-ALL-APPLY 'vla-load (list (vla-get-Linetypes *ACDOCUMENT*) "ByLayer" "EstateCADTools.lin"))))<br/>&nbsp;&nbsp; (if (not (VL-CATCH-ALL-ERROR-P axErr)) (vla-put-linetype obj1 "ByLayer"))<br/>&nbsp;&nbsp; (vla-put-LinetypeScale obj1 1)<br/>&nbsp; )<br/></font></p>

Gu_xl 发表于 2010-9-8 13:45:00

yfywk发表于2010-9-5 17:35:00static/image/common/back.gif试着运行了依稀,生成的代码如下,但就是不知道怎样使用?
(defun MakeBlock-jt (/ obj obj1 obj2 objHatch HatchobjAray )&nbsp;&nbsp; ...


<p>请仔细阅读一楼的帖子!</p>

kaka8008 发表于 2010-9-16 17:07:00

<p>这个工具很强大啊!</p>

jialiang168 发表于 2010-9-22 08:54:00

可惜不是源码只能欣赏了。盼楼主分享源码。或转繁体谢谢!

Gu_xl 发表于 2010-9-29 12:11:00

本帖最后由 Gu_xl 于 2012-3-16 20:00 编辑

应大家的要求,现将源码公布如下,供大家共同交流:
**** Hidden Message *****代码中涉及到一些自定义公用函数,需要前贴中附件打包的函数支持!

578749467 发表于 2010-10-13 18:09:00

看起来是很神奇的
页: 1 [2] 3 4 5 6 7 8 9 10 11
查看完整版本: 【Gu_xl】[原创]实用工具:Block 自动转为Lisp源代码