document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. (defun reptag (tag newvalue ent / alist )
  2.     (if (and (= (type ent) (read "VLA-OBJECT")) newvalue)
  3.         (progn
  4.             (setq alist ( vlax-invoke ent \'GetAttributes))
  5.             (foreach a alist
  6.                 (if (=  (vla-get-tagstring a) tag)
  7.                     (vlax-put-property a \'TextString newvalue)
  8.                 );end if
  9.             );end foreach
  10.         );end progn
  11.         (if (= \'ename (type ent)) (reptag tag newvalue (vlax-ename->vla-object ent)));end if
  12.     );end if
  13.     (princ)
  14. );end defun
  15.  
  16. (defun c:numerator (/ att_name att_prefix att_postfix i obj)
  17.     (setq att_name (getstring "\\n Введите название аттрибута:")
  18.         att_prefix (getstring "\\n Введите префикс аттрибута:")
  19.         att_postfix (getstring "\\n Введите постфикс аттрибута:")
  20.         i (getint "\\n Введите начальное значение:")
  21.     )  
  22.     (while T
  23.         (setq obj (car (entsel "\\n Выберите блок для нумерования:")))
  24.         (if (not (= obj nil))
  25.             (progn 
  26.                 (reptag att_name (strcat att_prefix (itoa i) att_postfix) obj)
  27.                 (setq i (+ i 1))
  28.             );end progn
  29.         ); end if
  30.     );end while
  31. ); end defun
');