Skip to main content

Questions tagged [vb]

Visual Basic (VB) is a programming language created by Microsoft

Filter by
Sorted by
Tagged with
0 votes
0 answers
61 views

ArcMap Field Calculator Expression for Highest Value + 1

I'm looking for a VB or Python field calculator expression in ArcMap that will calculate the Highest Value + 1 into the same field named Corr_ID. I was thinking something as simple as this max(!...
Mercator's user avatar
  • 283
1 vote
0 answers
1k views

Converting VB Script into Python

I have some old VB scripts which an I am wanting to turn them into Python. My old VB code reads If [LAND_TYPE]="RESVE" Then val = [LAND_NAME] elseIf [LAND_NAME] = "UCL" Then val = [...
Vanessa's user avatar
  • 113
0 votes
1 answer
218 views

How to pass a variable in VB codeblock in ArcPy to calculate a field?

How do I pass a variable name - as the variable, not its name as a string - in a VB codeblock when calculating a field in ArcPy? I am using field calculator in a tool I built with Model Builder to ...
user112188's user avatar
0 votes
1 answer
72 views

How to package an image with an Addin so it can be added to page layout?

This post shows the code I'm using to insert an image into the page layout. It works fine, but it's using a hard coded path. Adding picture to ArcMap PageLayout using ArcObjects in .NET? Currently my ...
Mattropolis's user avatar
  • 1,649
0 votes
1 answer
198 views

ArcPy script doesn't work for TRIM function

I have this code: import arcpy import os def massiveTrim (vrb): y=r"shape path" for i in y: campos = arcpy.ListFields(vrb, "", "String" ) for camp in campos: ...
Hemerson Mora's user avatar
0 votes
1 answer
129 views

ArcMap calculate field based on conditional statements for other fields

I have a large dataset of species occurrence records. One field, (call it "Status_Full") contains a string of abbreviations of each designated statutory status for each record. Another field (call it "...
Yusef_S's user avatar
  • 101
3 votes
1 answer
493 views

Python time condition within Calculate Field

I am attempting to assign 0/1 values to each row with a point feature class based upon a time dependent condition with ArcMap Model Builder 10.2.2. The points are categorized based upon a series ID ...
Will's user avatar
  • 151
0 votes
0 answers
121 views

Calculating Field based on Domain Description of Another Field

I am trying to get the description from a field to write to another field. However, When I calculate the new field it gives me the code and not the description. I tried using VB, but I can't seem to ...
Smithw1's user avatar
  • 335
0 votes
1 answer
133 views

How to get the column header of attribute table

I have a simple vb.net code which gets all the layer names present in the ArcMap and displays it in a vb form combobox. My question is if I select a layer name that is present in my combobox it should ...
Ramesh's user avatar
  • 11
5 votes
1 answer
258 views

ArcObjects Convert GxDialog to Workspace

ArcGIS 10.1 with VB2010 I am using the GxDialog to get the users option to save a feature class. The target can be a shapefile, geodatabase, or Dataset inside a geodatabase. I can’t wrap my head ...
sinDizzy's user avatar
  • 437
-3 votes
1 answer
67 views

Using field calculation with vb? [closed]

Could you please help with the code below. dim n if [Flow] <200 then n = -(16.6*Log (30/10.112))*Log ( [Flow] /200)))^2)) else elseif [Flow] > 4000 then n = 42.2+10*(LOG [Flow]) +(33*(LOG( [...
theo's user avatar
  • 1
3 votes
1 answer
133 views

Combine string and OBJECT ID using VB

I am trying to update the FACILITYID field with a String "SWW" and then follow the "SWW" with the OBJECTID field. So I will end up with SSW1", "SSW2" all the way to the end in the FACILITYID field. ...
kbrenn89's user avatar
  • 147
2 votes
2 answers
219 views

Truncating table values using ModelBuilder?

I currently have this table with the "ACT_DATE" field displaying a long string of numbers and characters. I only need the first 4 digits, for the year, and everything else I am attempting to discard. ...
jBuck's user avatar
  • 21
1 vote
0 answers
117 views

What is port used by GPS sensor that comes in tablet? [closed]

Wanted to see: what is the port used by the GPS sensor that comes in a tablet? or I can get the GPS? In a tablet with Windows 8.1 What I want is to get by vb code, the coordinates of my location, ...
nasck's user avatar
  • 11
1 vote
2 answers
279 views

Using Calculate Field to fix hyperlinks in ArcPy gives Cannot use VB for services?

Getting an error while trying to script it, specifically "Cannot use VB for services." Snippet and VB code block as follows: Raw block (works within ArcMap): "\ftp\raw\YYYYMMDD\Files\Charles" +[NAME]...
geodranic's user avatar
  • 485
1 vote
1 answer
70 views

exporting 10.2 .esriaddin to 10.0

I have successfully exported .esriaddin I created in 10.2 Arcobjects SDK to 10.0. The installation succeeded but the problem I am having is that whenever I use the command me.Close() to close the form ...
Daz's user avatar
  • 365
0 votes
1 answer
599 views

Activate / Deactivate customized ITool from Form in ArcObjects?

I'm using ArcGIS 9.3/VB6, and I have a little issue with the activation of a custom Tool: I have a Class, that implements both ICommand and ITool When I click on ICommand, the form is launched First,...
raed's user avatar
  • 133
1 vote
1 answer
454 views

Finding Points where two polylines cross in ArcGIS Runtime .NET SDK?

I am using ArcGIS SDK for .NET and have a graphic overlay defined on my mapview. I added two circles to the map (made with polylines) which overlap. I now need to determine the points at which the ...
Stewart McGuire's user avatar
0 votes
1 answer
306 views

Split by attributes with 2 fields

I am using SplitLayerByAttributes toolbox. It’s a very useful tool for me to process certain activities. As you know, I can split the feature class as per 1 field. What if I want to split the features ...
accedesoft's user avatar
1 vote
0 answers
805 views

ArcObjects Style of a symbol chosen with the ISymbolSelector interface

I am trying to store the properties of a SimpleMarkerSymbol symbol selected by the user using the ISymbolSelector interface. I plan to store the size, colour and style number in a file. I can get ...
John McGlynn's user avatar
1 vote
0 answers
255 views

ArcPad 10 - VBScript Error 800A0046 [closed]

A colleague asked me to install ArcPad 10 on his Trimble JUNO 3B. He runs an application with scripts that produce messages when the GPS is turned off. The script works fine on his Trimble Nomad - ...
user54340's user avatar
4 votes
1 answer
1k views

ArcGIS Operation Dashboard

I am working on ArcGIS operation Dashboard. There is an widget on the top left corner “ Model Manager”. Here the Model manager will read the data from ForecastStage_MPT and ForecastTimePT database ...
accedesoft's user avatar
1 vote
0 answers
172 views

WGS84 to OSGB, using VB script

I have adapted someone else's VB code to convert lat long to OSGB for UK locations. In essence my code converts a Google API location returned from a text search, into Eastings and Northings that can ...
baffle's user avatar
  • 11
2 votes
1 answer
875 views

For Each loop over an Array in MapBasic?

.NET C# developer here. Trying to figure out MapBasic with the IDE for the first time. It's shall we say...a different experience to C# in Visual studio. I have a ButtonPad with a button that calls ...
Hardgraf's user avatar
  • 123
0 votes
1 answer
148 views

add vb6 tool to arcmap 9.2 (on windows 7 64bit machine)

I have a vb6 project which develop a tool for use in arcmap several years ago. And I managed to add the tool in arcmap 9.2 (windows xp) by: In arcmap -> Customize -> Add from file -> choose the dll ...
Maple Li's user avatar
1 vote
2 answers
1k views

Convert code VB to Python

I need to convert this code to be used by python in ArcGIS if [Field_1] < [Field_2] : pd = [Field_1] else: pd = [Field_2]
Salwa Cherni's user avatar
-1 votes
1 answer
412 views

Rewriting VB codeblock as Python for ArcGIS Field Calculator?

I am looking for assistance to rewrite my VB codeblock into Python. Im on Win7, Arc10.2 and Python 2.7 The code below works fine for me, I am simply looking to port it to Python so i can progress down ...
user1995458's user avatar
-2 votes
1 answer
226 views

Converting VB to Python for Labeling in ArcGIS Desktop?

I am using ArcGIS Desktop 10.2.1. I am really new to Python and do not understand VB. I need to convert this VB script to Python. The code is below. It believe it is looking for a numerical value ...
Randy Wolter's user avatar
1 vote
1 answer
243 views

Auto filling a form in arcpad

I am looking to figure out how to auto-fill a custom form at the click of a button. Basically i have a toolbar where if I click the button and a point on the map a form pops up and gives me a bunch of ...
abhinav sharma's user avatar
6 votes
2 answers
3k views

How to delete last part of a string starting from the 1st non numeric character? [closed]

I'm looking for a Python or VB statement to remove the last part of a string, starting where the 1st non Numeric character appears, using the Field Calculator in ArcMap 10. Here's an example of what I'...
astro.comma's user avatar
4 votes
1 answer
2k views

How to write labels with varying significant figures/decimal places?

I have results that range from ex. 113,009 down to 0.00495 - Can someone recommend a way to write/construct a label expression for the following in ArcMap: • If less than 1, use 2 decimal places (...
Michael's user avatar
  • 405
2 votes
0 answers
391 views

How to replace accented strings in attribute tables using Python or VBA ArcGIS 10.2 [duplicate]

I need to replace accented words, into the Field Calculator, to the same non-accented ones. For example: María ---> Maria Need some help with this VB Code: Dim data as integer Dim contador Dim ...
juasmilla's user avatar
  • 479
1 vote
1 answer
275 views

Using VBscript restrict layer editing in ArcPad

I am attempting to restrict editing on certain layers based on the user log in. Dim objLyr1 Dim objLyr2 Dim objLyr3 Set objLyr1 = Map.Layers("PatchPanel") Set objLyr2 = Map.Layers("wHydrant") Set ...
Tom Meismer's user avatar
1 vote
1 answer
246 views

VB Script can't run in Field Calculator

I wrote a simple script in VB. But it failed to run in field calculator. I can't figure out what is wrong with it. Below is a screenshot.
12B01's user avatar
  • 591
2 votes
2 answers
3k views

Need a Python field calculation that works like the DatePart( ) VB Function

I have a field called Abandoned Year (short integer data type) that I am trying to populate with a four digit year from a column called Decommission Date (Date data type). I have done this in the ...
user19300's user avatar
  • 157
0 votes
1 answer
474 views

Extending ArcGIS Desktop using Python vs Visual Basic vs Java? [closed]

I have to extend the features of ArcGIS. I've been asked to create a model written in Python that can run out of ArcGIS 10. This model will have a simple user interface where the user can drag/drop ...
goonerify's user avatar
  • 484
4 votes
1 answer
825 views

Exporting Featureclass to Shapefile with field names changed using ArcObjects?

I have some annotation feature classes stored in a Pgdb.I want to export them to a shape file.Some field name need too be changed in that shape file.I am using vb .net to do this.Any help is ...
Navish's user avatar
  • 109
1 vote
1 answer
1k views

Extracting all field names of a featureclass using query filter programmatically

I want to get all field names present in a feature class using queryfilter programmatically.
Navish's user avatar
  • 109
1 vote
1 answer
690 views

exporting a featureclass to shapefile with selected fields only [duplicate]

Possible Duplicate: How to control which Fields are exported in ArcObjects? (via Field Mapping) I want to export a featureclass to a shapefile.The only condition i want to impose is that ...
Navish's user avatar
  • 109
1 vote
1 answer
693 views

Transforming layout page units to map units using ArcObjects?

I am trying to build an add-in that will create a polygon from the current map extent. This is not a problem in Data View where I can easily get the envelope of an iMxDocument:iActiveView in data view....
Jakub Sisak GeoGraphics's user avatar
3 votes
1 answer
1k views

Executing ArcMap AddIn function when there is mouse click on map?

I am developing an add-in for ArcMap 10.0 where I need to execute code when there is a click on the map open. How do I do this? I am using VB in Visual Studio 2010. I also need to get the coordinates ...
Xoph's user avatar
  • 129
1 vote
1 answer
464 views

Use field names in combobox [closed]

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 of ...
Cody's user avatar
  • 300
1 vote
2 answers
530 views

use existing function in arcmap use VBA in Arcobjects

I have a UI tool button, I would like to get and use the existing function (select elements tool) in Arcmap when I activate this button, does anybody know that how to call the existing function using ...
Emma's user avatar
  • 41
2 votes
0 answers
281 views

how to buffer a raster cell using Visual Basic ArcObjects in ArcMap [closed]

I am new in visual basic, I have a question about creating a buffer zone based on a raster layer. I have a raster layer named "Value_Raster", I have a textbox in the userform, I also create a tool ...
Emma's user avatar
  • 41
1 vote
0 answers
468 views

Moving GPS Points with a VB script - Bearing works well but distance is wrong

I am using a script I found online created in 2003 by one of the commentators here. It is a great script and exactly what I have been looking for and I'm very glad to have found it. It simply takes ...
user4471's user avatar
0 votes
1 answer
2k views

How to dynamically connect Excel data sources to MapInfo?

How to connect Excel(2010) with Mapinfo(10.0)? I saw that Excel can be connected using Excel as Data Source but my Data Source is already MS-SQL. Actually I would like to reflect any changes in excel ...
kinkajou's user avatar
  • 4,416
12 votes
4 answers
31k views

How to convert Distance, Azimuth, Dip to XYZ?

I have an excel spreadsheet with header and survey drill data. Header data contains hole ID, and location coordinates, and the survey data contains related downhole survey with Distance, Azimuth and ...
Jakub Sisak GeoGraphics's user avatar
1 vote
3 answers
825 views

Replacing Variable in VB-Expression-File (.cal) of ArcGIS Desktop?

I'm trying to modify a VB-Expression saved in a cal-file by ArcGIS Desktop 9.3: dim out if [D19830701]=-9999 then out= [D19830501] else out= [D19830701] end if ...
Markus's user avatar
  • 414
1 vote
1 answer
834 views

Converting Code from VB to Python in Map Algebra

I have a problem with Map Algebra in ArcMap 10 to convert some codes made by VB, so I need to convert it to python to work in ArcMap 10 without problem. How do I deal with map algebra in ArcMap 10? ...
GIS Man's user avatar
  • 1,123
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 ...
Zachary's user avatar
  • 6,190