AnsweredAssumed Answered

Accessing IPageLayout interface through SOE (ArcGis for server 10.2)

Question asked by topomat on Dec 5, 2013
Latest reply on Dec 12, 2013 by topomat
Hi,
I am trying to update a server object extension to version 10.2. The extension resize the page, and change position of various page elements.
Here is the beginning code:
IServerObject so = this.serverObjectHelper.ServerObject; IMapServerObjects3 mapServerObjects = (IMapServerObjects3)so; IPageLayout3 pageLayout = (IPageLayout3)mapServerObjects.PageLayout; 

The cast of mapServerObjects raises an exception.
I understand that since version 10.1 some interface that accessed the mxd must be avoided, in favor of ArcObjects working with map services. I just can't find anything that suits my needs.
It appears that manipulating page layouts from version 10.1 isn't available anymore.

Do someone knows how to access Page layout elements, or a workaround ?
(python toolbox isn't an option neither since ArcPy doesn't expose methods to manipulate grids, apparently)

Thank you.

Outcomes