10.1 SOE create object in the server

628
4
Jump to solution
11-01-2013 08:32 AM
KevinJohnson
Occasional Contributor
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
Frequent Contributor
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
Frequent Contributor
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
Occasional Contributor
Thanks a lot!  So is there no equivalent to server context release when you're done?
0 Kudos
RichardWatson
Frequent Contributor
In an SOE you are in the server context.  So, no there is no context to release.
0 Kudos
KevinJohnson
Occasional Contributor
Ok, I think I'm getting it now... Thanks for your help
0 Kudos