3

I want to add a 2nd data frame to an existing "*.mxd" file. Right now, i see option to add layers and edit properties of "CURRENT" data frame but could not figure out how to add a new one and export outputs from 1st frame to 2nd one. Any suggestions?

1 Answer 1

3

The limits of arcpy.mapping are described in the documentation as:

The arcpy.mapping module was designed so that it can be used to modify existing elements within already existing map documents (.mxd) or layer files (.lyr). In other words, it helps with the automation of existing features but it can't be used to author new objects. It was not designed to be a complete replacement for ArcObjects or an attempt at creating a function, method, or property for every conceivable button, dialog box, menu choice, or context item in the ArcMap interface (that is what ArcObjects provides). You must carefully author a map document or layer file using ArcMap ahead of time with all the appropriate elements and then use arcpy.mapping to manipulate its contents.

Unfortunately, you are trying to author a new DataFrame object which falls outside of what arcpy.mapping is designed to do.

0

Your Answer

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

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