Select to view content in your preferred language

10.1 SOE create object in the server

915
4
Jump to solution
11-01-2013 08:32 AM
KevinJohnson
Deactivated User
Hi All,

I'm trying to refactor some old code to create a SOE and before with direct connections to the server the following was true for creating an object in the server:
This was incorrect:
Dim point As IPoint = New Point()


this was correct:
Dim point As IPoint = serverContext.CreateObject("esriGeometry.Point")


Now in 10.1 in a SOE if I want to create a new temporary point or polygon, etc. what is the correct way of doing this?

Thanks a lot
0 Kudos
1 Solution

Accepted Solutions
RichardWatson
Deactivated User
In an SOE you are in the server context.  So, no there is no context to release.

View solution in original post

0 Kudos
4 Replies
RichardWatson
Deactivated User
From within the SOE code you can just create and use ArcObjects.  Of course, you can only use those objects which are available in ArcGIS Server.  Creating ArcObjects in .NET is easily.  Here is an example for points (scroll to the end of the article):

http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/002m/002m0000045p000000.htm
0 Kudos
KevinJohnson
Deactivated User
Thanks a lot!  So is there no equivalent to server context release when you're done?
0 Kudos
RichardWatson
Deactivated User
In an SOE you are in the server context.  So, no there is no context to release.
0 Kudos
KevinJohnson
Deactivated User
Ok, I think I'm getting it now... Thanks for your help
0 Kudos