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?

1 Answer 1


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.

  • 1
    I have a great idea - every MXD should come with a hidden graphic ;) Sep 2, 2014 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, 2014 at 4:46

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.