Hello to all the members of this forum, I have a routine to add +-2 tolerance to my dimensions. The routine works fine, as it accomplishes its purpose, which is to add the tolerance of +-2, which are set with the variables "DimTm" 2 & "DimTp" 2 respectively.
;Lisp routine to add a +-2.0 tolerance on dimensions.
(defun c:T2 (/ IR_SDTo IR_SDTm IR_SDTp IR_DObj)
(setq IR_SDTo (getvar "DimTol"))
(setq IR_SDTm (getvar "DimTm"))
(setq IR_SDTp (getvar "DimTp"))
(setvar "DimTol" 1)
(setvar "DimTm" 2)
(setvar "DimTp" 2)
(princ "nSelect Dimension to add Tolerance to: ")
(setq IR_DObj (ssget '((0 . "DIMENSION"))))
(if IR_DObj
(command "._-DimStyle" "_A" IR_DObj "")
)
(setvar "DimTol" IR_SDTo)
(setvar "DimTm" IR_SDTm)
(setvar "DimTp" IR_SDTp)
(princ)
)
What I can't solve is that they acquire the same dim style that they already had.
when applying the routine, the dimensions acquire the dim style that I currently have and apply it to all dimensions.
I would like to achieve this purpose, by selecting multiple dimensions and their dim style not being affected by the current dim style.
Any help is greatly appreciated.