Select All code

May I please know the code on how to select all by filtering only the dimensions option in drafting mode.
And also the command to convert to modelling as well as drafting

There is some example code to access a part's dimension collection in your other thread.

I'm not sure what you mean by "the command to convert to modelling as well as drafting". Can you explain that a little more, perhaps with an example?