;;; ========================================================================== ;;; File : LEADFIX.LSP ;;; Copyright: cad nauseam, 1998. ;;; Author : Steve Johnson ;;; Purpose : Fixes up recalcitrant leaders which DDIM refuses to change ;;; from user arrowheads to standard closed filled arrowheads. ;;; Version : 1.0 ;;; Date : 18 November 1998 ;;; Requires : AutoCAD Release 13 or later, designed to work around R13 and ;;; R14 bug: DDIM does not allow for the DIMBLK variable. ;;; Usage : Load this file (eg. using APPLOAD). ;;; Enter the LEADFIX command. ;;; Enter name of parent dimension style of problem leaders. ;;; All leaders of that dimension style, or the child dimension ;;; style for leaders, will be converted to use a child dimension ;;; style which has the correct variable settings for standard ;;; closed filled arrowheads. ;;; ========================================================================== ;; --------------------------------------------------------------------------- ;; Function: C:LEADFIX ;; Purpose : Main command-line function ;; --------------------------------------------------------------------------- (defun C:LEADFIX (/ style style$7 ss) (setq style (getstring "\nParent dimension style name: ") style$7 (strcat style "$7") ss (ssget "_X" (list (cons 0 "LEADER") (cons 3 (strcat style "," style$7))) ) ) (if ss (progn (setvar "CMDECHO" 0) (command "_.UNDO" "_Group" "_.DIMSTYLE" "_Restore") (if (tblsearch "DIMSTYLE" style$7) (command style$7) (command style) ) (setvar "DIMBLK" ".") (setvar "DIMBLK1" ".") (setvar "DIMSAH" 0) (command "_.DIMSTYLE" "_Save" style$7) (if (= 1 (logand 1 (getvar "CMDACTIVE"))) (command "_Y")) (command "_.DIMSTYLE" "_Apply" ss "" "_.UNDO" "_End") ) (princ "\nNo leaders of that style in this drawing.") ) (princ) ) ; End C:LEADFIX ;;; ========================================================================== ;;; End file LEADFIX.LSP ;;; ==========================================================================