The IView interface has two interesting properties:
ReferencedConfiguration which returns the name of the referenced configuration
ReferencedDocument which returns an IModelDoc2 object for the referenced document (in your case, that's an assembly)
Using both of these, you will be to get the referenced configuration (IConfiguration).
Traverse the IConfiguration components by looking at this example: 2015 SOLIDWORKS API Help - Traverse Assembly at Component Level Example (VBA)
When traversing the components, use GetPathName to get the pathname of the Component. If the component matches that your filename then set its visibility.
Using the filename as an approach to find and hide a component is OK as long as you want to hide all instances of all components with that pathname. You'll start having problems when you just want to hide a particular instance.