how to change drawing display styles with macro?

All

the attached macro is one that i downloaded from here and wanted to add a few things to it.

Basically, i want the macro to change the current display setting (if HLR, HLV or Wireframe) to shaded with edges.

This part works as expected.

The problem i run into is when the drawing view is already set to shaded with edges and i want the macro to set it to HLR. I could not get it to function as expected when following the same approach as the other three?

Thank you for your time and assistance, greatly appreciated.

SolidworksApi macros