;; Created by Mark Douglas (dynamicinterface@hotmail.com), In the Dynamic Interface all rights reserved. ;; Visit In the Dynamic Interface on the web at: http://mdouglas.blogs.com/in_the_dynamic_interface/ ;; Date: 9/21/06 ;; Version 1.0 - Works with AutoCAD 2006 & 2007 ;; Cendim is a program that quickly applys centerline linetypes to linear dimension lines. (defun c:cendim (/ diment censtyle censtylelinetype LT centerlinename) (setq diment (entsel "\nSelect Linear Dimension to Change to Center Line Display:" ) ) (setq censtyle "B") (setq censtyle (strcase (getstring "\noth Extension Lines or eft/ight or lear: "))) (if (= censtyle "C") (progn (setvar "dimltex1" "ByBlock") (setvar "dimltex2" "ByBlock") (command "-dimstyle" "A" diment "") )) (if (/= censtyle "C" ) (progn (if (eval LT) (setq LT LT) (setq LT "3") ) (setq censtylelinetype 3) (setq censtylelinetype (getstring (strcat "\nWhich Center Line Type (1, 2, 3 or 4) <" LT ">: " ) ) ) (if (= censtylelinetype "") (setq censtylelinetype "3")) (setq centerlinename (strcat "Center" censtylelinetype)) (if (= censtyle "B") (progn (setvar "dimltex1" centerlinename) (setvar "dimltex2" centerlinename) (command "-dimstyle" "A" diment "") )) (if (= censtyle "") (progn (setvar "dimltex1" centerlinename) (setvar "dimltex2" centerlinename) (command "-dimstyle" "A" diment "") )) (if (= censtyle "L") (progn (setvar "dimltex1" centerlinename) (command "-dimstyle" "A" diment "") (command "-dimstyle" "A" diment "") )) (if (= censtyle "R") (progn (setvar "dimltex2" centerlinename) (command "-dimstyle" "A" diment "") (command "-dimstyle" "A" diment "") )) (setvar "dimltex1" "ByBlock") (setvar "dimltex2" "ByBlock"))) (princ) )