2

I have a desirable requirement to be able to remove a map from an ArcGIS Pro project using ArcPy.

However the ArcGISProject class does not seem to provide a method to do this.

Is it possible to do so by any other means from ArcPy?

3
  • You want to remove the map completely, or just so it's not an open tab?
    – Midavalo
    Jun 1, 2017 at 3:00
  • Ideally I would remove the map, and any map frames in any layouts that use it, completely. The less that is in a project the quicker it will open. However, just being able to close the tab from ArcPy would be useful.
    – PolyGeo
    Jun 1, 2017 at 3:14
  • Doesn't appear to be a thing, yet. I can't find anything like it in the 2.0 beta
    – Midavalo
    Jun 1, 2017 at 3:16

1 Answer 1

2

I have submitted an ArcGIS Idea for this:

Removing map from ArcGIS Pro project using ArcPy:

I have a desirable requirement to be able to remove a map from an ArcGIS Pro project using ArcPy.

However the ArcGISProject class does not seem to provide a method to do this.

I would like ArcPy to be enhanced to allow this.

My use case is a map automation application where I need to maintain three maps to support three MGA Zones (Australian "equivalent" to supporting three UTM Zones). When the application exports a PDF at the end I also save a copy of the APRX so that the user wanting the PDF can, if need be, open up a copy of the project that created it (think of it as a draft), and perform some modifications before saving a final project/PDF. Since each PDF only uses one of the MGA Zone maps I would like to unclutter the project before saving the copy by removing the other two MGA Zone maps.

2
  • Upvoted here + geonet ideas. I'm trying to script converting an MXD to APRX and need to delete the existing map after calling importdocument. Oct 29, 2021 at 19:01
  • 1
    ArcGIS Pro 3.0 here, and still this crucial feature, especially for migrating ArcMap projects, ignored. Ouch. Promised for 3.1.
    – Miro
    Aug 4, 2022 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.