autocad二次开发

来源:百度知道 编辑:UC知道 时间:2024/05/12 14:36:22
编起来是什么样子的?
是不是很难的?
能不能给我一个例子?
能把具体的代码写出来吗?谢谢了
(dypsoft前一部分的代码这么没层次感的?是不是LISP就是这样的?我真的连一行LISP也没见过的啊.谢谢了)

我还是喜欢LISP,说过时?呵呵,那你问问天正软体是用什麽开发出来的。其实也挺简单的,举个例子的话,因为我是做建筑设计的,自已写了个Z坐标一次归0的LISP:
(vmon) (defun c:zz (/ wholesel count treatcount chcount ent curent segcurent entlist segentlist etflag dfetflag input ) (command "_.undo" "_begin") (setq old_err *error* *error* zz_err ) (princ " ***********Z坐标值归零程序***********作者 燕鹏动力******" ) (setvar "cmdecho" 0) (setq wholesel (ssget '((-4 . "<OR") (0 . "POINT") (0 . "LINE") (0 . "LWPOLYLINE") (0 . "POLYLINE") (0 . "ARC") (0 . "CIRCLE") (0 . "TEXT") (0 . "INSERT") (-4 . "OR>") ) ) ) (if (null wholesel) (progn (princ "\n未选择到有效实体!") (exit) ) ) (setq count 0) (setq treatcount 0) (setq chcount 0) (princ "\n") (while (< count (sslength wholesel)) (setq curent (ssname wholesel count)) (setq entlist (entget curent)) (setq count (1+ count)) (princ "\r已经完成 ") (princ