ftsg.net
当前位置:首页 >> lisp AssoC >>

lisp AssoC

加循环 (setq el (car (entsel))) (foreach n (entget el) (if (= 10 (car n)) (setq ptlist (cons (cdr n) ptlist)) ) )

AutoLISP语言是在普通的LISP语言基础上,又扩充了许多适用于CAD应用的功能而形成的一种程序设计语言。它是一种解释性求值语言,速度较慢,难以保密,可用任何文字编辑软件编辑,用纯文本的格式保存。例如: (setq i 1);就是代码i值是1 (command ...

(cadr (1 . "52.7"))改成 (cdr (1 . "52.7"))试试。。。。。。。。。

复制下面的脚本到命令行回车即可加载,输入pldd,程序会提示选择pline,选择pline后会打印所有的三维坐标 (defun c:pldd (/ wb cc ss1 aa pts bhbz ent) (setq ent (car (entsel "\n请选择PLINE"))) (setq wb (entget ent) cc nil bhbz (cdr (as...

文字内容代码为1 (defun c:b1() (setq gj_list_32 (entget (car (entsel))) gj_text_old_32 (assoc 1 gj_list_32) gj_text_new_32 (cons 1 "%%1308@200(2)") ;用于8间距200,一级钢 gj_list_32 (subst gj_text_new_32 gj_text_old_32 gj_list_32...

;用搜索的方法就可以 (setq ang (cdr (assoc 50 a));取得文字角度 H (textbox a) ;提取文字对角点 L (caadr H) ;提取文字长度 H (cadadr H) ;提取文字高度 @p1 (polar zb ang L) ;文字右下角点坐标 @p1 (polar @p1 (+ ang (* pi 0.5)) H) ;文字...

(defun c:hk () (setq s (entget (car (entsel"请选择")))) (setq name (assoc 2 s)) (setq layer (assoc 8 s)) (setq la (getvar "clayer")) (setq ss (ssget "x" (list layer name))) (setq n 0 nn 1 ) (setq sl (sslength ss)) (setq zg (cdr...

(princ "\n当前图层的打开与关闭")(defun c:abc() (setq layname (getvar "clayer")) (setq layen (tblobjname "layer" layname)) (setq data (entget layen)) (setq dxf62 (cdr (assoc 62 data))) (if (minusp dxf62) (progn (princ "\n打开当...

;你说的三维多义线是指"POLYLINE"实体吧,3p命令绘制的线 (defun c:test ( / a aa bb cc e eg en et n p p0 ps s x y z) (setq a (ssget '((0 . "polyline")))) (setq aa (dxfcod -1 a)) (foreach p aa (setq e (cdr p)) (setq en (entnext e)) ...

(defun c:dl ( ) (if (null vlax-dump-object) (vl-load-com) ) (princ "\n选择要进行线长统计的对象") (if (setq #si 0 &ss (ssget)) (progn (setq #lc 0 #ll 0 #lp 0 #lr 0 #nc 0 #nl 0 #np 0 #nr 0) (repeat (sslength &ss) (setq &cs (vlax-...

网站首页 | 网站地图
All rights reserved Powered by www.ftsg.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com