<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem / Question on projections in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522225#M14063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're using the HARN PCS which probably isn't the VA State Plane that you want.&amp;nbsp; Since you're needing to project your coordinates into the PCS of the map, then just get the spatial reference of the map instead of creating it using the spatial reference environment.&amp;nbsp; This will make your code work no matter what spatial reference the map is in.&amp;nbsp; You'll still need to create the GCS according to whatever system your input coordinates are in.&amp;nbsp; Unless, of course, you're getting those from a feature class or something that also has a spatial reference (in which case, just get the SR from that instead of creating it).&amp;nbsp; As for your error, try using SpatialReferenceEnvironment (without the Class on the end).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Sep 2010 17:55:23 GMT</pubDate>
    <dc:creator>NeilClemmons</dc:creator>
    <dc:date>2010-09-29T17:55:23Z</dc:date>
    <item>
      <title>Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522224#M14062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have spent countless hours trying to understand projections and conversions, etc...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I have a fairly simple an common question, although trying to weed through the code examples and documentation, I have been unsuccessful in finding a solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A little background:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map that appears to be displaying x/y in Virginia State Plane (ex: 3367638.0705937, 11241037.076929).&amp;nbsp; It appears to be in feet.??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a coordinate of 42.234234, -79.234234 for example, which is WGS-1984?&amp;nbsp; When I try to perform a map.putcoords(x,y), it puts me in the middle of the ocean somewhere.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not 100% exactly sure what I am looking for, but I know I need to do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Take the example coordinates (show above), convert them to Virginia State Plane?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Move or Pan the map to that location and put a point on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sounds easy, right?!&amp;nbsp; Here is some [incomplete] example code that I have done so far.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pSpatRefFact As ISpatialReferenceFactory2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSpatRefFact = New SpatialReferenceEnvironmentClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_pGeographicCoordinateSystem = pSpatRefFact.CreateGeographicCoordinateSystem(ESRI.ArcGIS.Geometry.esriSRGeoCSType.esriSRGeoCS_WGS1984)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_pProjectedCoordinateSystem = pSpatRefFact.CreateProjectedCoordinateSystem(esriSRProjCSType.esriSRProjCS_NAD1983HARNSPCS_VANorth)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim p As IPoint&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p = New Point&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p.PutCoords(-79.23452, 42.231123)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p.SpatialReference = m_pGeographicCoordinateSystem&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p.Project(m_pProjectedCoordinateSystem)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Couple issues:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure I am using or understand the PCS is the correct one.&amp;nbsp; That should be what projections my map is currently in - right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Secondly, when I enter the code: pSpatRefFact = New SpatialReferenceEnvironmentClass, I get an error telling me 'Interop type 'SpatialReferenceEnvironmentClass' cannot be embedded.&amp;nbsp; Use the applicable interface instead.'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is code taken directly from an example.&amp;nbsp; I am using VS2010 .Net 4.0 w/ArcEngine 10.0 if that matters at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Coule someone please provide me an accurate, working example of how to convert WGS1984 to Virginia State Plane, pan the map to the appropriate coordinate and place a simple point on the map?&amp;nbsp; This is becoming very frustrating and time consuming.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lastly, are there webinars, videos, etc... that can shed some light on these issues?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bob&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-email-small" href="mailto:bobp@group1inc.com"&gt;bobp@group1inc.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 16:57:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522224#M14062</guid>
      <dc:creator>BobPokorny</dc:creator>
      <dc:date>2010-09-29T16:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522225#M14063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're using the HARN PCS which probably isn't the VA State Plane that you want.&amp;nbsp; Since you're needing to project your coordinates into the PCS of the map, then just get the spatial reference of the map instead of creating it using the spatial reference environment.&amp;nbsp; This will make your code work no matter what spatial reference the map is in.&amp;nbsp; You'll still need to create the GCS according to whatever system your input coordinates are in.&amp;nbsp; Unless, of course, you're getting those from a feature class or something that also has a spatial reference (in which case, just get the SR from that instead of creating it).&amp;nbsp; As for your error, try using SpatialReferenceEnvironment (without the Class on the end).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 17:55:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522225#M14063</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2010-09-29T17:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522226#M14064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You're using the HARN PCS which probably isn't the VA State Plane that you want.&amp;nbsp; Since you're needing to project your coordinates into the PCS of the map, then just get the spatial reference of the map instead of creating it using the spatial reference environment.&amp;nbsp; This will make your code work no matter what spatial reference the map is in.&amp;nbsp; You'll still need to create the GCS according to whatever system your input coordinates are in.&amp;nbsp; Unless, of course, you're getting those from a feature class or something that also has a spatial reference (in which case, just get the SR from that instead of creating it).&amp;nbsp; As for your error, try using SpatialReferenceEnvironment (without the Class on the end).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the sample projected point is in Pittsylvania or Danville area, then the pcs is Virginia South, using US survey feet. Could be based on NAD83 or NAD83 HARN. The 11 million value is the easting or X value. The PCS you have below is using meters, rather than feet. Try &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;esriSRProjCS_NAD1983SPCS_VASouthFT&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;esriSRProjCS_NAD1983HARN_StatePlane_Virginia_South_FIPS_4502_Ft&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the lat/lon you have (42.234234, -79.234234) is in west New York state. Latitude values for very southern Virginia should be around 36.6. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some possible references are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hitchhiker's Guide to coordinate systems&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://edn.esri.com/index.cfm?fa=media.detail&amp;amp;media=54"&gt;http://edn.esri.com/index.cfm?fa=media.detail&amp;amp;media=54&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2010 Esri Developer's Summit: Understanding and using the geometry ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://proceedings.esri.com/library/userconf/devsummit10/tech/tech_58.html"&gt;http://proceedings.esri.com/library/userconf/devsummit10/tech/tech_58.html&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Understanding map projections and coordinate systems ($145, no programming)&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://training.esri.com/acb2000/showdetl.cfm?DID=6&amp;amp;Product_ID=697"&gt;http://training.esri.com/acb2000/showdetl.cfm?DID=6&amp;amp;Product_ID=697&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 19:20:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522226#M14064</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2010-09-29T19:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522227#M14065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for all the comments, feedback and help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I removed 'Class' from SpatialReferenceEnvironment and receive another COM exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Retrieving the COM class factory for component with CLSID {7B5B7020-C4F6-11D1-BC92-0000F875BCCE} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not a COM developer, so this is a little foreign to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A bit more on the map I am using.&amp;nbsp; I was handed a MXD file that has Virginia's map data (Danville area), and in order to track across the US, ESRI's North America Street Map data was also added.&amp;nbsp; The map as previously indicated should be projected in the Virginia State Plane.&amp;nbsp; I did change by PCS to esriSRProjCSType.esriSRProjCS_NAD1983SPCS_VASouthFT, but as I mentioned, I get the error mentioned above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I can get past that error, that would be great.&amp;nbsp; Is there something I have to do to put a wrapper around Arc Objects COM object?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 19:30:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522227#M14065</guid>
      <dc:creator>BobPokorny</dc:creator>
      <dc:date>2010-09-29T19:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522228#M14066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for all the comments, feedback and help.&lt;BR /&gt;&lt;BR /&gt;I removed 'Class' from SpatialReferenceEnvironment and receive another COM exception:&lt;BR /&gt;&lt;BR /&gt;Retrieving the COM class factory for component with CLSID {7B5B7020-C4F6-11D1-BC92-0000F875BCCE} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).&lt;BR /&gt;&lt;BR /&gt;I'm not a COM developer, so this is a little foreign to me.&lt;BR /&gt;&lt;BR /&gt;A bit more on the map I am using.&amp;nbsp; I was handed a MXD file that has Virginia's map data (Danville area), and in order to track across the US, ESRI's North America Street Map data was also added.&amp;nbsp; The map as previously indicated should be projected in the Virginia State Plane.&amp;nbsp; I did change by PCS to esriSRProjCSType.esriSRProjCS_NAD1983SPCS_VASouthFT, but as I mentioned, I get the error mentioned above.&lt;BR /&gt;&lt;BR /&gt;If I can get past that error, that would be great.&amp;nbsp; Is there something I have to do to put a wrapper around Arc Objects COM object?&lt;BR /&gt;&lt;BR /&gt;Thanks for the help.&lt;BR /&gt;Bob&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Bob, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tell people that I'm barely a programmer (I do enough for testing, but it sure isn't 'elegant') so I can't tell if you're using VB6 or VB.Net code, or maybe something else. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For VB6, try &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Dim pSpatRefFact As SpatialReferenceEnvironment&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Set pSpatRefFact = New SpatialReferenceEnvironment&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and you also need to use &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Set pGCS = pSpatRefFact.CreateGeographicCoordinateSystem(enum)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For VB.Net, try&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim t As Type = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim obj As System.Object = Activator.CreateInstance(t)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pSpatRefFact As ESRI.ArcGIS.Geometry.ISpatialReferenceFactory3 = obj&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Sep 2010 00:23:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522228#M14066</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2010-09-30T00:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522229#M14067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Bob, &lt;BR /&gt;&lt;BR /&gt;I tell people that I'm barely a programmer (I do enough for testing, but it sure isn't 'elegant') so I can't tell if you're using VB6 or VB.Net code, or maybe something else. &lt;BR /&gt;&lt;BR /&gt;For VB6, try &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Dim pSpatRefFact As SpatialReferenceEnvironment&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Set pSpatRefFact = New SpatialReferenceEnvironment&lt;BR /&gt;&lt;BR /&gt;and you also need to use &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Set pGCS = pSpatRefFact.CreateGeographicCoordinateSystem(enum)&lt;BR /&gt;&lt;BR /&gt;For VB.Net, try&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim t As Type = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim obj As System.Object = Activator.CreateInstance(t)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pSpatRefFact As ESRI.ArcGIS.Geometry.ISpatialReferenceFactory3 = obj&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Melita&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have similar problem when I tried to migrate my 9.3 C# code to 10.0. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I got error message for &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ISpatialReferenceFactory spatialReferenceFactory2 = new SpatialReferenceEnvironmentClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the error message is "Retrieving the COM class factory for component with CLSID {7B5B7020-C4F6-11D1-BC92-0000F875BCCE} failed due to the following error: 80040111."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I tried to use activator so I revised the code to following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Set up the SpatialReferenceEnvironment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // SpatialReferenceEnvironment is a singleton object and needs to use the Activator class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type factoryType = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object object1 = Activator.CreateInstance(factoryType);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISpatialReferenceFactory2 spatialReferenceFactory2 = object1 as ISpatialReferenceFactory2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I still got the same error message. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone help on this one?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wei&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 17:41:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522229#M14067</guid>
      <dc:creator>WeiChen</dc:creator>
      <dc:date>2010-10-19T17:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522230#M14068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have similar problem when I tried to migrate my 9.3 C# code to 10.0. &lt;BR /&gt;I got error message for &lt;BR /&gt;ISpatialReferenceFactory spatialReferenceFactory2 = new SpatialReferenceEnvironmentClass();&lt;BR /&gt;the error message is "Retrieving the COM class factory for component with CLSID {7B5B7020-C4F6-11D1-BC92-0000F875BCCE} failed due to the following error: 80040111."&lt;BR /&gt;&lt;BR /&gt;Then I tried to use activator so I revised the code to following:&lt;BR /&gt;// Set up the SpatialReferenceEnvironment.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // SpatialReferenceEnvironment is a singleton object and needs to use the Activator class.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type factoryType = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Object object1 = Activator.CreateInstance(factoryType);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISpatialReferenceFactory2 spatialReferenceFactory2 = object1 as ISpatialReferenceFactory2;&lt;BR /&gt;&lt;BR /&gt;However, I still got the same error message. &lt;BR /&gt;&lt;BR /&gt;Can anyone help on this one?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;&lt;BR /&gt;Wei&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Wei, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another post with a similar issue said that he needed to add this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(or other licensing information).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 18:41:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522230#M14068</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2010-10-19T18:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522231#M14069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Wei, &lt;BR /&gt;&lt;BR /&gt;Another post with a similar issue said that he needed to add this:&lt;BR /&gt;&lt;BR /&gt;ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine);&lt;BR /&gt;&lt;BR /&gt;(or other licensing information).&lt;BR /&gt;&lt;BR /&gt;Melita&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Melita,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still got the same error message after adding the line. By the way, I am using ArcGIS Desktop 10 concurrent license. The code worked well with ArcGIS Desktop 9.3concurrent license. Then I realized that I should use ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop). It works this time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For other people who may have similar problem like me, please refer to &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_migrate_ArcGIS_9_3_Desktop_and_Engine_stand_alone_applications_to_ArcGIS_10/0001000002ns000000/"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_migrate_ArcGIS_9_3_Desktop_and_Engine_stand_alone_applications_to_ArcGIS_10/0001000002ns000000/&lt;/A&gt;&lt;SPAN&gt; for "Migrating an ArcGIS 9.3 application to 10 using the LicenseControl".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wei&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 12:28:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522231#M14069</guid>
      <dc:creator>WeiChen</dc:creator>
      <dc:date>2010-10-20T12:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522232#M14070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying also to migrate my code from v9.3 (where it runs fine) to v10 but without any success. The error I'm getting is the same to what the other folks report here: "Retrieving the COM class factory for component with CLSID {7B5B7020-C4F6-11D1-BC92-0000F875BCCE} failed due to the following error: 80040111". I have followed all the instructions posted on the ESRI website about the migration. My code uses only the ArcGIS engine and debugging completes with no errors (C#, VS2008SP1). The binding to the appropriate ArcGIS runtime works fine, the license initialization the same but when I try to create a new instance of the SpatialReferenceEnvironment I get the exception above. In case you are wondering, the ArcGIS Migration Code Analyzer doesn't throw any errors when I test my projects (only a warning that I have to change the target CPU to x86). Can somebody help? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;K.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 20:21:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522232#M14070</guid>
      <dc:creator>KonstantinosMeintanis</dc:creator>
      <dc:date>2011-01-13T20:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522233#M14071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm trying also to migrate my code from v9.3 (where it runs fine) to v10 but without any success. The error I'm getting is the same to what the other folks report here: "Retrieving the COM class factory for component with CLSID {7B5B7020-C4F6-11D1-BC92-0000F875BCCE} failed due to the following error: 80040111". I have followed all the instructions posted on the ESRI website about the migration. My code uses only the ArcGIS engine and debugging completes with no errors (C#, VS2008SP1). The binding to the appropriate ArcGIS runtime works fine, the license initialization the same but when I try to create a new instance of the SpatialReferenceEnvironment I get the exception above. In case you are wondering, the ArcGIS Migration Code Analyzer doesn't throw any errors when I test my projects (only a warning that I have to change the target CPU to x86). Can somebody help? &lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;K.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you setting the licensing information? See earlier posts in this thread, or this blog entry:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://blogs.esri.com/Dev/blogs/arcgisdesktop/archive/2009/12/01/Migrating-to-Engine-9.4-and-using-the-VersionManager.aspx"&gt;Migrating to Engine 10&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 22:57:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522233#M14071</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2011-01-13T22:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522234#M14072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Melita,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your response. Yes, I have tried the suggestions provided in the earlier posts and the ESRI webpage. What do you mean "setting the licensing information"? What I basically do is that I bind the ArcGIS runtime (it works fine), then check if the product is available (using esriLicenseProductCodeEngine) and finally initialize the license using the ESRI.ArcGIS.esriSystem.IAoInitialize class (this step returns "esriLicenseCheckedOut" - a confirmation that the initialization was successful). Again, the part that fails is the code that creates an instance of the ISpatialReferenceFactory3. I'm referencing libraries from the ArcObjects .NET SDK, do I need to do any COM registration? Running out of ideas ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;K.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jan 2011 15:26:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522234#M14072</guid>
      <dc:creator>KonstantinosMeintanis</dc:creator>
      <dc:date>2011-01-14T15:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522235#M14073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After some testing I have realized that the instantiation of any of the classes in the Esri.ArcGIS.Geometry.dll throws the same exception. So, it's not a problem with the class (ISpatialReferenceFactory3) but with the whole library. Other ESRI dlls work fine (e.g. Esri.ArcGIS. Geodatabase). I never had problems with any of the dlls when I was using the v.9.3. Are there any dependencies of the Geometry.dll with other libraries that I'm not aware of? Is the ArcGIS engine license sufficient for using the Geometry.dll? Please provide help. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;K.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jan 2011 19:02:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522235#M14073</guid>
      <dc:creator>KonstantinosMeintanis</dc:creator>
      <dc:date>2011-01-14T19:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem / Question on projections</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522236#M14074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SpatialReferenceEnvironment spatialRefEnv = SpatialReferenceEnvironment();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ISpatialReferenceFactory2 spatialRefFactory = (ISpatialReferenceFactory2)spatialRefEnv;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an alternative, if you have a class from an assembly that cannot embed you can set the 'Embed interop types' property&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on the assembly reference in your solution explorer to false and that should be another option for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Justin&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Developer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Indiana Dept. of Homeland Security&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 18:30:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-question-on-projections/m-p/522236#M14074</guid>
      <dc:creator>JustinWilliams</dc:creator>
      <dc:date>2011-02-14T18:30:11Z</dc:date>
    </item>
  </channel>
</rss>

