Using ArcPy for ArcGIS Pro 3.1, is it possible to close a particular map view if it is open but not any other open map views in an ArcGIS Pro project?
Currently my tool uses "aprx.closeViews("MAPS")" but of course that closes all the open map views.
For context: The closeViews() method is part of the ArcGISProject class and the openView() method is part of the Map class. The closeViews() closes all open views as specified e.g. closeViews("MAPS"). The openView() opens a specific map openView("MyMapName"). I have not found a method in any other class e.g. "closeView("MyMapName").
I have written a Python toolbox tool and so far I have not not had any issues with users having all the maps closed when they run it. I am not asking how to remove a map completely from a project, but rather how to CLOSE a single map view if the user has it open.