你常用的lisp程序供献一下,我先发一个chtext.lsp.
你常用的lisp程序供献一下,我先发一个chtext.lsp.
2楼
bu cuo,xiexie
回复
3楼
干什么用的
回复
4楼
郁闷呀。怎么都是只发程序不教使用!!!!!
回复
5楼
加载后怎么用啊?不好意思,我是新手。
回复
6楼
都是菜鸟啊 不会开发用CAD就难了 只有开发过 CAD才好用 开发需要学会LISP编程 想学可以找我
回复
7楼
敢问楼主那里有这个语言可以下的呀。我也想学习学习呀!!!
回复
8楼
;;---图层函数定义------------------------
(defun gpslayer (/ ss n index entity la old)
(setq ss (ssget))
(setq n (sslength ss))
(setq index (- n 1))
(repeat n
(setq entity (ssname ss index)) ;物体名称
(setq la (cdr (assoc 8 (entget entity)))) ;图层名称
(if (= old nil)(setq old la)(setq old (strcat old "," la)))
(setq index (1- index))
) ;end repeat
old
)
;****************************************************显示+解锁+解冻全部层
(defun c:gps_showall ()
(command "layer" "on" "*" "")
(command "layer" "thaw" "*" "")
(command "layer" "u" "*" "")
(princ))
;;;[全部显示]
(defun c:gps_layonall ()
(command "layer" "on" "*" "")
(princ))
;;;[全部解锁]
(defun c:gps_unlock ()
(command "layer" "u" "*" "")
(princ))
;;;[全部解冻]
(defun c:gps_unthaw ()
(command "layer" "thaw" "*" "")
(princ)
)
;***[图层关闭]layoff
(defun c:gps_layoff (/ ss ct len cl la )
(setvar "cmdecho" 0)
(prompt"\n请选择要关闭的图层上的对象")
(setq ss (ssget))
(if (and ss (sslength ss) 0)
(progn
(setq ct 0 len (sslength ss) cl (getvar "clayer"))
(command ".Layer")
(while (< ct len)
(setq la (cdr (assoc 8 (entget (ssname ss ct)))))
(if (/= cl la)(command "off" la) (command "off" la "y"));end of if
;;(if (= old nil)(setq old la)(setq old (strcat old "," la))) ;;old关闭图层列表
(setq ct (1+ ct))
);end of while
(command"")
);end of progn
);end of if
(princ)
)
;***[图层锁定]LAYLCK
(defun c:gps_laylck (/ gpslay )
(setvar "cmdecho" 0)
(prompt"\n请选择要锁定的图层上的对象")
(setq gpslay (gpslayer))
(command ".Layer" "Lo" gpslay "" )
(princ)
)
;***[图层解锁]ulck
(defun c:gps_layulck (/ gpslay )
(setvar "cmdecho" 0)
(prompt"\n请选择要解锁的图层上的对象")
(setq gpslay (gpslayer))
(command ".Layer" "U" gpslay "" )
(princ)
)
;***[图层冻结]
(defun c:gps_laythaw (/ gpslay )
(setvar "cmdecho" 0)
(prompt"\n请选择要冻结的图层上的对象")
(setq gpslay (gpslayer))
(command ".Layer" "F" gpslay "" )
(princ)
)
;***将所选对象的层变为当前层
(defun c:gps_laycur( / e n gpslay)
(setvar "cmdecho" 0)
(setq e (car (entsel "请选择对象,该对象所在层将变为当前层:")))
(if e (progn
(setq e (entget e))
(setq n (cdr (assoc 8 e)))
(command"layer" "set" n "")
);end progn
);end if
(princ)
)
;;[隔离图层]layiso
;;[解除隔离]layuniso
;;[未选锁定]
(defun c:gps_layunsloc( / e n gpslay)
(setvar "cmdecho" 0)
(prompt"\n请选择要解冻的图层上的对象")
(setq gpslay (gpslayer))
(command ".Layer" "lo" "*" "u" gpslay "" )
(princ)
)
回复
9楼
感謝你無私分享,謝謝你!
回复
10楼
kan bu dong
回复
11楼
搞什么的
回复