All,
Good morning. I posted this request here also.
https://www.cadtutor.net/forum/topic/67950-customized-dimension-style/I am trying to find a lisp that I can modify to set my dimension style without manually doing it. This is what I have but gives me an error, misplaced dot on input. If someone can help me, it would be greatly appreciated. I might add some more SETVAR's after it works.
Thank you,
David
( (lambda ( / _dimstyle-setup )
(defun _dimstyle-setup ( / )
(mapcar 'eval
'(
(SETVAR "DIMADEC" 0) (SETVAR "DIMALT" 0) (SETVAR "DIMALTD" 2) (SETVAR "DIMASZ" 0.1875)
(SETVAR "DIMALTF" 25.4) (SETVAR "DIMALTRND" 0.0) (SETVAR "DIMALTTD" 2) (SETVAR "DIMCLRD" 1)
(SETVAR "DIMTXSTY" ROMANS) (SETVAR "DIMGAP" 0.09375) (SETVAR "DIMELTEX1" BYBLOCK)
(SETVAR "DIMLWD" BYLAYER) (SETVAR "DIMEXE" .06250) (SETVAR "DMLUNIT" ARCHITECTURAL)
(SETVAR "DIMCLRT" 2) (SETVAR "DIMTXSTY" ROMANS) (SETVAR "DIMDEC" .06250)
(SETVAR "DIMJUST" CENTERED) (SETVAR "DIMTAD" ABOVE) (SETVAR "DIMTOH" ON)
;
; ...<snip> All your variables.
;
(SETVAR "DIMTXT" 0.09375) (SETVAR "DIMTZIN" 0) (SETVAR "DIMUPT" 0)
(SETVAR "DIMZIN")
)
)
)
(if (tblsearch "DIMSTYLE" "<STANDARD1>")
(progn
;; if the dimstyle exists
;; make sure its setup properly
(_dimstyle-setup)
;; set it current
(command "-dimstyle" "r" "<STANDARD1>")
)
(progn
;; otherwise
;; set it up properly
(_dimstyle-setup)
;; save it.
(command "-dimstyle" "s" "<STANDARD1>")
)
)
)
)