Chip Harper
Usenet Archive
- Joined
- Jan 17, 2000
- Messages
- 409
- Reaction score
- 0
On occasion we fill our revision block so we have to scroll the oldest off to insert the newest (ie REVA-REVB-REVC becomes REVB-REVC-REVD).
I'm stuck getting the value of the 2nd attribute tag ....
(defun C:RevUpdate
;;
;; ***Select Revision Block***
;;
(setq RUBLK (car (entsel "\nSelect Revision Block: ")))
;;
;; ***Locate Attribute Tag***
;;
(defun RevReset
(while (/= tag REVAL1)
(setq ENTY (entget RUBLK))
(setq TAG (cdr (assoc 2 ENTY)))
(setq RUBLK (entnext RUBLK))
)
;; <----STUCK HERE,
;; I need the value applied to REVAL2 to use in Update Tags section ;; (while (/= tag REVAL2) (setq ENTY2 (entget RUBLK)) (setq TAG2 (cdr (assoc 1 ENTY2))) (setq RUBLK (entnext RUBLK))
)
;;
;; ***Update Tags***
;;
(setq ENTI (subst (cons 1 TAG2) (assoc 1 ENTY) ENTY))
(entmod ENTI)
(entupd RUBLK)
) ; End RevReset
;;
;; ***Set Line Numbers***
;;
(setq LINE_NUM '(1 2 3 4 5 6))
(foreach REVN LINE_NUM
(progn
(setq REVAL1 (strcat "REV_MARK" (itoa REVN)))
(setq REVAL2 (strcat "REV_MARK" (itoa (+ 1 REVN))))
(RevReset)
) ; End progn
(progn
(setq REVAL1 (strcat "REV_DATE" (itoa REVN)))
(setq REVAL2 (strcat "REV_DATE" (itoa (+ 1 REVN))))
(RevReset)
) ; End progn
(progn
(setq REVAL1 (strcat "REV_TYPE" (itoa REVN)))
(setq REVAL2 (strcat "REV_TYPE" (itoa (+ 1 REVN))))
(RevReset)
) ; End progn
) ; Foreach
) ; Defun
(C:RevUpdate)
I'm stuck getting the value of the 2nd attribute tag ....
(defun C:RevUpdate
;;
;; ***Select Revision Block***
;;
(setq RUBLK (car (entsel "\nSelect Revision Block: ")))
;;
;; ***Locate Attribute Tag***
;;
(defun RevReset
(while (/= tag REVAL1)
(setq ENTY (entget RUBLK))
(setq TAG (cdr (assoc 2 ENTY)))
(setq RUBLK (entnext RUBLK))
)
;; <----STUCK HERE,
;; I need the value applied to REVAL2 to use in Update Tags section ;; (while (/= tag REVAL2) (setq ENTY2 (entget RUBLK)) (setq TAG2 (cdr (assoc 1 ENTY2))) (setq RUBLK (entnext RUBLK))
)
;;
;; ***Update Tags***
;;
(setq ENTI (subst (cons 1 TAG2) (assoc 1 ENTY) ENTY))
(entmod ENTI)
(entupd RUBLK)
) ; End RevReset
;;
;; ***Set Line Numbers***
;;
(setq LINE_NUM '(1 2 3 4 5 6))
(foreach REVN LINE_NUM
(progn
(setq REVAL1 (strcat "REV_MARK" (itoa REVN)))
(setq REVAL2 (strcat "REV_MARK" (itoa (+ 1 REVN))))
(RevReset)
) ; End progn
(progn
(setq REVAL1 (strcat "REV_DATE" (itoa REVN)))
(setq REVAL2 (strcat "REV_DATE" (itoa (+ 1 REVN))))
(RevReset)
) ; End progn
(progn
(setq REVAL1 (strcat "REV_TYPE" (itoa REVN)))
(setq REVAL2 (strcat "REV_TYPE" (itoa (+ 1 REVN))))
(RevReset)
) ; End progn
) ; Foreach
) ; Defun
(C:RevUpdate)