An object-oriented programming language from Microsoft. It is the .NET version of the Visual Basic (VB) programming language.

learn more… | top users | synonyms

3
votes
1answer
361 views

How to programmatically clear all layers from data frame?

I'm trying to create a button using VB.NET and ArcGIS 10 to clear the layers of my data frame. I know how to add layers, but I don't have any idea on how to delete/clear them. Any suggestions? ...
1
vote
2answers
290 views

How to create jpg image of map in Geomedia using vb.net?

I am using Geomedia. I want create jpg image of the map. How can it be done using vb.net?
4
votes
1answer
259 views

Turn off field programmatically in ArcMap via VB.Net

I'm creating an addin button in Arcmap via VB.net that when clicked, runs the identify tool. But I want only selected fields to appear in the identify dialog. My idea is to hide the unnecessary fields ...
3
votes
1answer
115 views

How to use IDatabaseCompact.Compact() on an used IWorkspace, without permission denied

I am writting an ArcMap-AddIn with vb.net. I get an error when trying to compact my IWorkspace(mdb), the error is: COMException You tried to open a database, which was already opened by the ...
1
vote
1answer
292 views

Problem Initializing License for ArcEngine application

I have written an ArcEngine application using vb.net and Visual Studio 2010. When I initially started the code, I indicated an ArcInfo license was available during the project setup. This worked ...
0
votes
1answer
83 views

Unable to update integers in PGDB table field using ArcObjects

Dim pLinerow As IRow pLinerow = ptable.CreateRow pLinerow.Value(pLinerow.Fields.FindField("IS_CLOSED")) = 0 when this code is executed, the below mentioned error is returned, "Error HRESULT ...
-5
votes
2answers
243 views

How to create multipart polygon if coordinates of each part are given? [closed]

How to create a multipart polygon if i am having the values of coordinates of each part. Thanks in advance.
1
vote
2answers
270 views

How to get radiobutton checked after pop-out window?

I am trying to migrate my program from ArcMap 10 VBA to ArcObjects VB.net add-in in Visual studio express 2008. I write a ArcGIS addin component tool to draw a geometry, perform a spatial query and ...
1
vote
0answers
139 views

Sending coordinates of features of any polygon featureclass to a table

I am trying to store x-coordinates and y-coordinates of a polygon feature in a table. But, i am getting an error message: Item not found in this collection. The code is like this: Do pFeature = ...
0
votes
0answers
146 views

How to get x and y coordinate values of an annotational featureclass

I am able to get the x and y coordinate values from point, polyline, polygon and multipoint type featureclasses. However, I am unable to export x and y coordinate values of an annotational ...
4
votes
1answer
550 views

Refresh Currently Open ArcMap Attribute Table using ArcObjects

I have written an ArcMap Addin (ArcMap 10.0) that allows a user to perform a join between an in-memory table and a feature class (feature layer) added to the TOC. I want the attribute table of the ...
3
votes
1answer
223 views

Counting distinct values in a field of a table stored in pgdb

I need to calculate total count of distinct values of a field . That field contains many duplicate values also. The table which contains that field is stored in pgdb. I want things done in vb .net. ...
3
votes
1answer
80 views

The field cannot be deleted because it is being used as a relationship key.

I want to delete some fields of featureclasses, but when I run the code FeatureClass.DeleteField(Field) it works well for some featureclasses but after some time it gives an error such as: The ...
1
vote
1answer
233 views

exporting a featureclass to shapefile with selected fields only [duplicate]

Possible Duplicate: How to control which Fields are exported in ArcObjects? (via Field Mapping) I want to export a featureclass to a shapefile.The only condition i want to impose is that ...
1
vote
1answer
427 views

ArcObjects 10.1

just updated to 10.1 and I'm having issues moving from 10.1. I get the errors with my ADF reference when trying to create custom tool bars examples: 'BaseToolbar' is ambiguous in the namespace ...
1
vote
0answers
122 views

How to get label text for each feature in vb.net in Arcview

I am trying to get text for the label that Arcview is going to place for each feature when the labeling is on, so that I can write it to a file. Since the labels may have complex operations involved, ...
2
votes
3answers
528 views

Connecting to non geodatabase MS Access database using ArcObjects

I am trying to connect to an MS Access database from a program I have written in VB.Net with ArcObjects 10.0. My MS Access database is not a personal geodatabase so apparently I have to connect to ...
1
vote
0answers
123 views

Map Algebra in VB.NET Add-In Tool

I'm trying to run a map algebra expression in a vb.net add-in, and can't seem to get it to work. It's a roving window that interpolates noData areas in a DEM. The expression works in the Python ...
3
votes
1answer
224 views

Repairing disconnected layers with selection sets

Has anyone had any success of repairing disconnected layers that have selection sets that have their data sources broken in ArcGIS? Is there a way to detect this through code and then re-create that ...
4
votes
0answers
313 views

Creating a VB.net Dataset in Visual Studio 2010 from an SDE Geodatabase

I am building an ArcMap Addin that contains several Windows Forms with controls that need to be bound to a database. I am trying to decide whether or not to use a native SQL Server Database or an SDE ...
1
vote
1answer
90 views

How do I keep user from selecting a different tool when my custom tool is selected?

I am using VB.Net to write an add-in. I'd like to keep the tool that I created selected even when the user attempts to select a different tool, and only deselect when my tool is clicked on again.
1
vote
1answer
311 views

How do I save edits from an ArcMap editing session using VB.Net?

I have figured out how to do a map save document, but I would also like to be able to save edits whether or not I am also saving the map document.
2
votes
1answer
435 views

How do I save an ArcMap map document using VB.Net?

I am trying to save the map document that is currently open. How do I write the code? I have tried many suggestions that I found using Google searches, but nothing works. Currently I have: Dim ...
2
votes
1answer
411 views

Why do I get an “Type 'IPoint' is not defined” error in VB.NET

I am writing an add-in for ArcMap 10. I am trying to do Dim clickedPoint as IPoint in VB.NET, but I get "Type 'IPoint' is not defined" error. Do I have to import a class or how do I make this work?
1
vote
0answers
245 views

Create IPoint with Lat/Long in decimal degrees and Z in feet

I have written an ArcMap v10 AddIn that reads a folder of geotagged JPEG's and creates a new feature class where each point is the geotag information from on of the JPEG's. The issue is: The GPS ...
2
votes
0answers
24 views

How to implement VisibleBoundsUpdatedEventHandler

I have an ArcObjects add-in button that adds attribute value info as a text graphic into a map document layout. Now, instead of using the add-in button click event, I would like the code to run on ...
0
votes
0answers
107 views

Run time error for GP objects

I have a code with toolbars which I tried to run it in another PC but it failed. I get a run time error "Method Addtoolbox of object I GDispatch failed". The line that the code stacks is the last one ...
3
votes
1answer
369 views

ArcGIS 10 Addin - Code Doesn't Execute on Another Computer

I've created an ArcGIS 10 Addin that consists of a toolbar containing one button and one tool. The button opens a form, and the tool is disabled until the user enters some information on the form. ...
1
vote
1answer
394 views

Creating a SQL query in the ArcGIS Explorer SDK

I am using the ArcGIS Explorer SDK and have run into an issue surrounding a query I would like to perform with SQL. I believe my query is built wrong or perhaps I am looking at the wrong fields. Would ...
3
votes
1answer
324 views

ArcObjects 9.2 SDK: How to intersect two SelectionSets (in-memory pointers) and return a FeatureClass?

[Update] Since posting this question, I've come to the conclusion I'm not fighting flaws in the BasicGeoprocessor object, but more likely having issues with poor object lifecycle management on my ...
1
vote
1answer
307 views

Use field names in combobox

I am currently stuck on a problem surrounding ArcGIS Explorer and comboboxes What I am trying to do is use 3 comboboxes to do the following: View all features contained within ArcExplorer's table ...
3
votes
2answers
514 views

DLL As Embedded Resource ArcMap Add-In? VB.NET

I tried using StackOverflow, but I don't think anyone can answer my question in context(ArcMap Addins). I am currently developing an add-in that needs to load a custom control DLL as a dependency. ...
2
votes
1answer
402 views

ArcMap 10 Layout View: search for elements and delete

I've to regenerate a single layout with data from each point feature. So, I wrote a VB.NET routine to clean the layout, searching for text element, selecting it and deleting it. Well, the routine ...
1
vote
1answer
2k views

Add Attritube Field to Combo Box on Form

I am trying to create a user box that: When the button on the toolbar is clicked, a user form appears with a combo box filled in with a feature's location (Taken from the attribute table - such as ...
3
votes
3answers
378 views

Enable Add-In Button if One Feature is Selected from Specific Layer

I am trying to enable an add-in button on my toolbar if only one feature is selected from a specifc Layer. For example, when ArMap loads, the button should be disabled. If the user selects one feature ...
5
votes
2answers
304 views

Why esriSpatialRelTouches relation does not work?

I have two feature layers. The first one is just a polygon and the other one consists of a series of polygons which are enclosed by the first one. Thus, some polygons of the second feature layer touch ...
2
votes
0answers
95 views

How to solve a filename conflict problem?

I use a procedure to remove and delete a feature layer with a certain name. Then, using another procedure which is called during the run time of the program (as the remove and delete procedure as ...
1
vote
1answer
186 views

ArcGIS - ICommandBars exception

Testing my VB.NET 2010 app in ArcMap an exception occurs when ICommandBars is instantiated. ' zoom to selected Dim mxApp As ESRI.ArcGIS.Framework.IApplication Dim numUID As UID = New ...
0
votes
4answers
309 views

How to solve a run-time error in Thiessen polygons command line

Well I revise my post by giving more information for my problem hoping I may get some help please. I call Procedure 2 from a loop that is within Procedure 1 (see below). The program stacks in the ...
0
votes
0answers
354 views

How to solve a Run-time error 91?

I have a function which a part shown below. The problem is that I get a Run-time error 91 (object variable or with variable not set) and the debug highlights the last line of the code ( Set ...
5
votes
2answers
2k views

Remove Shapefile lock

I have an ArcObject Dissolve procedure that creates a shp in a directory. This dissolved layer is a temp layer and is not added into ArcMap. I would like to delete it when the user clicks a button ...
0
votes
1answer
466 views

Exception from HRESULT Error - Update Attributes

I have a form that allows users to update attribute information for selected features...but I'm recieving the error: "Exception from HRESULT: 0x80041051" when it tries to update the data. I'm using ...
1
vote
1answer
194 views

Can I modify the “value” field of a raster attribute table?

Can I modify the values of the "Value" field of a raster attribute table and if yes how? Thanks Demetris
1
vote
2answers
388 views

ArcMap 10 How to create a tool to use with a Vb.Net script?

I have a VB.net scrip that I would like to run from the toolbar. In VBA, you would create a buttton that would collect the xy coordinates and pass the variables to the script for running. I can't ...
1
vote
0answers
150 views

How can I denote the values of reclassification using variables?

I used the following lines of code to classify a raster. However, my problem is how can I denote the old and new classification values in the last code line using variables? Then number of values ...
3
votes
1answer
376 views

How can I get the coordinates of a grid cell?

How can I get the real coordinates (i.e. X and Y) of a given grid cell when I know its row and column position? Thanks Demetris
2
votes
0answers
104 views

How can I identify the pixel with the maximum value in a grid? [duplicate]

Possible Duplicate: How to find the locations of the highest values in a raster? How can I identify the pixel with the maximum value in a grid and get its coordinates? Any VBA code please?
2
votes
1answer
665 views

find path where add-ins are installed

I see that my add-ins are installed to C:\Users\Me\AppData\Local\ESRI\Desktop10.0\AssemblyCache{6C90269B-D233-4122-3747-C2AE1131E22C} Is it possible to find that file path from within the Add-in ...
13
votes
5answers
2k views

How can I find the farthest point from a set of existing points?

I have a set of points as a shapefile and I want to find (the coordinates) of a new point which will have the longest possible distance from each of the existing points. Is that possible? If yes, is ...
13
votes
2answers
2k views

How can I create weighted Thiessen polygons?

I have a point shape file and I create Thiessen (Voronoi) polygons programmatically using this scripting syntax: CreateThiessenPolygons_analysis (in_features, out_feature_class, fields_to_copy) ...