Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun reptag (tag newvalue ent / alist )
- (if (and (= (type ent) (read "VLA-OBJECT")) newvalue)
- (progn
- (setq alist ( vlax-invoke ent 'GetAttributes))
- (foreach a alist
- (if (= (vla-get-tagstring a) tag)
- (vlax-put-property a 'TextString newvalue)
- );end if
- );end foreach
- );end progn
- (if (= 'ename (type ent)) (reptag tag newvalue (vlax-ename->vla-object ent)));end if
- );end if
- (princ)
- );end defun
- (defun c:numerator (/ att_name att_prefix att_postfix i obj)
- (setq att_name (getstring "\n Введите название аттрибута:")
- att_prefix (getstring "\n Введите префикс аттрибута:")
- att_postfix (getstring "\n Введите постфикс аттрибута:")
- i (getint "\n Введите начальное значение:")
- )
- (while T
- (setq obj (car (entsel "\n Выберите блок для нумерования:")))
- (if (not (= obj nil))
- (progn
- (reptag att_name (strcat att_prefix (itoa i) att_postfix) obj)
- (setq i (+ i 1))
- );end progn
- ); end if
- );end while
- ); end defun
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement