Iterate components in a drawing view

I need to iterate through the parts and assemblies in a drawing views and hide/show the part are assembly based on it's name. I have no idea how to start with this one. I know that I will need to iterate through the elements in a view and test for type and then name and change a property. My problem here is I don;t know which interfaces in the API to use or what property to set to hidden or visible.

I tried to record a macro to get started but I just end up with an empty macro???

Any pointers on this would be appreciated.

SolidworksApi macros