2
votes
2answers
92 views

How to use IFeatureCursorBuffer in VBA

I tried to use IFeatureCursorBuffer to create and dissolve the buffered features.I am trying to get the solution since some days using dissolve and UnionOverlappingBuffers, but not being able to get ...
2
votes
2answers
283 views

Create a Line FeatureClass from IPointCollection

I want to create a new line layer from a point layer. I store the points in an IPointCollection. I want to use that IPointCollection to create a line IFeatureClass. I know how to create a single ...
1
vote
1answer
155 views

Getting Coordinates from a feature with VBA

Is there a way to get the longitude and latitude coordinates from a feature class? I have some code which can select the first layer in the Table of Contents. I want to be able to get the lat./long. ...
0
votes
1answer
48 views

Finding points in extent using VBA

Is there a way to select a point from my map's current extent? I want to use ArcObjects to tell me if there is at least one point visible in my extent. I'd like to do this entirely in VBA, and without ...
1
vote
1answer
155 views

Opening an InMemory Table and execute some SQL

I have a InMemory that gets created, what I then want to do is run INSERT, UPDATE and DELETE queries on the table. The code i have at the moment is below, I create a new InMemory table, add it to the ...
1
vote
1answer
136 views

Software program (or spreadsheet calculations) to find Borehole Deviation?

I was given a bunch of surveyed borehole data (azimuth, depth, dip, geology, etc) and am required to calculate a deviation variable. Besides querying the data and averaging the surveyed borehole ...
1
vote
0answers
85 views

InsertFeature on a versioned layer [vba]

I am writing an application that takes data from an Excel Spreadsheet and loads it into an ArcSDE feature class. The Feature class is editable within ArcMap, but I am having trouble inserting a ...
1
vote
0answers
142 views

Quering a ArcSDE featureclass attribute table after joining

I am trying to query a ArcSDE Feature Class after joining using Iqueryfilter I have two SDE feature classes. 1) Subdivisions : which has details of subdivision and districts (parent) 2) ...
1
vote
0answers
56 views

Joining a In_memory table with an SDE table

I have a in memory table that gets created, and want to join it to a table from SDE. I have tried the following code. Private Sub JoinTables(sdetable As ITable, inMemoryTable As ITable, joinField As ...
1
vote
2answers
571 views

Get Number of Rows, ArcObjects (VBA 6.0)

I am sorry to bother with what may be an easy question for most of you but i am new to ArcObjects (VBA 6.0) in ArcMap (ArcGIS 10.0) and i am really struggling here. I am trying to count the number of ...
3
votes
0answers
293 views

VBA Convert decimal degree to Meters button

I have 2 data frames one which has WGS data in it and the other OSGB1936. I am trying to create a button where the user can input decimal degrees (WGS) and it will zoom them to that location in ...
1
vote
1answer
174 views

ArcGIS10 VBA requires library references

I just upgraded from ArcGIS 9.2 to 10.0, and I'm trying to create some tools using VBA. It doesn't recognize any of the ArcObjects Classes, Interfaces, or Constants unless the reference includes its ...
1
vote
0answers
40 views

Opening New mxd into existing mxd from command button on form in VBA [duplicate]

Possible Duplicate: How to define Subroutines and functions? I am programming a dialog box in VBA because Python does not have one yet!! The action that needs to occur is for an mxd to open ...
1
vote
2answers
240 views

How to define Subroutines and functions?

I am working in VBA. My error is sub and function are not defined. Here is my code: Private Sub CreateMap(cboDistrict As String) Dim mapDocument As New mapDocument If ...
-5
votes
2answers
241 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.
2
votes
1answer
350 views

Using IBufferConstruction to create single and multiple buffers (VBA and ArcObjects)

I need a bit of help with using the iBufferContruction interface, my overall goal is that the user clicks on the map, a graphic is created and then buffered,at multiple distances and then stored in a ...
1
vote
1answer
160 views

How do i get ArcObjects not to ignore a layer definition that has been set?

I am creating a simple text search application, where the user can enter an address search and the result appear in a listbox, which they can then select it and zoom to the address. Now the problem I ...
1
vote
1answer
525 views

How do I delete specific graphics on the map using arcobjects

I am writing a small application that allows the user to click on the map, and it will create 3 buffers (these are graphics using the IElement interface) at specified distances. What I want to do is ...
1
vote
1answer
75 views

generating some random points along network

I'm having trouble with generating some random points along a network. I am trying to do it with Arcobjects in the VBA environment. I would be grateful if you could help me.
2
votes
2answers
1k views

How to overwrite a shapefile or feature class using arcobjects?

I can copy a shapefile but I want to be able to overwrite the copied shapefile to prevent multiple copies being created each time I run the program. I would also like for the saving and renaming of ...
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 ...
0
votes
1answer
189 views

Creating a report from features that have been selected

I'm in need of some guidance, I have created an application where the users does the following workflow Enter Postcode Zoom to Postcode Create a buffer at specified distance Spatial Query to find ...
0
votes
1answer
375 views

Focus ArcMap application Window VBA

Very simple question to ask, I haven't been able to figure it out up to now though... How would you focus your ArcMAP application window using VBA? I have a script that runs and selects polygons and ...
1
vote
1answer
289 views

Trouble trying to zoom to graphic (ArcGIS 9.3.1, VBA)

I am writing an application where one of the things it does is create a point then creates buffer (which is a graphic) at the specific point, what I want to do is when the buffer has been created, is ...
3
votes
2answers
451 views

Zoom to Polygon in Arcmap from Access

I am attempting to Zoom from an Access record to a specific polygon in ArcMAP but I can't seem to get the function to work. The field in Access is identical to the field in arcmap. I.E. they both ...
2
votes
1answer
2k views

Creating a featureclass in memory and adding to the map error

I have the code below, which is supposed to create a new featureclass in memory then add the FC to the map, but I get a Automation error when I use the createfeatureclass method Set pFC = ...
2
votes
1answer
187 views

How to use ITransform2D on dimension features (arcobjects)

I am trying to move a dimension feature inside a personal geodatabase using ArcObjects VBA. I was able to move other types of features using similar code as shown below. However it is not working for ...
0
votes
1answer
400 views

How to edit my attribute table with VBA

before I start you should know that I am a bloody newcomer when it comes down to coding. I am sitting on some university tasks regarding VBA and ArcGIS: My next task is to create a code snippet that ...
2
votes
3answers
530 views

How do I zoom to the overall extent of two (or more) selected features from two layers?

I am creating an application where the user picks a value from a combo box, the application then selects that feature and then selects the corresponding features from a second layer, (both selections ...
1
vote
1answer
1k views

How to get the “queried” value from attribute table and put it in a textbox?

I am new in VBA, I have a problem about querying an attribute table....: I have a table of a layer (wish.shp) with the fields: owner_ID, Value, Area. I made 3 textboxes in a userform, I input the ...
0
votes
1answer
294 views

Cannot run toolbox model from button

I have a button on my toolbar that when clicked, will run a particular model, I have copied the code from here ...
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 ...
4
votes
1answer
446 views

Can you edit an SDE table via ArcObjects when not added to ArcMap

I have a table that is in SDE, what I want to do is in my userform click on the "Save" button, and the table will be edited even though it is not within the map document. Is this possible? I have ...
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 ...
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 ...
0
votes
0answers
124 views

How to make sure OnSketchFinished always works?

In my VBA application i have a listener setup that listens for OnSketchFinished, when the polygon is created a messagebox appears and then a userform. My problem is that the listener will work 90% of ...
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
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 ...
2
votes
2answers
956 views

Collapse layers in ArcMap Table of Contents using ArcObjects

Can someone offer up a Christmas present here? I'm stuck on how to collapse all layers in my ArcMap projects (9.3). I've tried a few bits of sample code, but they all seem to fail for some reason or ...
1
vote
0answers
227 views

Extract by mask run time error in VBA

I have the following script language code shown below within a main code just to run the tool of spatial analyst "Extract by mask". Unfortunately, when I run it I get a Run Time Error. I checked file ...
3
votes
1answer
375 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?
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) ...
6
votes
2answers
433 views

How can I add a new field in a raster attribute table and loop through it?

I am working with an existing raster attribute table. I wonder how can I add a new field to it and then loop through the existing records to populate this new field? Of course I have done this many ...
0
votes
1answer
473 views

Going round in Circles..Buffering/ArcObjects/VBA

I've just started learning VBA and Arcobjects, and at the moment just playing around tyring to do different things. What i am trying to do is Click on a tool, and allow the user to put a point ...
4
votes
1answer
583 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
333 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
604 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 ...