An object-oriented programming language from Microsoft. It is the .NET version of the Visual Basic (VB) programming language.
3
votes
1answer
278 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
77 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
159 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
280 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
215 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
179 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 ...
1
vote
2answers
291 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 ...
2
votes
0answers
21 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
89 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
238 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
266 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 ...
1
vote
1answer
248 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 ...
2
votes
1answer
277 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
1k 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
272 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
205 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 ...
1
vote
2answers
2k views
ArcObjects VB.Net - Looping through Layers from TOC and ListBox
Greetings,
I'm creating a tool in ArcMap 10 using a windows form... its been a struggle (maybe some of you recognize the same themes in my questions) because this is the first time I've really messed ...
2
votes
0answers
90 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
137 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
0answers
238 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
1k 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
372 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 ...
7
votes
4answers
1k 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 ...
1
vote
1answer
155 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
0answers
112 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
294 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
103 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?
10
votes
4answers
920 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 ...
4
votes
1answer
433 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 ...
2
votes
1answer
231 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 ...
3
votes
2answers
476 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 ...
2
votes
1answer
428 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
1answer
267 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 = ...
4
votes
1answer
757 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 ...
1
vote
0answers
902 views
Edit SDE table with ArcObjects - continued [closed]
Update
So, I believe I'm getting closer to being able to edit my sde table, however now I'm getting stuck on this line:
Dim updateCursor As ICursor = table2.Update(Nothing, True)
With this ...
10
votes
4answers
347 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 ...
0
votes
1answer
304 views
arcgis server 10, vb.net, IMathOp problem
i am using arcgis server 10 and visual studio with vb.net to build web mapping application. inside my code i have the following line:
Dim RasterCal As ESRI.ArcGIS.SpatialAnalyst.IMathOp = _
New ...
2
votes
1answer
255 views
arcgis server 10, vb.net add reference problems
i am using 'arcgis server 10' and 'visual web developer 2010 express'. now, i opened a 'web mapping application' then wanted to 'add a reference' to 'esri arcmap object library 10.0' it says:
A ...
4
votes
1answer
1k 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 = ...
2
votes
5answers
1k 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
406 views
Adding an ILayer to IMap in Arcgis Server 10
I wanted to add ILayer to IMap, i think it has been added but problem is that it does not display it on the website.
I am running arcgis server 10, using visual web developer 2010 express edition ...
1
vote
0answers
142 views
arcgis server 10, vb.net, non pooled service, web adf
i am running arcgis server 10. i created a A.MXD file, then started arcgis server and successfully added non-pooled service using A.MXD. i also installed visual web developer 2010 express and created ...
2
votes
2answers
689 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 ...
4
votes
2answers
640 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 ...
3
votes
4answers
2k 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 ...
6
votes
4answers
731 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 ...
1
vote
1answer
385 views
ArcObjects DataStat Error
I have some code that adds a bunch of group layers into ArcMap based on a table within ArcMap. The code works fine in VBA, however in VS 2010 I get an error on the "pEnumVar = pDataStat.UniqueValues" ...
2
votes
1answer
481 views
ArcMap Commands .NET code equivalent
What is the .NET code equivalent for this general ArcMap command syntax:
Application.Document.CommandBars.Find(ArcID.Query_ClearSelection).Execute()
I have been using this one below as a work ...
3
votes
2answers
695 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 ...
1
vote
3answers
2k views
ArcMap Form/Button VB.NET MxDocument hook
---UPDATE--- see below
I have a scaling raster tool that I'm attempting to migrate from ArcGIS 9.3.1 VBA to VB.NET (Visual Studio 2010). I have a BaseTool that is used to put two graphic points ...
