Remove Mapview and layout

202
3
11-25-2020 07:47 AM
Status: Under Consideration
Labels (1)
cwh
by
New Contributor II

I would like to be able to remove mapviews and layouts using arcpy. To me this seems like something arcpy should have the ability to do. 

To provide a simple use case. I have a python toolbox which is used to create/setup new arcgis pro projects for planning applications. The toolbox uses a 'seed project' as the base for creating the new project. The seed project has all mapviews/layouts that could be used by all application types. But some application types do not use all mapviews/layouts. This is why for us it would be helpful if there was a way with arcpy to remove mapviews/layouts which are not needed for certain application types.

Thanks!

3 Comments
JeffBarrette
Status changed to: Under Consideration

This is something we definitely want to be able to do with arcpy.mp at the Project level.

Deleting project items such as maps and layouts as well as duplicating them could be very useful for automation and general project cleanup.

We already have an existing issue for this:

https://devtopia.esri.com/ArcGISPro/arcpy.mp/issues/62

 

JeffBarrette

Thank you for your submission CWH!

To clarify, do you want to delete map views or maps?  A map view is simply a view window in the application for viewing the contents of a map.  A map is a project item that is viewable in a map view (window).  We have future plans to be able to manage project items like maps, layout, folder connections, etc. 

Not only would I like to delete a map (or layout) from a project, but I may also want to duplicate (i.e., copy/paste) one with arcpy.mp as a starting point for automation purposes.

Please confirm map or mapview

Jeff - arcpy.mp Team

cwh
by

Hi @JeffBarrette 

I want to be able to remove/delete mapview and layout from the project.

In my use case the "seed project" has one layout associated with each mapview. So if a application type is chosen that does not use all mapview (for example application type 'Development Permit' does not have a Proposed Use, so I would want to use arcpy to remove the Proposed Use Mapview and Proposed Use Layout.

Thanks,

Chris