VBScript (Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft that is modeled on Visual Basic.

learn more… | top users | synonyms (1)

0
votes
3answers
40 views

Writing ArcMap Label Expression in VBscript?

I have to columns, pipe material and pipe size, I only want to label pipes with a size greater than 2" I am trying to do this but keeps kicking back and error, can anyone assist in what im doing ...
0
votes
1answer
30 views

Adding units to numeric labels in ArcMap?

How do I add the distance units to labels in ArcMap? I have the area calculated and would like the label to be displayed as (XXX sq ft). I was able to write a VBScript of "(" & [AREA] &" ...
0
votes
3answers
49 views

Volume using VB Script of the field calculator

I am trying to compute the volume of the area given certain condition. i wrote the following VB code however, i am getting error that it has failed to do so. Can anyone look into it and suggest a way ...
0
votes
0answers
18 views

How to accommodate hyperlinks that have a changing date?

I have an installation with close to 400 building, when I click the identify tool in ArcMap 10.3 I would like to be able to select a hyperlink that takes me to a floor plan PDF. All the floor plans ...
3
votes
1answer
38 views

Using ArcGIS Field Calulator with VB Script

My code looks like the following: if [LWS50yrp] <136.5 then [DMG_50y] = 0.1 elseif [LWS50yrp] >=136.5<154 then [DMG_50y] = 0.15 elseif [LWS50yrp] >=154<166 then ......
1
vote
1answer
96 views

How to Edit Field using VBscript or Python in Attribute Table

I add a field called Name in attribute table in arcgis 10.1 but I can't edit this field. From this site, I have learned that this can be done by field calculator using VBscript or Python. As I have ...
0
votes
1answer
38 views

Label Expression If Statement remove Zeros

I am trying to perform a semi-complicated labeling expression that shows one field divided by another field and some additional fields with no division. The issue I ran into was that the denominator ...
3
votes
0answers
34 views

VBScript Syntax Error in ArcGIS labeling? [closed]

I have been using a script on older ArcGIS to convert depths in engineering format to the Hydrographic format seen on charts. On trying to use it I get a syntax error in Line 14. No matter how I ...
4
votes
2answers
99 views

Dropping & inserting specific characters within a field being used for labeling

I would like to find out how to properly format a conditional expression in labeling, so as to only get specific characters back out of a field that has 9 characters in it, but don't wish to label ...
4
votes
1answer
53 views

Change entire label style after certain extent

I need to design a dynamic label in ArcMap that changes its entire style after a certain zoom extent. The research I've done suggests to me that there is currently no way to use VBscript to manipulate ...
2
votes
1answer
68 views

Inserting substring in ArcGIS Field Calculator

Trying to use the split tool in ARCGIS to add an underscore. Trying to make "ABC11111" look like "ABC_11111". Don't have much experience using Python or VB Script but this is what I have created with ...
1
vote
1answer
40 views

VBScript, Error 999999 Syntax Error Calculate Field in ArcGIS

I am using a field [all scores] as a parameter agricultural classification. I tried using field calculator (VB script) with many kinds script, but it never works and giving me notification 99999, ...
1
vote
1answer
84 views

If then else Logical VBScript in ArcMap 10.3.1

I realize this question has been asked in its basic form before, but I've tried a lot of code samples on answers posed to similar questions on this site to no avail. I'd like to create a new field ...
3
votes
2answers
77 views

VBscript to not include empty fields

I am trying to create a label in arcgis with about 30 columns with this basic VBscript: [field1] & vbnewline & [field2] & vbnewline &[field3] & vbnewline... ETC How can I make ...
1
vote
0answers
73 views

Converting Atn function of VB Script for Python parser of ArcGIS Field Calculator? [closed]

I would like to convert the Atn function (which returns the arctangent of a number) of VB Script to Python but I cannot find exactly the same function. Any help? I want to convert the slope of ...
3
votes
2answers
71 views

Why is VBS If Then Label Expression not working?

I am trying to label a field based on other field. For [TYPE] = "PRIMARY", the [LABEL] is having this structure: "TAN80901B" For [TYPE] = "SECONDARY", the [LABEL] is like this: "TAN80901C/D20b" I ...
0
votes
1answer
132 views

Maplex issues with “vbnewline” in ArcMap

I'm trying to stack labels using an expression I wrote using VBScript. I can get them to stack using "vbnewline" but it is a no go when using Maplex's label stacking options. Using ArcGIS for ...
2
votes
1answer
141 views

Using ArcMap Field Calculator to count number of identical values?

I have a file with an attribute table with data in 3 columns, and would like to use field calculator to populate a 4th column. The data is integer numbers between 0 and 56. I want the new column to ...
3
votes
2answers
43 views

Using Field Calculator vb to check for name with /n in the string?

I am calculating values for a field (Score) based upon the names from another field (Modified). One name is "blaugh\nblaugh". Field Calculator keeps treating the name as having a new line command. I ...
2
votes
1answer
139 views

Populating attribute table string field with values from long field using vbScript in ArcGIS Field Calculator?

I want to calculate the field "area_type" with text depending on numbers from the "Value" field. I have tried with the following VB-script in "Field Calculator" but am getting this error message: "...
1
vote
1answer
60 views

How do I round the coordinates of a point before insert into attribute table in ArcGIS?

Until now I doing the following steps to get rounded coordinates: create a new x and y column in the attribute table use Calculate Geometry round the column value with the Field Calculator using VBS ...
0
votes
1answer
72 views

What expression needed for universal naming of parts polygon feature class?

For example, i have n count of polygons and little parts of it. I want in field [Name] get string: "PNum1(1)". where "1" - number of main polygon [Num], "(1)" - number of part of main polygon [...
2
votes
2answers
175 views

Troubleshooting VBScript for labeling in ArcMap?

I am trying to add FIPS codes to my county name labels and want to add either one or two zeros to the number unless it is over 100. i'm hoping someone can find the error in my code: Function ...
3
votes
2answers
122 views

Using ArcGIS Desktop field calculator (python) to parse date

I'm trying to parse a datetime field using python (but have never used python for it before). I have a field that contains a valid date, but not a valid time... and other fields that have valid hour ...
0
votes
1answer
66 views

calculate specific rows and populate their result in another field

I'm working on ArcGIS 10 desktop version. I have a file with one entity entered multiple times (rows) and each time that has been given a new value against it. I want to sum the values against this ...
2
votes
2answers
158 views

Labeling with two decimal places (rounded) even when second is zero in ArcMap?

I have a benchmark data that need to label. The data where in the field has attribute height like 12.340, 12.400, 13.690. I have to label the height for examples 12.34, 12.40, 13.69.I already used ...
2
votes
1answer
85 views

Selecting numbers within the slash (/) using ArcMap Field Calculator?

I have date data that I'm separating into three separate fields (all fields are string type, including the input field) by day, month, and year. Unfortunately, the date field is raw data and isn't ...
1
vote
1answer
112 views

How to add label from header field name in ArcMap

I have some fields which contain numbers, when I added them as labels, it shows on the map as numbers. Is there any way to add header name of the field with the number?
0
votes
0answers
24 views

Using ArcGIS field calculator to rank continuous field within shapefile using VBscript parser? [duplicate]

So have been trying to get the VBscript code below to work in the ArcGIS field calculator. The values are a continuous set of data between 15-88, and I have used the natural breaks jenks rank to rank ...
3
votes
2answers
189 views

Calculate QUARTER from Date field using ArcGIS Field Calculator?

I currently have a Date field in the format of MM/DD/YYYY. My goal here is to convert the Dates into 1 of 4 quarters, along with the Year. The field to be created will be called QTR_YR. My first ...
2
votes
0answers
211 views

ArcMap Label Help - Label from X/Y Coordinate

Edited: This picture might help explain my question. Here I have a point at the line with an X/Y coordinate. It also has a leader line to it. This leader line has an X2/Y2 coordinate. Both of ...
2
votes
2answers
94 views

type mismatch: 'esri_8' when using field calculator

I am trying to run the VBScript 'round' function using the field calculator on a column for a numeric field that contains a large number of rows (> 500k). When I run the code on a subset of the field ...
0
votes
1answer
218 views

Changing Date Format via Field Calculator of ArcMap?

I'm trying to find a function in the Field Calculator (preferably in VB Script) that can add numbers into a field that already has data. I have year data ranging from the 1960s to 2014 in string ...
2
votes
2answers
51 views

ArcPad 10.2 Command bar & Quick Access Menu

I am interested in making the Quick Access menu and Command Bar not available/visible for my users. The Quick Access Menu is prompted by the little icon on the bottom right of the tab bar seen here: ...
1
vote
2answers
253 views

using field calculator on string field that has some empty values?

I have a CityState field that has the city and states of landowners. Bellingham WA, for example. I am making two new fields, OwnerCity and OwnerState in which I strip the last two characters of ...
0
votes
1answer
84 views

How do I move the last two characters of a column within the attribute table to another column?

I have data in a column that looks like the below example: El Monte CA I need to move the last 2 characters to a separate column. Which function in the field calculator will deliver those results?
0
votes
1answer
46 views

How to supress 'Start With' Menu in ArcPad 10.2?

I am fairly new to ArcPad in general and I am attempting to suppress the start with menu as seen in the attached photo. I have a script that is called in the event: onstartup, that loads the .APM I ...
1
vote
1answer
109 views

Using label expression to label highway with last group of numbers in field

I'm using Tiger road files and I want to label the highways with their shield number. Tiger has an inconsistent naming convention for road features; I am specifically concerned with the highways. I ...
1
vote
1answer
147 views

VB Script case statment syntax for the field calculator in ArcGIS 10.2?

Can anybody help me with this VB Script code for the field calculator in ArcGIS 10.2? Why in the final result are all the values 10? a= 10 Select Case UCase( [PRIORITY] ) Case "AUX 1": a = 22.5 ...
1
vote
1answer
85 views

extract substring after first number

Suppose I have a field titled NAME1. Examples of what is in the field appear like this: Fox Lake 1 WABASCA 166 TSU TUE 196G YELLOW QUILL I.R. 90-8 POUNDMAKER INDIAN RESERVE NO. 114-17 CROSS LAKE ...
1
vote
2answers
2k views

If-Then Label Expression

I already know that more than half of you about to read this will say, "Use Python," but I'd appreciate it if you'd humor my outdated ways. I'm trying to create a VB label expression on streets such ...
3
votes
1answer
330 views

Set scale dependant labels arcmap 10.3

I am wondering if it is possible to create scaled labels so that at a certain zoom level only one label appears but when you zoom in closer more labels appear for different fields. I have this ...
2
votes
4answers
2k views

VBScript - If/Then Statement - Field Calculator

I am trying to do a simple (or so I thought) if/then statement in the ArcGIS field calculator. I am trying to add the HydroCode field - hydologic soil codes - to an existing data set. I know what the ...
1
vote
0answers
104 views

Labelling expression - How to combine two different functions?

I'm not an expert of scripting and programming, I need to use these two functions in the labelling expression in ArcGIS. How can I combine this: Function FindLabel ( [toponimo] , [testo] ) ...
-2
votes
1answer
95 views

VB Script - If Then Statement [closed]

Code isn't working.. suggestions? Dim DevStat as string IF [LandVal1] > 0 and [BUILDVAL1] = 0 then DevStat = "Undeveloped" ElseIF [BUILDVAL1] > 0 and [LandVal1] = 0 then DevStat = “...
1
vote
4answers
486 views

How to remove period, comma, symbols using field calculator?

I want to delete . , # in attribute table using field calculator (VB Script or Python). How can I remove these using this example address: N. First St., Unit #1 (I don't need city or state name) I ...
1
vote
1answer
65 views

Concatenating fields while also replacing values within certain stings [closed]

I am trying to use python to concatenate multiple fields in a polygon layer. Specifically, I am attempting to combine the values of four fields into one: EXPCODE = !MATRIX! & !PLANT! & !PCT! ...
0
votes
1answer
100 views

ArcPad custom edit form validation behaviour

I have a custom ArcPad form, which includes the geography tab. Users use this tab to update coordinates using the GPS. When user press OK in the edit form, I want to first check that they have not ...
3
votes
2answers
331 views

VB Script or Python for Field Calculator when using greater/less than?

What I have: I have 4 fields for my address ranges. L_ADD_FROM, R_ADD_FROM, L_ADD_TO & R_ADD_TO (all in DOUBLE field type). What I need: The lesser value from L_ADD_FROM and R_ADD_FROM to ...
0
votes
1answer
187 views

if/then with VBScript in ArcGIS Field Calculator giving Error 000539: SyntaxError: invalid syntax?

What is wrong with this VBscript in the field calculator? ColumnC= if [ColumnB] > 0 then [ColumnC] = [ColumnA] / [ColumnB] endif Each time I receive this syntax error message: Error ...