<?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: Is it possible to use the arcpy.mapping classes within visual studio? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418668#M11261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you are mixing geoprocessors, there is a COM object and a .Net object (well thats how I understand it), look at this page:&lt;/P&gt;&lt;P&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.2/net/c4ff8b68-0410-435f-b8e5-682d5cea47cf.htm" title="http://edndoc.esri.com/arcobjects/9.2/net/c4ff8b68-0410-435f-b8e5-682d5cea47cf.htm"&gt;How to run a geoprocessing tool&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 May 2016 12:58:13 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2016-05-26T12:58:13Z</dc:date>
    <item>
      <title>Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418661#M11254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So is there a way you can use arcpy code from within a vb.net project? Currently have a pretty big custom set of addin's written in vb.net and can't figure out how to do one part of what i want with .net code. In acpy it is easy so i was wondering if i could somehow stick a little arcpy code in the visual studio project?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 16:26:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418661#M11254</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2016-05-24T16:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418662#M11255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't use it, or net stuff in general, but there is a whole section on arcpy access which you will have to troll through&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#aecfa7f0-ac98-4a1c-ae36-f012211efb3c.htm" title="http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#aecfa7f0-ac98-4a1c-ae36-f012211efb3c.htm"&gt;http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#aecfa7f0-ac98-4a1c-ae36-f012211efb3c.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 18:04:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418662#M11255</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-05-24T18:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418663#M11256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an idea but if what you can do easily in arcpy is actually calling&amp;nbsp; one or more geo-processing tools then you could call the same tools within ArcObjects. The key interface I use is &lt;EM&gt;IGeoProcessor&lt;/EM&gt;​. There are loads of examples on this forum showing you how to call existing geo-processing tools.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 17:25:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418663#M11256</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-05-25T17:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418664#M11257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan and Duncan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the replys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to access the&amp;nbsp; IGeoProcessor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim GP As IGeoProcessor = Nothing &lt;STRONG&gt;(works!)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is hooking into the active map document and using the layers within the mxd i am working with in the vb.net project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;stuff like&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument('CURRENT')&lt;/P&gt;&lt;P&gt;in_features = arcpy.mapping.ListLayers(mxd)[0]&lt;/P&gt;&lt;P&gt;(stolen from arcpy scripts i found on the internet)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my first goal is to get something like this to run:&lt;/P&gt;&lt;P&gt;GP.FeatureclassToFeatureclass_conversion(in_features, out_path, out_name)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but to have it reference a layer within the mxd i am working for the in_features.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 19:19:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418664#M11257</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2016-05-25T19:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418665#M11258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am beginning to think that trying to consolidate everything into one, might not be such a good idea.&amp;nbsp; Arcobjects I am sure can accommodate this, but arcpy and python are the preferred combinations I suspect... perhaps that is the py part of arcpy.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 21:52:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418665#M11258</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-05-25T21:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418666#M11259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Firstly you would not set your pointer to nothing as you have you need to point it to the GeoProcessor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim GP As IGeoProcessor = New GeoProcessor
GP.Execute(.....)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to access individual layers you need to use IMXDocument.focusmap.layer(x) where x is the index position. Suggest searching for examples in help and on forum.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:56:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418666#M11259</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2021-12-11T18:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418667#M11260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Duncan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for trying to help me through this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure i understand what you mean though. Do you mean pass the variables in in a traditional vb.net sense like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub Export_to_shp()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim GP As IGeoProcessor = New ESRI.ArcGIS.Geoprocessing.GeoProcessor&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Declare variables for input &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim in_features As IFeatureLayer&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim out_path As String&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim out_name As String&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim m_pMxDoc As ESRI.ArcGIS.ArcMapUI.IMxDocument&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_pMxDoc = My.ArcMap.Document&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in_features = m_pMxDoc.FocusMap.Layer(2)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out_path = "H:\SwiftReach"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out_name = "test.shp"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GP.FeatureclassToFeatureclass_conversion(in_features, out_path, out_name)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because when i try that in like in the code above; it blows up at:&lt;/P&gt;&lt;P&gt;GP.FeatureclassToFeatureclass_conversion(in_features, out_path, out_name)&lt;/P&gt;&lt;P&gt;with the error&lt;/P&gt;&lt;P&gt;NullReferenceException was unhandled&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is why i started to try to go down the rabbit hole of trying to call the variables through some other more "arcpy" like means.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am beginning to think as Dan had mentioned above that there is too much mixing of styles here maybe? And that this may not work as i'd imagined it... Would be cool though; the arcpy tools are so much more intuitive to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any continued ideas would be greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 12:35:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418667#M11260</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2016-05-26T12:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418668#M11261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you are mixing geoprocessors, there is a COM object and a .Net object (well thats how I understand it), look at this page:&lt;/P&gt;&lt;P&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.2/net/c4ff8b68-0410-435f-b8e5-682d5cea47cf.htm" title="http://edndoc.esri.com/arcobjects/9.2/net/c4ff8b68-0410-435f-b8e5-682d5cea47cf.htm"&gt;How to run a geoprocessing tool&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 12:58:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418668#M11261</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-05-26T12:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418669#M11262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Duncan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again thanks for your continued help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel like with that last tip i am getting closer for sure!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the current state of the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub Export_to_shp()&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim GP As IGeoProcessor = New ESRI.ArcGIS.Geoprocessing.GeoProcessor&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim fctofcconversion As ESRI.ArcGIS.ConversionTools.FeatureClassToShapefile = New ESRI.ArcGIS.ConversionTools.FeatureClassToShapefile()&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim m_pMxDoc As ESRI.ArcGIS.ArcMapUI.IMxDocument&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_pMxDoc = My.ArcMap.Document&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim in_features As IFeatureLayer = m_pMxDoc.FocusMap.Layer(2)&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fctofcconversion.Input_Features = in_features&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fctofcconversion.Output_Folder = "H:\SwiftReach"&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GP.Execute(fctofcconversion, Nothing)&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/EM&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;the problem in this one is in the GP.Execute; error is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Argument not specified for parameter 'pTrackCancel' of "Public Function Execute (Name as String, iValues as ESRI.arcGIS.esriSystem.IVariantArray, pTrackCancel as &lt;SPAN style="font-size: 16px;"&gt;ESRI.arcGIS.esriSystem.&lt;/SPAN&gt;ITrackCancel) As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i tried to mess with it a little based on the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp; Private Sub Export_to_shp()&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim GP As IGeoProcessor = New ESRI.ArcGIS.Geoprocessing.GeoProcessor&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim fctofcconversion As ESRI.ArcGIS.ConversionTools.FeatureClassToShapefile = New ESRI.ArcGIS.Geoprocessing.GeoProcessorResult&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim m_pMxDoc As ESRI.ArcGIS.ArcMapUI.IMxDocument&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_pMxDoc = My.ArcMap.Document&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim in_features As String = m_pMxDoc.FocusMap.Layer(2).Name&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pVA As ESRI.ArcGIS.esriSystem.IVariantArray = New ESRI.ArcGIS.esriSystem.VarArray&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; With pVA&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Add(in_features)&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Add("H:\SwiftReach")&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End With&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'fctofcconversion.Input_Features = in_features&lt;/EM&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'fctofcconversion.Output_Folder = "H:\SwiftReach"&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GP.Execute(fctofcconversion, pVA, Nothing)&lt;/EM&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/EM&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;In this version the error is still in the gp.execute but specifically on the fctofcconversion &lt;/SPAN&gt;&lt;SPAN style="font-size: 16px;"&gt;variable&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Value of type 'ESRI.arcGIS.ConversionTools.FeatureClassToShapefile' cannot be converted to String&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:56:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418669#M11262</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2021-12-11T18:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418670#M11263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i was wondering how to do that!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;better?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 14:59:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418670#M11263</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2016-05-26T14:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418671#M11264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again it looks like you are mixing the two types of geo-processors. See the VBA code below, note the type of geoprocessor I am using and how I call the tool by it's name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim pGeoProcessor As IGeoProcessor
Set pGeoProcessor = New GeoProcessor
With pGeoProcessor
&amp;nbsp;&amp;nbsp;&amp;nbsp; .OverwriteOutput = True
&amp;nbsp;&amp;nbsp;&amp;nbsp; .LogHistory = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; .AddOutputsToMap = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; .TemporaryMapLayers = True
End With
Dim pGeoProcessorResult As IGeoProcessorResult
Dim pVariantArray As IVariantArray
Set pVariantArray = New VarArray
Set pVariantArray = New VarArray
With pVariantArray
&amp;nbsp;&amp;nbsp;&amp;nbsp; .Add pFeatureLayer_Urban
&amp;nbsp;&amp;nbsp;&amp;nbsp; .Add "INTERSECT"
&amp;nbsp;&amp;nbsp;&amp;nbsp; .Add pFeatureLayer_Catchments
&amp;nbsp;&amp;nbsp;&amp;nbsp; .Add ""
&amp;nbsp;&amp;nbsp;&amp;nbsp; .Add "NEW_SELECTION"
End With
Set pGeoProcessorResult = pGeoProcessor.Execute("SelectLayerByLocation", pVariantArray, Nothing)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:56:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418671#M11264</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2021-12-11T18:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418672#M11265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Duncan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks SO MUCH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the working result:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub Export_to_shp()


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim GP As IGeoProcessor = New ESRI.ArcGIS.Geoprocessing.GeoProcessor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; With GP
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .OverwriteOutput = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .LogHistory = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .AddOutputsToMap = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .TemporaryMapLayers = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End With


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim m_pMxDoc As ESRI.ArcGIS.ArcMapUI.IMxDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_pMxDoc = My.ArcMap.Document
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim in_features As String = m_pMxDoc.FocusMap.Layer(2).Name


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pVA As ESRI.ArcGIS.esriSystem.IVariantArray = New ESRI.ArcGIS.esriSystem.VarArray
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; With pVA
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Add(in_features)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Add("H:\SwiftReach")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End With


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GP.Execute("FeatureClassToShapefile", pVA, Nothing)


&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you see anything that could still use some fixing let me know. I am no programmer, but I try my best...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:56:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418672#M11265</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2021-12-11T18:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418673#M11266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you got it working! I would pass the result of the call to the tool into a pGeoProcessorResult object, you can then test the status, did your code succeed or fail, you can also retrieve from this object the error message which may give some indication to why it failed. It's just better coding to be defensive.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 16:13:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418673#M11266</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-05-26T16:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418674#M11267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've always went the route of using the &lt;A href="http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#c4ff8b68-0410-435f-b8e5-682d5cea47cf.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;managed assemblies&lt;/A&gt; when using the Geoprocessor in .NET. Here's an example of how I run the Dissolve tool, using inputs representing either feature classes or feature layers (either as path names or as ArcObjects) and all the associated functions to execute the Geoprocessor and return a feature class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim GP As ESRI.ArcGIS.Geoprocessor.Geoprocessor&amp;nbsp; 'set in the beginning of the code


Friend Function DissolveDataset(ByVal InputName As Object, ByVal DissolveField As String, ByVal StatsFields As String, ByVal OutputName As String) As ESRI.ArcGIS.Geodatabase.IFeatureClass

&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim DissolveDS As New ESRI.ArcGIS.DataManagementTools.Dissolve
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim Result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2

&amp;nbsp;&amp;nbsp;&amp;nbsp; Try
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using releaser As New ESRI.ArcGIS.ADF.ComReleaser
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; releaser.ManageLifetime(DissolveDS)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DissolveDS.in_features = InputName
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DissolveDS.dissolve_field = DissolveField
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DissolveDS.statistics_fields = StatsFields
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DissolveDS.out_feature_class = OutputName

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Result = RunTool(DissolveDS, Nothing)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Result Is Nothing Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show("Could not dissolve dataset")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return ReturnObjectfromResult(Result, "Feature Class")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Using

&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(ex.ToString, "Dissolve error")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try

End Function

Friend Function RunTool(ByVal Process As ESRI.ArcGIS.Geoprocessor.IGPProcess, ByVal TC As ESRI.ArcGIS.esriSystem.ITrackCancel2) As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2

&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim Result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2

&amp;nbsp;&amp;nbsp;&amp;nbsp; Try
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Result = CType(GP.Execute(Process, Nothing), ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Result.Status &amp;lt;&amp;gt; ESRI.ArcGIS.esriSystem.esriJobStatus.esriJobSucceeded Then ReturnMessages(Result, "Geoprocessing Error")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GP.ClearMessages()
&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReturnMessages(Result, "Fail")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(ex.ToString, "Run Geoprocessor")
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try

&amp;nbsp;&amp;nbsp;&amp;nbsp; Return Result

End Function

Private Sub ReturnMessages(ByVal pResult As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2, ByVal Title As String)

&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ErrorMessage As String

&amp;nbsp;&amp;nbsp;&amp;nbsp; If pResult.MessageCount &amp;gt; 0 Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Count As Integer = 0 To pResult.MessageCount - 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorMessage += pResult.GetMessage(Count)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next
&amp;nbsp;&amp;nbsp;&amp;nbsp; End If

&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(ErrorMessage, Title)

End Sub

Friend Function ReturnObjectfromResult(ByVal result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2, ByVal Type As String) As Object

&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim GPVal As ESRI.ArcGIS.Geodatabase.IGPValue
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim InMemFC As String
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim GPUtil As ESRI.ArcGIS.Geoprocessing.IGPUtilities3 = New ESRI.ArcGIS.Geoprocessing.GPUtilities

&amp;nbsp;&amp;nbsp;&amp;nbsp; Try
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPVal = result.GetOutput(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InMemFC = GPVal.GetAsText()

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case Type
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "Feature Class"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return GPUtil.OpenFeatureClassFromString(InMemFC)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "Table"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return GPUtil.OpenTableFromString(InMemFC)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select

&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(ex.ToString, "Return FeatureClass error")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try

End Function&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:56:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418674#M11267</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T18:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418675#M11268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/3856"&gt;Ken Buja&lt;/A&gt;​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've always wondered if there was an advantage in using managed assemblies (the way you have shown) compared to the way I have done it? I've continued to use the method I use to call geo-processing tools simply because it was the method I first learnt and I can remember how to do it! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duncan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 09:27:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418675#M11268</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-05-27T09:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the arcpy.mapping classes within visual studio?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418676#M11269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know if there are computational advantages of using the managed assemblies. I've gravitated to them because you know exactly which parameter is getting set (and in no particular order) as opposed to having to remember their correct order when adding them to the IVariantArray&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 16:26:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-it-possible-to-use-the-arcpy-mapping-classes/m-p/418676#M11269</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2016-05-27T16:26:55Z</dc:date>
    </item>
  </channel>
</rss>

