Skip to main content

Questions tagged [vba]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
463 views

Solving run-time error in Thiessen polygons command line

I call Procedure 2 from a loop that is within Procedure 1 (see below). The program stacks in the line that creates Thiessen polygons i.e. GP.CreateThiessenPolygons_analysis.... That line is ...
1 vote
2 answers
91 views

Using MapBasic Layout

I'm trying to create a Layout window in Vb6 using MapInfo 2021 but the Layout function in this version seems to not be functioning as the older versions. In MapInfo 10.5, a layout window could be ...
1 vote
2 answers
4k views

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

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 ...
1 vote
1 answer
94 views

MapInfo Decimal Coordinates

I'm trying to take the coordinates from a map in Mapinfo through a vb6 application through the commands: x = CommandInfo(CMD_INFO_X) y = CommandInfo(CMD_INFO_Y) The data called is supposed to have 6-...
0 votes
0 answers
21 views

MapInfo Print StatusBar

Is there a way to directly print the information from the MapInfo Statusbar to like a .txt file or to be used as a string for either mapbasic or VB6?
0 votes
0 answers
38 views

MapInfo 64bit Statusbar

I'm working on an application that involves VB6 and MapInfo. I have two sets of application, one 32-bit (MapInfo 10.5) and one 64-bit (MapInfo 2021) with nearly the same set of code. The 32-bit works ...
2 votes
2 answers
819 views

Create a dbf table by copying the structure of another dbf table

I have a dbf table and I wish to automatically create another dbf table with a different name but with exactly the same structure i.e.fields as the existing table. Is there any ready code in VBA and ...
1 vote
1 answer
1k views

Creating a graph from a Field values (VBA ArcObjects)

I have a combobox that shows all fields of a shapefile. I want to get these values programmatically in a label--Count, Minimum, Maximum, Sum, Mean, Standard Deviation--and populate a graph of the ...
-1 votes
1 answer
102 views

Generating random points along network using ArcObjects [closed]

How do I generate some random points along a network? I am trying to do it with ArcObjects in the VBA environment.
1 vote
1 answer
1k 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?
2 votes
1 answer
3k views

Call tools from ArcToolBox in VBA form

I am now looking for a code in VBA that can call Tools from ArcToolBox(The little red box) I have find a Arcobject code(I thought it's can run under VBA) but it's don't work! I have to delete the URL ...
1 vote
1 answer
418 views

VB ArcGIS 9.3 - Move column to the left [closed]

I'm trying to move text that is not aligned to the far left of the column due to programmer input. I'm trying to figure out the VB coding for it, but nothing seems to happen in the Attributes table (...
11 votes
1 answer
695 views

Extracting all points within a certain distance and height difference from a Raster

I have a raster containing tens of millions of points all with X, Y and Z data defined. I need to figure out a simple way to extract and create a new raster or vector with ALL points at a 720 m ...
0 votes
0 answers
444 views

Querying ArcSDE feature class attribute table after joining

I am trying to query an ArcSDE Feature Class after joining using Iqueryfilter I have two SDE feature classes: Subdivisions : which has details of subdivision and districts (parent) Districts: ...
1 vote
1 answer
1k views

Disabling/overriding internal arcmap commands with VBA

I am creating a template for ArcGis JTX. This is a mxd file, with a vba onload event handler which removes some functionality from vanilla ArcMap. I'm stumped on one problem: double clicking on a ...
1 vote
1 answer
1k views

Creating custom forms in ArcMap

I am hoping to make a custom form within ArcMap 10.3 where the end user can select a recently digitized shapefile (or feature), and enter values of specific attributes through a custom form. This form ...
3 votes
1 answer
787 views

Saving VBA customization to Normal.mxt

I have experienced problems with saving VBA customization to a Normal.mxt document within ArcGIS 10. I have a set of VBA macros developed originally within 9.3 version of ArcGIS that reside in a ...
0 votes
1 answer
117 views

Ordnance Survey coordinates mismatch when converting from Lat/Lon

I have incorporated the batch Lat/Lon to OSGB option in Excel. The source file was on the main Ordnance Survey website: https://www.ordnancesurvey.co.uk/business-government/tools-support/os-net/...
18 votes
7 answers
17k 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 ...
11 votes
5 answers
36k views

Snapping points to lines in ArcGIS Desktop and automate using VBA?

I use ArcGIS Desktop and I want create a network with a point feature and a line feature. I need my point features to be on the line features so I should do Snap point to line. However, I do not ...
2 votes
0 answers
478 views

How to read the Microstation element attribute values from .Net C#?

I am using following code for read the element attribute from index.But it shown the error like Unable to cast object of type 'System.Object[]' to type 'MicroStationDGN.DataBlock[]'.Is there any ...
2 votes
3 answers
1k views

Using VB/Python script to populate field with maximum value among other fields [closed]

I am using ArcGIS 10. I have a little experience with python but i feel that python in ArcGIS is slightly different. VB will work fine as well. Problem: I have n different columns called 'percent_1',...
0 votes
2 answers
349 views

Creating a report from features that have been selected [closed]

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 ...
3 votes
1 answer
4k views

Creating feature class in memory and adding to map using ArcObjects

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 = pFeatWS....
-1 votes
1 answer
16 views

While Runing the Code Showing Error on "pCalculator.Calculate"

Private Sub CommandButton1_Click() ' Part 1: Define the feature class. Dim pMxDoc As IMxDocument Dim pFeatureLayer As IFeatureLayer Dim pFeatureClass As IFeatureClass Dim name1 As Variant Set pMxDoc =...
-2 votes
1 answer
47 views

Return highest number from a list of coded numbers [closed]

I'm trying to make a button in ArcMap that returns the highest number from a list of coded numbers we have for our manhole layer. The structure of the coded values is as follows "0010010001". This ...
0 votes
1 answer
418 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 http://resources.esri.com/help/9.3/ArcGISEngine/com_cpp/samples/com/Geoprocessing/...
3 votes
1 answer
1k views

Calculating Sinuosity Using ArcGIS Field Calculator

Trying to calculate sinuosity via Field Calculator (ArcGIS v 10.2.2); VBA Pre-Logic Script Code: Dim dblLe as double Dim dblLf as double Dim dblS as double Dim pCurve as Icurve Dim pFPoint as IPoint ...
1 vote
4 answers
833 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
2 answers
546 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 ...
0 votes
1 answer
255 views

VBA/Python If/then statements in Field Calculator for one column based on another not working

I know this question has been asked a hundred times on here, for example: Basic If/Then in Python Parser of ArcGIS Field Calculator? Using if/elif/else statements in ArcGIS Field Calculator? Checking ...
0 votes
1 answer
53 views

VBA Labeling works on some symbol classes but not other

VBA Labeling formatting works on some symbol classes but not others. For some symbol classes it will work but others it won't register the formatting and I can't figure out why! CLR red = '56' ...
2 votes
3 answers
579 views

Software needed to recreate VBA forms using python for Arc 10.0

I'm new to programming and need to convert VBA scripted tools for the 10.1 upgrade. I need to recreate the forms and use Python scripting. How do I do this? I need the form to function in 10 ...
1 vote
1 answer
411 views

Can Geomedia be automated using VBA?

Can I automate Geomedia using VBA? The Geomedia training manual "Fundamentals of Geomedia Development Part 1" talks about automating using visual basic but I do not have Visual Basic.
1 vote
1 answer
1k 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 ...
3 votes
1 answer
424 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 ...
1 vote
2 answers
130 views

ArcPy/Python method to ascertain VBA requirements in mxd

I need to be able to look at an MXD and ascertain if it has any VBA code embedded within it. It's ArcGIS 10.2, and the VBA extension tool is installed on all machines on the estate, but not all mxd ...
17 votes
2 answers
10k views

Create weighted Thiessen polygons?

I have a point shapefile and I create Thiessen (Voronoi) polygons programmatically using this scripting syntax: CreateThiessenPolygons_analysis (in_features, out_feature_class, fields_to_copy) ...
2 votes
3 answers
535 views

"Error in Parcel Selection" in SaeX in ArcGIS 9.3

I am using SaeX extension in ArcGIS 9.3 and whenever i try to select a parcel it gives: Error occured in parcel selection. Other tools are working fine.
5 votes
3 answers
2k views

Where to find books or course materials to help prepare for Esri Technical Certification in ArcGIS Desktop and Developer? [closed]

Where I can find books or course materials to help prepare for Esri Technical Certification in ArcGIS Desktop and Developer?
-1 votes
1 answer
164 views

Learning ArcObjects with VBA and .NET? [duplicate]

I am using arcgis from last 3 years. but it was only limited by button pressing. I want to learn ArcObjects VBA and .NET. Can you suggest me some reference books?
2 votes
2 answers
420 views

Can I use VB to search against an ArcServer service in ArcMap?

I've published an ArcServer service that is going to be consumed by out of the box, standard ArcGIS on the desktop. Is it possible to write custom tools in VB to query layers from that service in ...
1 vote
1 answer
663 views

Using kriging with data in GDB

I have series of data in my GDB I am running the program under VBA and what I want to do is using the data by the tool Kriging. This is what I thought: First, Kriging needs data that must be a ...
5 votes
2 answers
1k 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 ...
1 vote
0 answers
121 views

Pick point X,Y values getting from ArcMap window [closed]

How to pick a point on Arcmap window using with ArcObjects(BaseCommand)? I want to get X,Y values of a point. I have tried to pick point using with below code. but debugging time not showing arcmap ...
2 votes
4 answers
3k 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 ...
1 vote
1 answer
325 views

MS Access/VBA used to open an ArcGIS map document: Map fails to connect to database

I have an MS Access front-end that can be used to open ArcGIS map documents (.mxds). It has a macro that runs an OpenRoadMap() function: Function OpenRoadMap() CreateObject("Shell.Application")...
1 vote
2 answers
3k views

Get Number of Rows, ArcObjects (VBA 6.0)

I am trying to count the number of rows in a feature class attribute table. I have declared a feature cursor which i want to use later in the code to do some processing and field value calculation. (...
0 votes
1 answer
2k views

Opening QGIS using VBA and executing Python script?

Using VBA, I want to open QGIS (the actual GUI) and execute a simple script through the Python console or the editor.
0 votes
1 answer
722 views

Going round in Circles..Buffering/ArcObjects/VBA

I've just started learning VBA and ArcObjects, and at the moment just playing around trying to do different things. What i am trying to do is Click on a tool, and allow the user to put a point ...