2

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?

asked Sep 2, 2014 at 3:43

1 Answer 1

2

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.

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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.