Last active
April 29, 2016 10:24
-
-
Save engalar/520eba3a4fea13a4a215beec20c34e21 to your computer and use it in GitHub Desktop.
autocad lisp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun c:lsp () | |
(prompt "\n load lisp app and call xdd ...") | |
;;; (setq lspname (getstring "\nENTER LSP FILENAME:> ")) | |
(load "C:\\Users\\atv023\\Desktop\\tmp.lsp") | |
(prompt "\n load success ...") | |
(prompt "\n call .XDD ...") | |
(c:xdd) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun C:XDD () | |
(prompt "\n 对当前选择的对象做处理\n") | |
(SETQ mmm 1) | |
(if (setq ss (ssget "_:L" '((0 . "TEXT,MTEXT")))) | |
(while (setq sset (ssname ss 0)) | |
(setq | |
lst (vl-string->list (cdr (assoc 1 (setq e (entget sset))))) | |
) | |
(entmod (subst (cons 1 (vl-list->string (reverse lst))) | |
(assoc 1 e) | |
e | |
) | |
) | |
(entmod (subst (cons 1 (STRCAT "PIN1-" (ITOA (- 51 mmm)))) | |
(assoc 1 e) | |
e | |
) | |
) | |
;;; (prompt (cons 1 (vl-list->string (reverse lst)))) | |
;;; | |
;;; (prompt (STRCAT "PIN1-" (itoa i))) | |
;;; | |
;;; (entmod (subst (cons 1 (STRCAT "PIN1-" (itoa i))) | |
;;; (assoc 1 e) | |
;;; e | |
;;; ) | |
;;; ) | |
(setq mmm (+ mmm 1)) | |
(prompt "\n test lwg") | |
(prompt (itoa mmm)) | |
(ssdel sset ss) | |
) | |
(princ) | |
) | |
(prompt "\n cmd end!4") | |
(princ) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment