<?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 can anyone check the error and tell me why I am getting this error? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544895#M14741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/268224_1.png" style="width: 620px; height: 348px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 20 Nov 2016 22:07:59 GMT</pubDate>
    <dc:creator>Abdul_HameedKhorami1</dc:creator>
    <dc:date>2016-11-20T22:07:59Z</dc:date>
    <item>
      <title>can anyone check the error and tell me why I am getting this error?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544895#M14741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/268224_1.png" style="width: 620px; height: 348px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Nov 2016 22:07:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544895#M14741</guid>
      <dc:creator>Abdul_HameedKhorami1</dc:creator>
      <dc:date>2016-11-20T22:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone check the error and tell me why I am getting this error?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544896#M14742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I want to create and program an arc map add in commend in vb.net. to calculates a measure of gender structure ((Male_pop/FEAMLE_POP)*100 in a GenderStr field. I am getting an error I have included&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;both my code and error message I am getting. I am wondering if anyone can help me what is the problem to solve this error?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Nov 2016 22:10:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544896#M14742</guid>
      <dc:creator>Abdul_HameedKhorami1</dc:creator>
      <dc:date>2016-11-20T22:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone check the error and tell me why I am getting this error?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544897#M14743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all a screen shot of your code will not get you much help.... it is hard to see for some of us older folks..... formatted code will allow us to cut paste and see if we get similiar errors as yours.... &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;In any event .... I put together some pseudo code taken from some of my applications that perform something like you want.... hopefully this will point you in the right path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Sub CalculateField()
'Set the pFeatureClass to be the feature class of the top layer in the active map -- if yours is different 
'need to set the Layer index for your layer -- much help on finding the layer on the esri development site

Dim pMxDoc as IMxDocument 
Dim pFeatLayer as IFeatureLayer
Dim pFeatureClass as IFeatureClass
Dim pFields as IFields
Set pMxDoc = My.ArcMap.Document
Set pFeatLayer = pMxDoc.FocusMap.Layer(0)
Set pFeatureClass = pFeatLayer.FeatureClass

'Calculate the field values
Dim pCursor As ICursor
Dim pCalculator as ICalculator
'Prepare a cursor with all records from your layer
Set pCursor = pFeatureClass.Update(Nothing, True)
'Define a calculator
Set pCalculator = New Calculator

'--------------
'NOTE:&amp;nbsp; Male_Pop, Female_Pop, and GenderStr MUST Exist within the Cursor so you may want to test for 'existence prior to the calculation with FindFields!
Dim fields as IFields = pFeatureClass.Fields
Dim fieldIndex as Integer
if fields.FindField("Male_Pop") = -1 then 
&amp;nbsp;&amp;nbsp; msgbox("Male_Pop not found in layer")
&amp;nbsp;&amp;nbsp; 'do something to fix this ...
end if 
'... do the same for Female_Pop and for GenderStr
'--------------

'Be sure Female_Pop is not Zero or null
With pCalculator
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set .Cursor = pCursor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Expression = "(([MALE_POP]/[FEMALE_POP]))*100"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.Field = "GenderStr"
End With
'Calculate the field values
pCalculator.Calculate‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
End sub‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:34:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544897#M14743</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2021-12-11T23:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone check the error and tell me why I am getting this error?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544898#M14744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abdul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree with &lt;A href="https://community.esri.com/people/tkowal"&gt;tkowal&lt;/A&gt;‌, screen shots of code is &lt;STRONG&gt;not&lt;/STRONG&gt; a good way of asking a question as the error may be occurring outside what you are displaying and sometimes people mess up with screen resolution so its impossible to read! That said you don't state WHEN the error occurs. You clearly have a bunch of messagebox lines for debugging. This is a&amp;nbsp;significant omission and you need to clarify at which point the error is occurring. Also you give no information about the version of ArcMap or the dataset that you are attempting a calculation on: is it a shape file, personal geodatabase or even an XY event layer?&amp;nbsp; You need to be much more descriptive if you want us to help you. Suggest you edit your question with this information and get in the habit of supplying that if you need to ask another question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 12:04:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544898#M14744</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-11-23T12:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone check the error and tell me why I am getting this error?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544899#M14745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below Is my code for buffering one layer in ArcGIS ToC. Now I want to bring some changes to&amp;nbsp;&lt;SPAN style="font-size: 11.0pt; color: black;"&gt;perform batch processing. Assume, The clip feature classis the first layer in ToC and that each layer below is to be clipped .&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;you may add each output clipped feature class as a layer in the ToC after each clip operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'define the dataset for clip&lt;BR /&gt; Dim map As ESRI.ArcGIS.Carto.IMap&lt;BR /&gt; Dim inputLayer As ESRI.ArcGIS.Carto.IFeatureLayer&lt;BR /&gt; Dim overlayer As ESRI.ArcGIS.Carto.IFeatureLayer&lt;BR /&gt; Dim inputFC As ESRI.ArcGIS.Geodatabase.IFeatureClass&lt;BR /&gt; Dim overlayFC As ESRI.ArcGIS.Geodatabase.IFeatureClass&lt;BR /&gt; map = mxDocument.FocusMap&lt;/P&gt;&lt;P&gt;'define the input feature class&lt;BR /&gt; inputLayer = map.Layer(0)&lt;BR /&gt; inputFC = inputLayer.FeatureClass&lt;BR /&gt; 'defien the ovelray feature class&lt;BR /&gt; overlayer = map.Layer(1)&lt;BR /&gt; overlayFC = overlayer.FeatureClass&lt;/P&gt;&lt;P&gt;'define the output&lt;BR /&gt; Dim newWSName As ESRI.ArcGIS.Geodatabase.IWorkspaceName&lt;BR /&gt; Dim FCname As ESRI.ArcGIS.Geodatabase.IFeatureClassName&lt;BR /&gt; Dim datasetName As ESRI.ArcGIS.Geodatabase.IDatasetName&lt;BR /&gt; FCname = New ESRI.ArcGIS.Geodatabase.FeatureClassName&lt;BR /&gt; datasetName = FCname&lt;BR /&gt; newWSName = New ESRI.ArcGIS.Geodatabase.WorkspaceName&lt;BR /&gt; newWSName.WorkspaceFactoryProgID = "esriCore.shapeFileWorkspaceFactory"&lt;BR /&gt; newWSName.PathName = "C:\GEO531\Day10\Lab10_Data"&lt;/P&gt;&lt;P&gt;datasetName.WorkspaceName = newWSName&lt;BR /&gt; datasetName.Name = "clip_result1"&lt;/P&gt;&lt;P&gt;'perform clip&lt;BR /&gt; Dim bGP As ESRI.ArcGIS.Carto.IBasicGeoprocessor&lt;BR /&gt; Dim tol As Double&lt;BR /&gt; Dim outputFC As ESRI.ArcGIS.Geodatabase.FeatureClass&lt;/P&gt;&lt;P&gt;'define a basic geoprocesssing object&lt;BR /&gt; bGP = New ESRI.ArcGIS.Carto.BasicGeoprocessor&lt;BR /&gt; 'use the default tolerance&lt;BR /&gt; tol = 0.0#&lt;BR /&gt; 'run clip&lt;BR /&gt; outputFC = bGP.Clip(inputFC, False, overlayFC, False, tol, FCname)&lt;/P&gt;&lt;P&gt;'create the output layer and add it the active map&lt;BR /&gt; Dim name As ESRI.ArcGIS.esriSystem.IName&lt;BR /&gt; Dim clipFC As ESRI.ArcGIS.Geodatabase.IFeatureClass&lt;BR /&gt; Dim clipFL As ESRI.ArcGIS.Carto.IFeatureLayer&lt;BR /&gt; name = FCname&lt;BR /&gt; clipFC = name.Open&lt;BR /&gt; clipFL = New ESRI.ArcGIS.Carto.FeatureLayer&lt;BR /&gt; clipFL.FeatureClass = outputFC&lt;BR /&gt; clipFL.Name = " clip_Result2"&lt;BR /&gt; map.AddLayer(clipFL)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 03:19:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544899#M14745</guid>
      <dc:creator>Abdul_HameedKhorami1</dc:creator>
      <dc:date>2016-11-30T03:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: can anyone check the error and tell me why I am getting this error?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544900#M14746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the risk of being anoying this is a completely different question and has nothing to do with your &lt;EM&gt;original&lt;/EM&gt; question. New questions must be asked on new posts. Anyone researching a similar problem as to your first question will simply find this post useless and contributes nothing to the user community. Did you solve the &lt;EM&gt;original&lt;/EM&gt; problem? If so post an answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggest you delete this question and repost in a new thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 09:47:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-anyone-check-the-error-and-tell-me-why-i-am/m-p/544900#M14746</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-11-30T09:47:57Z</dc:date>
    </item>
  </channel>
</rss>

