I was gonna say, if you were just changing its colour (a general property), recording a macro would be the easier option without any need of LISP coding. Dimension line weight falls outside of general properties, so it looks like you need some coding. What mhupp put up there should work just fine. If anything, just use (ssget "_:L" '((0 . "*DIMENSION"))), otherwise the command will fail when dimensions in a locked layer happens to be accidentally selected.