谢谢如果这对这里的任何人都有用,你去吧
- (defun c:STAMP (/ *error* opt date ent text)
- (defun *error* (msg)
- (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
- (princ (strcat "\n** Error: " msg " **"))
- )
- (princ)
- )
- (initget 1 "Date Name")
- (setq opt (getkword "\nSpecify stamp [Date/Name]: "))
- (while
- (not
- (and
- (setq ent (car (entsel "\nSelect text to modify: ")))
- (setq ent (entget ent))
- (OR
- (eq "TEXT" (cdr (assoc 0 ent)))
- (eq "MTEXT" (cdr (assoc 0 ent)))
- )
- )
- )
- (prompt "\n**Please select a text to modify!**")
- )
- (if (eq "Date" opt)
- (progn
- (setq date (rtos (getvar "CDATE") 2 0))
- (setq text (strcat (substr date 5 2) "/" (substr date 7 2) "/" (substr date 3 2)))
- )
- (setq text (getvar "CPROFILE"))
- )
- (entmod (subst (cons 1 text)(assoc 1 ent) ent))
- (princ)
- )
很抱歉我只使用单行文字,但决定允许同时使用。。。如果有人真的用这个。 |