查找任何“伪造”尺寸,并自动将其更改为一个名为fudged-DIMS的图层。
- ;;;
- ;;; FUDGE.LSP Version 1.0
- ;;;
- ;;; Copyright (C) 1996 by Jay Garnett
- ;;;
- ;;; 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
- ;;; below appear in all supporting documentation.
- ;;;
- ;;; JAY GARNETT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
- ;;; JAY GARNETT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
- ;;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. JAY GARNETT
- ;;; DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
- ;;; UNINTERRUPTED OR ERROR FREE.
- ;;;
- ;;; DESCRIPTION
- ;;; Finds any "fudged" dimensions and automatically changes them to a layer called FUDGED-DIMS.
- ;;;
- ;;; By Jay Garnett
- ;;; Bolingbrook, IL
- ;;;
- ;;; E-Mail jgarnett@enteract.com
- ;;;
- (defun c:FUDGE(/ DIM-TXT E1 FUDGED IDX SS)
- (setq SS(ssget "x" '((0 . "DIMENSION")))
- IDX 0
- )
- (while (< IDX (sslength SS))
- (setq E1(entget( ssname ss IDX )))
- (setq DIM-TXT(cdr(assoc 1 E1)))
- (if (and(not(wcmatch DIM-TXT "*<>*"))(/= DIM-TXT ""))
- (if (not FUDGED)
- (setq FUDGED(ssadd (ssname SS IDX)))
- (setq FUDGED(ssadd (ssname SS IDX) FUDGED))
- )
- );end if
- (setq IDX (1+ IDX))
- );end while
- (if FUDGED
- (progn
- (if (not(tblsearch "layer" "FUDGED-DIMS"))
- (command ".layer" "M" "fudged-dims" "c" "magenta" "" "")
- );end if
- (command ".change" FUDGED "" "p" "la" "fudged-dims" "")
- (alert (strcat (itoa(sslength FUDGED)) " fudged dimensions changed \nto Layer FUDGED-DIMS"))
- );end progn
- (alert "No fudged dimensions found in this drawing")
- );endif
- );end defun
|