(Visual Basic for Applications) A subset of Visual Basic that provides a common language for customizing Microsoft applications.

learn more… | top users | synonyms

2
votes
1answer
272 views

Syntax for ArcGIS ICalculator object?

I have a code snippet that I can't figure out: 'Define a calculator for NewArea field pCalculator = New Calculator With pCalculator .Cursor = pCursor .PreExpression = "Dim ...
1
vote
0answers
14 views

Google Earth 1.0 Type Library Missing

I've been running Excel to Google Earth Dashboards for some time through VBA on Windows 7 and Excel 2010. However, I have just tried to copy one of my workbooks to a Windows 8.1 machine on Excel 2016 ...
2
votes
3answers
2k 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 ...
3
votes
0answers
30 views

Exporting ActiveView to Jpeg using ArcGIS 10.2.2 fails

I have some legacy VBA code that exports the activeview to a jpeg, which needs to be updated, so it can be used in ArcGIS Desktop 10.2.2. The application uses the following code Option Explicit ...
2
votes
3answers
1k views

ArcObjects and non-spatial table?

I am a new Arc Objects user, with little ESRI experience. We are using VBA to create a spatial report on a Map Control using a mdb table. The mdb table contains a Lat and Long field, and this data is ...
2
votes
3answers
2k views

Collapsing layers in ArcMap Table of Contents using ArcObjects?

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 other. Some of the layers might be grouped, and ...
2
votes
1answer
100 views

Convert 5 digit serial date to mm/dd/yyyy

I have imported a table from Excel that has one field (StartDate) to hold dates. When I imported the table it into ArcMap, the date values in that field changed from DD/MM/YYYY to a 5-digit number, e....
0
votes
1answer
669 views

ArcGIS 9.3.1 VBA: Unable to loop through datasets using 'ILayerGeneralProperties' when raster catalog is present

I have a simple project which involves the use of several buttons in order to make various datasets visible depending on which category is required at the time. It works fine using the popular ...
1
vote
2answers
179 views

Accessing PAT,NAT of coverages using arcobjects

I want to access the polygon attribute table (PAT) and node attribute table (NAT) of an arcgis coverage using arcobjects VBA, is this possible?
1
vote
1answer
2k 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
616 views

Editing attribute table with VBA? [closed]

I am a newcomer to coding. My task is to create a code snippet that enables the user to edit values (rows) in the attribute table. My attribute table consists of points with basic information such ...
0
votes
1answer
515 views

Focus ArcMap application Window VBA

How would you focus your ArcMAP application window using VBA? I have a script that runs and selects polygons and zooms to them, but I would like ArcMap to focus and come to the front at that point. ...
0
votes
1answer
640 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 ...
1
vote
2answers
727 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 ...
0
votes
1answer
409 views

Seeking guidance for ArcGIS customization with VBA

I am looking for guidance, suggestions, tips, or insights in performing a sequence of operations using VB macros for ArcGIS. A) Creating a new table How to write a macro in VB that creates a new ...
2
votes
1answer
550 views

Adding ILayer to IMap in ArcGIS Server?

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 ...
2
votes
2answers
1k views

Copying Symbology between layers with different numbers of features

I am working on copying a layers symbology to a number of other layers which have the same geometry, table structure etc, etc but not the same number of features. I have a state wide layer and I ...
1
vote
1answer
2k views

Creating Thiessen Polygons (Analysis) by defining external feature boundary?

Although this issue has been addressed in this post some months ago: Thiessen Polygon delineation within a Feature, the appropriate answer has not been given. So, new ideas are welcome. My question ...
2
votes
2answers
837 views

Topological relationship between two polygon feature layers in VBA and ArcObjects? [closed]

I have two polygon feature layers: one representing land parcels and one representing roads. Some land parcels (polygons) coincide with a part of a road (another polygon feature). How can I check ...
0
votes
1answer
299 views

Modifying “value” field of raster attribute table using ArcObjects? [closed]

Can I modify the values of the "Value" field of a raster attribute table using ArcObjects, and if yes how?
1
vote
0answers
323 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 ...
0
votes
0answers
187 views

How to make sure OnSketchFinished always works?

In my VBA application I have a listener set up that listens for OnSketchFinished, when the polygon is created a message box appears and then a userform. My problem is that the listener will work 90% ...
2
votes
1answer
93 views

x, y to decimal degrees on mouse click in ArcObjects?

I am converting an old VBA code I used to use in ArcMap 9.2, into VB.NET for ArcMap 10. It should extract x, y coordinates from OSGB and converts to decimal degrees while copying to clipboard. I ...
3
votes
2answers
655 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 ...
3
votes
2answers
6k views

Updating selected feature/record using ArcObjects (VBA)?

I would like to edit a selected feature/record via ArcMap vba, but I'm not having much luck with this code sample (see code below). I'm not getting an error, but the record selected is not updating. ...
1
vote
1answer
1k views

Creating perpendicular polylines of specified length that retain attributes of original polylines using ArcObjects and VBA?

I am using ArcGIS 9.2 and am desperately trying to create perpendicular polylines to existing polylines that I have. I would want the perpendicular lines to cross the original lines at their midpoint ...
4
votes
1answer
905 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
2k views

Running VB scripts in ArcGIS Desktop?

Some questions about VB scripts: Can I read and modify the code of a VB script? If the answer is yes, how can I do it? How can I run a VB script? Can I use it as a VBA code eg.using variables ...
5
votes
1answer
4k views

Recording frequency of names in the attribute table?

I have a question with ArcGIS 9.2. In an attribute table the column [name] includes the name of every place in this layer. Next to that (in columns [numbers]) there should be recorded how often a ...
1
vote
2answers
147 views

“CountIf” or alternative function in ArcMap field calculator?

Within ArcMap 10.3 field calculator, I am looking to count the number of features in a column that match the current value, and output that count. Ideally, the output would look like this: Number &...
5
votes
2answers
5k views

VBA code to edit and add azimuth values to attribute table

I have a point shapefile. I made a button that finds the best fit line for selected points and calculates the azimuth of it (zero degrees being the east). Is there a way I can add something to the ...
4
votes
1answer
1k views

Creating adjacency matrix of topology graph of ArcMap for shortest path using ArcObjects? [closed]

I have created a topology graph of a polygon feature and I want to find the individual FIDS of the lines of the polygon. I want to construct an adjacency matrix to create the shortest path. How can I ...
1
vote
0answers
57 views

How to rearrange FID numeration programmatically

I've got a feature class Now, I delete the selected features programmatically using pFeature.Delete : Is there any command or function in VBA which rearranges the FID field and makes the ...
1
vote
1answer
48 views

Can't fill the attribute table programmatically

I've got a shp-file, here is it's attribute table: It's easy to fill the attribute table of some pFeature programmatically if I get the feature from cursor: For example, "RECNO" Field(3) has a ...
0
votes
2answers
165 views

Merging features into single programmatically

I have a shapefile with polygons. I can merge them manually by going into edit session and, selecting a some features to be merged, and then using merge button under Editor. How to do this ...
1
vote
2answers
216 views

How to get a Layer as ILayer (ArcObjects)

I had asked this question previously which I think will work. But as I am new to this, I can't figure out how to get a Layer as an ILayer object to pass to the method that's in my previous questions ...
5
votes
1answer
5k views

Using VBA in ArcMap field calculator?

I am trying to use ArcMap's Field Calculator to populate values in a column based on a value in another column. So, in pseudo-code: if [field1] = 'Foo' set [field2] = 'Bar' endif Something like ...
2
votes
3answers
684 views

Verifying that ArcInfo Workstation is Installed?

What is the best way to verify that a machine has ArcInfo Workstation installed? A code sample in VBA, VB or C# would be great!
0
votes
2answers
88 views

Any extention Open File Dialog

GetOpenFilename doesn't work in arcobjects VBA, so I have to use pGxDialog. Standard pGxDialog doesn't let to open any file I want, a few extentions are available only (shp, dxf, xls...). Maybe, I ...
1
vote
2answers
54 views

How to get the geometry type FIELD value of attribute table?

The problem is: I need to copy every cell's value of attribute table of some feature to string array. I do it by assigning cell's value to string variable StrBuf one by one. To check the result the ...
1
vote
2answers
58 views

How to get the Features of FeatureCursor?

I am unsure how to correctly use IFeatureCursor.NextFeature method. I've selected a few features: I need to assigne the selected features into few pFeature variables (pFeature1, pFeature2, ...
1
vote
1answer
554 views

Running ArcMap Addin Button with VBA from MS Access form?

I am using ArcGIS Desktop 10.0. I need a way to execute an ArcGis-Addin (vb.net) from a MS-Access database form (VBA). The problem is that there is no ESRI.ArcGIS.Desktop.Addin reference in VBA and ...
2
votes
2answers
444 views

Converting personal geodatabase feature class to coverage using ArcObjects? [closed]

how to convert personal geodatabase fatureclass to coverage using arcobjects with vba pls provide me any documentation or samples.
-4
votes
1answer
458 views

Creating multipart polygon using ArcObjects 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. I am using ArcObjects in VBA or VB.NET
0
votes
1answer
63 views

Setting color to line layer using VBA in ArcGIS Desktop?

I am getting the compile error at pcolor.RGB. I want to add a color to the line feature. How to modify the code? Public Sub surya() Dim pmxdoc As IMxDocument Dim pstylegallery As IStyleGallery ...
2
votes
2answers
543 views

Route hatch labeling as stations (0+00) with vba

I have a route feature which I have set up to label every 500' with the distance along the line. I'd like to use typical stationing format (000+00). I've been using the following VBA script: Function ...
0
votes
0answers
145 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 IGDispatch failed". The line that the code stacks is the last one ...
3
votes
1answer
107 views

How to sort attribute table using ArcObjects/VBA code?

I'm using ArcMap 9.3. Shift the rows order display (ascending/descending) for a given field is as simple as double clicking on the screen. However I'd like to know how to perform this simple ...
0
votes
0answers
155 views

Drawing polylines with angle and distance using vba

I am new to arcobjects using VBA. I have a point feature, and i want to draw polyline using point feature as starting point in desired direction and distance. And I have to draw second line basing the ...
0
votes
1answer
76 views

Vba Cons Numbers [duplicate]

I want to make a list of cons numbers(ex. 1,2,3...) in field calculator (VBA). When I am putting for example: (dim d d=[field]+1). The result is all my fields are =1. How to solve this arc map (vba).