Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm interacting with an MXD using arcpy, and wish to create a graphic within a data frame - as with the Draw toolbar when working manually. The GraphicElement page says...

The GraphicElement object provides access to properties that enables its repositioning on the page layout as well as methods that allow for duplicating and deleting existing graphic elements.

...which doesn't mention the ability to create a new graphic element. Is there another area I should be looking at in arcpy, or is this not currently supported?

share|improve this question
up vote 2 down vote accepted

You are coming up against an ArcPy software limitation.

Although you cannot create a GraphicElement from scratch, as long as you have one graphic element present in your layout (even if it is placed off the page), then:

Existing graphic elements can be cloned and deleted. This capability was initially added to support the creation of dynamic graphic tables on a page layout where each cell in the table can be outlined using line graphics.

I take copies of an "off the page" graphic element and then move, resize, etc them.

The same workaround can also be used for text elements.

share|improve this answer
I have a great idea - every MXD should come with a hidden graphic ;) – Stephen Lead Sep 2 '14 at 4:41
... so that a copy method could clone it, elementPositionX/elementPositionY it to the centre of the page, and make it a default elementHeight & elementWidth:-) – PolyGeo Sep 2 '14 at 4:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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