3

This is to expand on Transforming layout page units to map units using ArcObjects?

How can i programatically obtain the corner coordinates (in page units) or the envelope of the data frame in layout view?

I don't seem to be able to do this with iActiveView:Extent as it is returning the extent of the data view in page units. The below screen capture shows what I would like to get. The coordinates are roughly; upper left 0.9,10 and lower right 8, 0.9. Even in page layout iActive:extent returns: upper left -3.4, 12 and lower right 14,-3 which is the extent of the entire application window not the data frame as it appears in layout.

Here is what i need: enter image description here

1

1 Answer 1

5

Cast the IMxDocument.FocusMap to IActiveView and retrieve current extent from the Extent property.

The map will always automatically modify its extent and other information when you switch from data frame view to the layout view (and back).

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.