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
0answers
9 views

arcgis VB script to create table [on hold]

I am trying to find a VB script to create a table set up like the following: What is the best way to set up my csv and begin coding this?
3
votes
2answers
49 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 it ...
0
votes
0answers
19 views

ESRI Hyperlink via VB or python [closed]

I am using ArcGIS 10.3 I'd like to have a featureclass support a hybrid hyperlink. The first part would be a web address where the only difference among the features is the last 6 characters (which ...
1
vote
0answers
32 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
47 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
48 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
78 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 ...
2
votes
2answers
30 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 ...
1
vote
1answer
74 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
41 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
54 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 ...
1
vote
2answers
88 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
68 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
51 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 ...
1
vote
0answers
49 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 ...
0
votes
0answers
50 views

Concatenation of fields with if or when circumstances

I have a field named PROJECT_DESCRIPTION that concatenates the STREET_NAME, FROM and TO fields. Sometimes the FROM or TO fields are only address ranges. In my PROJECT_DESCRIPTION field I would like to ...
2
votes
1answer
58 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
79 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
127 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
107 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
56 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
99 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
38 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
113 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
59 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
31 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
67 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
76 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 ...
0
votes
0answers
30 views

Implementation of script for bus waiting stops

I've tried to add waiting time in bus stops in several ways (elevation fields, sub-segments, etc), but nothing worked. I'm now trying to use this script I've found in Internet: if (SourceID of ...
1
vote
1answer
62 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
337 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
186 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
3answers
530 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
81 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
77 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
323 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
61 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
76 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
298 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
151 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 ...
0
votes
1answer
253 views

Conditional Formatting in Label Expressions

I need help with the syntax with my label expression. I have a specific set of parameters I need to display but I need to change only one attribute to label as something else. I have AC pipeline that ...
0
votes
0answers
40 views

Working with If Then Loop of Production Mapping Expression Builder and VBscript?

I'm using production mapping and I want to automate the colour of the text inside a table based on the status field. unfortunately I'm not overly familiar with VB. When I enter: "<CLR red = '255' ...
1
vote
3answers
99 views

VB Script field calculator - error with conditional statements

I have limited VB Script experience, but have been working on the script below and keep getting errors, the most common being "expected identifier". Can someone tell me what I'm missing here? Dim ...
1
vote
1answer
69 views

Field Calculator issue in ModelBuilder?

I'm trying to populate a field (AVO) using this statement AVO = dim avo if [join] = 1 then AVO = "YES" It works if I do it in ArcMap but it doesn't when I use the same syntax in ModelBuilder.
1
vote
1answer
53 views

Filter shapefile layer in ArcPad 10.2

I have an ArcPad project that uses several Shapefile layers. How can I filter the features in one of those layers? According to my searches, I can only filter if it is an AXF layer. I'm happy to ...
0
votes
1answer
134 views

Converting VBScript to JavaScript for labelling in ArcGIS Desktop?

I have a VB script used by ArcGIS 10.2 for Desktop to label different types of streets based on vales present in a specific field. I am a novice at Python but VB and JavaScript are beyond me. I need ...
1
vote
2answers
426 views

What's wrong with this VB Script code for the field calculator in ArcGIS 10?

I am trying to use one field's contents ([Condition]) as a condition for populating another field ([Intact]). I try to run the following code in the Field Calculator, but it never works (and is not ...
0
votes
1answer
82 views

How to populate new field according to string content of another field using VB script?

I want to populate a new field called Letting according to the string value found in another field. If 'ASP' or 'Q' is in field ExternalRE then I want 1 in Letting, everything else to be 0. Here is ...
1
vote
2answers
1k views

Removing leading zeroes (0) when labelling in ArcGIS Desktop?

I am trying to do a simple labelling exercise however bit confused how to on how to remove unwanted '0' values. I have field with road number displayed like: 0000647, 000652, 0000000236 I would like ...