;| Deze routine verandert de electro-tekeningen van vuller 7 & 8 in tekeningen van vuller 5 & 6 Dit door in de tekening de waarde van de opgegeven attributen te veranderen in die van vuller 5 & 6. |; (vl-load-com) (defun c:DoIt () (princ "Running....") (setq temp nil) (setq AttributesToChange '("DESCRIPTION1" "DESCRIPTION2" "DESCRIPTION3" "DRWG.NO." "ISS1" "DATE1" "BY1" "MODIFICATION1" ) ) ;_ end of setq (setq Selection (ssget "X" '((2 . "0HA3TB")))) (if (= Selection nil) (setq Selection (ssget "X" '((2 . "0ha3tb")))) ) ;_ end of if (if (= Selection nil) (setq Selection (ssget "X" '((2 . "0BA3TBA")))) ) ;_ end of if (setq Entity (ssname Selection 0)) (setq EntityData (entget Entity)) (setq VlaEntity (vlax-ename->vla-object Entity)) (if (= (cdr (assoc 66 (entget Entity))) 1) (progn (setq ListOfAttributes (vlax-safearray->list (variant-value (vla-GetAttributes VlaEntity)))) (foreach item3 ListOfAttributes (setq AttributeTag (vla-get-TagString item3)) (if (member AttributeTag AttributesToChange) (progn (setq NewTextString nil) (setq ValueAttribute (vla-get-TextString item3)) (setq RightAttribute (vlax-vla-object->ename item3)) (setq RightAttribute (entget RightAttribute)) (if (= AttributeTag "DESCRIPTION1") (setq NewTextString "KAST B97") ) ;_ end of if (if (= AttributeTag "DESCRIPTION2") (progn (if (= ValueAttribute "FUSTVULSTATION 7") (setq NewTextString "FUSTVULSTATION 5") ) ;_ end of if (if (= ValueAttribute "FUSTVULSTATION 8") (setq NewTextString "FUSTVULSTATION 6") ) ;_ end of if (if (= ValueAttribute "FUSTVULSTATION 7 & 8") (setq NewTextString "FUSTVULSTATION 5 & 6") ) ;_ end of if ) ;_ end of progn ) ;_ end of if (if (= AttributeTag "DRWG.NO.") (setq NewTextString "679689") ) ;_ end of if (if (= AttributeTag "DATE1") (setq NewTextString "05-2004") ) ;_ end of if (if (/= NewTextString nil) (progn (setq RightAttribute (subst (cons 1 NewTextString) (assoc 1 RightAttribute) RightAttribute) ) ;_ end of setq (entmod RightAttribute) ) ;_ end of progn ) ;_ end of if ) ;_ end of progn ) ;_ end of if ) ;_ end of foreach ) ;_ end of progn ) ;_ end of if (command "regen") (princ) ) ;_ end of defun ;|«Visual LISP© Format Options» (100 2 40 2 T "end of " 80 9 0 0 nil T T nil T) ;*** DO NOT add text below the comment! ***|;