Via a macro or via the user?
You can use a selection filter for that. Display the filter via View > Toolbars > Selection filters and enable the dimensions button. I've never used it before, but it works surprisingly well
Our use the Select All command (Ctrl+a).
If you don't pre-select anything, it will select everything in the sketch.
If you pre-select a dimension and then hit Ctrl+a, it will select all dimensions.
If you pre-select a sketch entity and then hit Ctrl+a, it will select all sketch entities.
I hope this helps,
Wow, Jim! I didn't know that! That is going to speed some things up!
Edit: If you don't mind, I am going to post this is this thread (courtesy of you, to be sure...): What are your most impressive tricks of solidworks, Please spread.