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

learn more… | top users | synonyms

14
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
3k 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) ...
10
votes
4answers
474 views

Does SHAPE_Length take into account elevation values?

Does the Shape_Length attribute take into account the elevation? For instance, if I have 3 points: A, B, and C A.X = 10 A.Y = 10 A.Z = 10 B.X = 10 B.Y = 10 B.Z = 50 C.X = 0 C.Y = 0 C.Z = 10 Then I ...
9
votes
4answers
2k views

Connecting line features and determining the length of the longest line

I have a line feature (see image) representing a river that I created using the Stream_to_Feature tool. The attribute table contains several records representing different lines - the problem is the ...
6
votes
4answers
883 views

Deriving separate polylines from coded points using ArcObjects (Figure inside)

I have a single point featureclass that represents the left and right sides of a landform (the points are coded as either 'right' or 'left'). Visually I can pick out and digitize two lines along these ...
5
votes
4answers
368 views

Migrate in a new programming GIS language

The last five years I have been working with VBA and ArcObjects for developing a specific application within ArcGIS. That project that began around 2008-2009 carried out with VBA and ArcObjects which ...
5
votes
1answer
2k views

Selecting the MAX value from a feature using ArcObjects?

I have a feature (point) with a field called 'Sequence'. The values in this column range from 1 to n. I can use IQueryFilter to get the first value, 1. Dim pQry As IQueryFilter = ...
5
votes
2answers
329 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 ...
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 ...
5
votes
1answer
256 views

Spatial Query works while stepping through debugger but not otherwise

ORIGINAL POST: I'm not actually sure whether this is a VB.net problem or an ESRI problem...but given the number of really odd ESRI quirks I've encountered, my money's on the latter... I have a piece ...
4
votes
4answers
1k views

Exploring ArcObjects through C# or VB from Python background

While I understand that this may be off topic to an extent, I am in a bit of a bind and could use some help directing my thought process and research. I have little programming background aside ...
4
votes
3answers
227 views

How to number polygons according to their spatial relationships?

I have, for example, this layer in postgresql (polygons): table : poly (objectid: integer, num: integer, shape: geometry) I want to enumerate the polygons from left to right and top to bottom ...
4
votes
4answers
3k views

Sum the values of a single raster and output the value as a number?

I have a floating point raster and have applied a conditional to it in order to only extract the positive values, so there are 'no data' "holes" in the raster. I simply need to sum the values from ...
4
votes
2answers
481 views

Is IPolygon2.QueryExteriorRingsEx Method not working in ArcGIS version 10.1 SP1?

I am updating my addins from 10.0 to 10.1 and my code is crashing on the IPolygon2.QueryExteriorRingsEx Method. I understand there is something strange going on with this method because Developer ...
4
votes
2answers
2k views

How do I change the targeted .NET 4.0 Framework to version 3.5 in an existing VS 2010 EXPRESS project?

I am upgrading from ArcGIS desktop 10.0 to 10.1 and I have a bunch of addins developed in VS 2008 Express using ArcObjects 10.0. I would like to upgrade everything to 10.1 using VS 2010 Express. I ...
4
votes
2answers
945 views

Problem creating a point IFeatureClass

I'm trying to create a point IFeatureClass, but my code doesn't work. Public Function CreatePointFeatureClass(ByVal featureClassName As String, _ ByVal ...
4
votes
1answer
299 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 ...
4
votes
1answer
604 views

Visual Basic editor command icon is always disabled

I recently installed ArcGIS 9.3 in a PC with Windows 7.0. I opened an existing mxd file within which I developed some toolbars for a project. Each icon of a toolbar has behind it a VBA and ArcObjects ...
4
votes
1answer
653 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 ...
4
votes
1answer
1k views

Filtering a raster by pixel cluster size in ArcGIS?

I have a raster image representing islands in a river (see image) created using the following process: 1) Clip a water surface DEM and watershed DEM by a bounding polygon (waters' edge). 2) Subtract ...
4
votes
0answers
324 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 ...
3
votes
3answers
401 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 ...
3
votes
1answer
396 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
3
votes
2answers
926 views

ArcObjects VB.Net - Editing in Geodatabase

Greetings, I have a script in VB.Net for grabbing values from one feature and assigning them to another. It works fine on shapefiles, but upon importing the same shapefiles into a file geodatabase, I ...
3
votes
1answer
394 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? ...
3
votes
2answers
651 views

How to loop through an array of point features?

I have a set of point features and I wish to find the points that have common coordinates. Now I changed the code as shwon bewlo by using the IPoint and the compare method through a function. I have 2 ...
3
votes
1answer
46 views

Is extrusion of a line (which is curved) into a plane at a certain angle possible in ArcGIS?

I have a polyline shape file which is a fault trace on earth's surface. I want to extrude this into a 3-D plane at a certain angle (which is dip angle of the fault). However, the extruded plane ...
3
votes
2answers
324 views

ArcObjects Geoprocessing Failures

I am working on launching the GenerateNearTable using the ArcObjects Assembly method. I have the advanced license (10.1), so the tool is available. The code to launch geoprocessing is: Private ...
3
votes
1answer
249 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
83 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 ...
3
votes
2answers
571 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. ...
3
votes
1answer
130 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 ...
3
votes
1answer
389 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. ...
3
votes
1answer
339 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 ...
3
votes
1answer
477 views

Unable to create temporary GeoDatasets in g_g_g folders

I am converting a VBA macro that was written for ArcGIS 9.3 to a VB.NET project using the ArcGIS 10.0 .NET SDK. I am getting the following error whenever the code tries to create a temporary ...
3
votes
2answers
773 views

Add-in; Failure to get code to execute when toolbar button pressed

I had written several VBA routines for ArcGIS up through v9.3 and have since upgraded to 10. Since VBA will be a thing of the past in the next version, I downloaded and installed VB Express 2008 and ...
3
votes
1answer
229 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 ...
2
votes
1answer
466 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?
2
votes
2answers
1k views

ArcObjects: Getting the properties of a layer that has lost its data source (VB.NET)

When you save an ArcGIS map document (MXD) and then change the data source of a layer in the MXD, you can no longer see the layer in the MXD and you must redefine its data source. But suppose you ...
2
votes
5answers
2k views

Programmatically calculating the length of all polyline features in a featureclass

I've come across this issue a few times and have not yet found an agreed upon solution on any forum. Simply put, I have a featureclass containing many polyline features. I would like to calculate the ...
2
votes
1answer
1k views

ArcMap Geoprocessing vba code/tool - smooth polygon

I would like to execute the smoothpolygon tool within ArcMap vba and I'm having some trouble defining the parameters syntax for the tool. I'm getting this error below: ERROR 000622: Failed to execute ...
2
votes
1answer
116 views

Writing an algorithm to find the most efficient line angle at which to draw lines

I've written a tool that fills a polygon in ArcMap with parallel lines at a user specified distance apart and at a user specified angle, written in vb.net and arcobjects. What i'm looking to do next ...
2
votes
3answers
575 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 ...
2
votes
1answer
357 views

How to use nested loops with cursors?

I use the following nested loops to read the first point feature of a dataset and the rest points in that dataset. Then read the second point feature of a dataset and the rest points in that dataset ...
2
votes
1answer
372 views

How to cast SDE table to IFeatureClassLoad

How do you cast an SDE table to IFeatureClassLoad using ArcObjects? I'm getting an error with this attempt below which is not the correct method: Dim pSDEFeatWksp As IFeatureWorkspace = ...
2
votes
1answer
650 views

Create data table in geodatabase

Using vb.net, my custom tool needs to create a data table in my geodatabase to store some information for later use. The user will be in ArcMap 9.3.1 with the geodatabase up and layers displayed. I ...
2
votes
3answers
318 views

How to calculate Polyline length in kilometres without changing projection from WGS84 (using ArcObjects)?

I have Road (polyline) feature class and I wish to find those roads whose length are greater than 500 kilometre. The feature class projection is in GCS_WGS_1984 and I do not want to change the ...
2
votes
1answer
579 views

arcgis server 10, .net web api samples

i am running arcgis server 10, installed visual web developer express 2010 edition, now wanted to run samples from arcgis.com for .net web api, for example the following one ...
2
votes
2answers
3k views

VBA to VB.NET (Visual Studio 10) Migration - ArcMap Focus

I will be migrating several VBA applications currently in ArcMap 9.3.1 to Visual Studio 10 in the near future, and wanted some feedback on the general migration steps listed below. I wanted to make ...
2
votes
3answers
216 views

How to find duplicate nodes in feature class using ArcObjects?

I am unable to find duplicate nodes in a Road network through my program. I have a polyline feature class as Road, and i want to find duplicates nodes in it. How can I generate a report of duplicate ...