Need Help with drawing view refenrce

Anyone can help pls!

I'm trying to use DM to get the name of the drawingview refenceusing

ISWDMView.ReferencedDocument...

I've check the help but I'm kind of confused.

what is the good way should I need to have a view selected 1st orshould I select it with DM or ???

Thanks to the genius that will help!SolidworksApi macros