;;; Modified by Erik Murray 8-13-98 ;;; for the purpose of automating attribute ;;; changes through a script. ;;; Usage: (ChangeAttr "Block Name" "Tag Name" "New Text") ;;;$Header: /VIP/Bonus/Cadtools/gatte.lsp 3 2/13/98 1:01p Kintzlr $ ;;; GATTE.LSP ;;; Copyright (C) 1997 by Autodesk, Inc. ;;; ;;; Permission to use, copy, modify, and distribute this software ;;; for any purpose and without fee is hereby granted, provided ;;; that the above copyright notice appears in all copies and ;;; that both that copyright notice and the limited warranty and ;;; restricted rights notice below appear in all supporting ;;; documentation. ;;; ;;; AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. ;;; AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF ;;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. ;;; DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE ;;; UNINTERRUPTED OR ERROR FREE. ;;; ;;; Use, duplication, or disclosure by the U.S. Government is subject to ;;; restrictions set forth in FAR 52.227-19 (Commercial Computer ;;; Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) ;;; (Rights in Technical Data and Computer Software), as applicable. ;;; ;;; Credits: Source from Compuserve cira 1992 Author unknown ;;; Rewritten Greg Robinson last rev 3/15/97 4:25 PM ;;; ;;; Credits: Bill Kramer, Q.C. ;;; Phil Kreiker Q.C. ;;; Dominic Panholzer, Q.C. ;;; Randy Kintzley, Error Control ;;; Greg Robinson (Defun ChangeAttr (BN TG NA / N ;selection set counter CC ;changed counter ; BN ;block name ; TG ;tag name ESel ;entity pick/name/list EL ;entity list EN ;entity name PASS ;loop pass flag TAGL ;list of valid tags for a block TAGS ;String of valid tags for a block TAGT ;Temp tag list TAG ;tag name in loop TMP ;temporary variable SS1 ;selection set of insert objects XX X ;flag and counter OLDCC ;previous count of changes for update test A ;entity information in change loop FL LA ;frozen layer check variables ) "BONUS_TOOLS_VER_1.2.7" (bns_init_error (List (List "cmdecho" 0) T ;flag. True means use undo for error clean up. ) ;list ) ;init_bonus_error ;; (Setq n 0 cc 0 ) ; (while (null Pass) ; (initget "Block") ; (setq ESel (entsel "\nBlock name/