Give this a shot Glen, perhaps slightly overkill but oh well:
(defun c:DimUpd ( / *error* _StartUndo _EndUndo DimLayer DimStyle doc lck ss ) (vl-load-com) ;; © Lee Mac 2010 [color=red][b](setq DimLayer "Dims" DimStyle "Standard")[/b][/color] (defun *error* ( msg ) (if lck (LM:RelockLayers lck)) (if doc (_EndUndo doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (defun _StartUndo ( doc ) (_EndUndo doc) (vla-StartUndoMark doc) ) (defun _EndUndo ( doc ) (if (= 8 (logand 8 (getvar 'UNDOCTL))) (vla-EndUndoMark doc) ) ) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (or (tblsearch "LAYER" DimLayer) (vla-Add (vla-get-Layers doc) DimLayer) ) (or (tblsearch "DIMSTYLE" DimStyle) (vla-Add (vla-get-DimStyles doc) DimStyle) ) (if (ssget "_X" '((0 . "*LEADER,*DIMENSION"))) (progn (_StartUndo doc) (setq lck (LM:UnlockLayers doc)) (vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc)) (vl-catch-all-apply (function (lambda nil (mapcar (function (lambda ( p v ) (vlax-put-property obj p v)) ) '(Layer Stylename) (list DimLayer DimStyle) ) ) ) ) ) (vla-delete ss) (LM:RelockLayers lck) (_EndUndo doc) ) ) (princ)) ;;------------------=={ Unlock Layers }==---------------------;;;; ;;;; Unlocks all layers in the supplied Document Object and ;;;; returns a list of those which were locked ;;;;------------------------------------------------------------;;;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;;;;------------------------------------------------------------;;;; Arguments: ;;;; doc - VLA Document Object ;;;;------------------------------------------------------------;;;; Returns: list of previously locked VLA Layer Objects ;;;;------------------------------------------------------------;;(defun LM:UnlockLayers ( doc / r ) (vlax-for l (vla-get-layers doc) (if (eq :vlax-true (vla-get-lock l)) (vla-put-lock (car (setq r (cons l r))) :vlax-false) ) ) (reverse r));;-------------------=={ ReLock Layers }==--------------------;;;; ;;;; Locks all layers in the supplied list ;;;;------------------------------------------------------------;;;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;;;;------------------------------------------------------------;;;; Arguments: ;;;; lst - list of VLA Layer Objects ;;;;------------------------------------------------------------;;(defun LM:ReLockLayers ( lst ) (mapcar '(lambda ( l ) (vla-put-lock l :vlax-true)) lst))