;;;Auto invoke DDATTE, DDEDIT or DIM NEW based upon filtered selection. ;;; Routine will only select MTEXT, TEXT, ATTRIB, DIMENSION or ;;; INSERT w/attrib. It will report the type of entity selected ;;; select again. ;;; ;;; It was initially intended to be a command, hence the function name ;;; C:.... Note that the variable pstr is required, e.g. (c:ded pstr). ;;; pstr is simply the prompt string. It is set in redefinition ;;; of the commands that are affected in order to give the expected ;;; prompts. Invoke this routine from the redefined ddedit and ddatte. ;;; ;;; ;;; ;;; Changed selection window to set after each entsel pick. ;;; Fixes unexpected selections following transparent zooms. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 10-3-95 ;;;> EDITED: 06-29-2004 ;;; (command "undefine" "ddedit") (command "undefine" "ddatte") ;================================================================================================== (defun c:ddedit (/ pstr) (setq pstr "\n: "))) (setq scrnsz (getvar"screensize") viewsz (getvar"viewsize") pboxsz (*(/(* dimsc(/(cadr scrnsz)100))viewsz)1.5(getvar"pickbox")) tspt1 (polar tspt(* 1.25 pi)pboxsz) tspt2 (polar tspt(* 0.25 pi)pboxsz) ) (COMMAND "RECTANG" TSPT1 TSPT2) (setq tss (ssget "C" tspt1 tspt2 '((-4 . "") (-4 . "OR>"))) );setq ; (setq ent (entsel pstr)) (if tss (progn (setq ent (ssname tss 0)) (if (or (eq "TEXT" (cdr(assoc 0 (entget ent)))) (eq "MTEXT" (cdr(assoc 0 (entget ent)))) (eq "ATTDEF" (cdr(assoc 0 (entget ent)))) ) (progn (prompt (strcat "\n" (cdr(assoc 0 (entget ent))) " selected ")) (prompt "\n