Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Are there anyone know how to move all element (text, line,) of a PageLayout (in GraphicsContainer) to left (or right, up...) 5 cm using C# ?

Thank you very much !

share|improve this question
    
ArcObjects documentation is pretty good for this purpose, will explain everything in details. Loop trough the elements in container GraphicContaineer.Next() an use ITransform2D interface on each element, than use .Move(). –  Tomek Dec 20 '12 at 10:21
    
@taibc, This link gives an example of the ITransform2D.Move method how all elments may be moved, edndoc.esri.com/arcobjects/9.2/NET/… –  artwork21 Dec 20 '12 at 12:23
    
Thank all of you. I can do now –  taibc Dec 21 '12 at 1:43

1 Answer 1

up vote 2 down vote accepted

As noted in the comments ITransform2D.Move on the elements is the way to go.

Remember that the IPageLayout.Page.Units can be different from centimeters though. The layout elements transformation methods take arguments in page units. You can use the UnitConverter class to convert between units in a generic way.

share|improve this answer
    
Thank you Petr Krebs –  taibc Dec 21 '12 at 6:09

Your Answer

 
discard

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.