Select to view content in your preferred language

Access to app of Desktop from SOE

1455
6
10-24-2012 08:52 PM
AhadKheirabadi
Emerging Contributor
Hi All,

Is there any way to access to app ( as Iapplication ) of mxd, in the SOE ? I need the app in SOE and I want to get property of it.

Thanks for any help ..
0 Kudos
6 Replies
nicogis
MVP Alum
0 Kudos
AhadKheirabadi
Emerging Contributor
Thank you Domenico  for response,

But my problem is that I develop a SOE service for ArcGIS Server. You can see the related link in this address: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000000zv000000

In the desktop developing you can access to Application object very easily, but in ArcGIS Server I can't find any way to access to MXD application. I want to read some setting from the mxd application in my SOE service, but I don't know how I can get this object.
0 Kudos
RichardWatson
Deactivated User
This does not exist in server.  I believe that IApplication is part of Framework and that assembly is only available in desktop:

http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/Overview/00230000010v00...

It would be more helpful if you explain what you are trying to do as there may be another way to do it in server.
0 Kudos
AhadKheirabadi
Emerging Contributor
Thank you for your response.

Actually I work on creating a SOE service for doing utility network analyst.

I want to get the network information like barriers, flags, disable layers , etc  from the application and set them to my netsolver and solve the network base on these information. For accessing these information I need to access to NetAnalysisExt and for accessing this extention I need to access to application.In the other word, if I have access to application I can find the networkanalysisExt by CLSID like this code:

pID = new UID();
pID.Value = "esriEditorExt.UtilityNetworkAnalysisExt";
pNetAnalysisExt = (INetworkAnalysisExt)app.FindExtensionByCLSID(pID);

And then I can get barriers, flags, disable layers from pNetAnalysisExt and set to my netsolver and solve the network.

In addition, I try to use FindExtensionByCLSID of SOExtManager but it returns null value:

ESRI.ArcGIS.Carto.IMapServer3 mapServer = (ESRI.ArcGIS.Carto.IMapServer3)serverObjectHelper.ServerObject;
IServerObjectExtensionManager pSOExtManager = mapServer as IServerObjectExtensionManager;
INetworkAnalysisExt NetAnalysisExt = (INetworkAnalysisExt)pSOExtManager.FindExtensionByCLSID("UtilityNetworkAnalysisExt");

Maybe because the UtilityNetworkAnalysisExt in not a valid extension for ArcGIS Server.

So I try to find a way to access to application to get the NetAnalysisExt from that. If it is not accessible, any way that can help me to access to NetAnalysisExt can be very useful.
0 Kudos
AhadKheirabadi
Emerging Contributor
Thanks for links. I used them before, it is really good.
0 Kudos