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

learn more… | top users | synonyms

2
votes
1answer
36 views

Randomly choosing one from multiple fields in Field Calculator of ArcGIS for Desktop?

Using the Field Calculator in ArcGIS for Desktop, I want to randomly choose one field from a list of 10 fields (strings). The Excel equivalent, which is working, is: =INDEX(A2:J2;rnd()*10+1). How ...
0
votes
0answers
20 views

VBScript for Advanced Labeling in ArcGIS

I found a template I thought might be useful to create a table of sorts for a label. I modified it with my variables, but it still doesn't seem to be working. I'm not very familiar with VBScript, but ...
0
votes
1answer
11 views

Arcpad 10…using sql with VBScript

I am trying to get a count of related records (Tableform) in order to validate Editform entry (using VBS). Any help getting myCount? I Know there are some syntax issues here, but is this even ...
0
votes
2answers
55 views

ModelBuilder - How to calculate Field using part of path name

I am trying to calculate a field using part of the feature class path name (specifically, the last three characters of the geodatabase name). Is this possible? I've tried using the parse path tool and ...
0
votes
0answers
30 views

Reference control on Editform from tableform - ArcPad VBscripting

I'm developing an application to record water chemistry data along a profile from the surface of a lake, every 0.5, 1, 1.5 or 2m, down to the bottom of the lake. On the Edit form, the user will ...
-1
votes
1answer
45 views

Can someone help me to convert this Python to VBscript for labellling

I have two Python script snippets that need to convert to VBscript. Can anybody help me because I am really not familiar and know Python. the first script is def FindLabel([BA2]): name = ...
0
votes
1answer
60 views

How to calculate/record attachments' file names using Field Calculator?

I have a point feature class containing attachments corresponding to jpg files (sometime more than one jpg per feature). I would like to use the "field calculator" to calculate/record a new field that ...
0
votes
1answer
75 views

Error when calculate field using VBscript or Python (slice a field)

I have an expression in VBscript that works well for labeling: Function FindLabel (field) if (INT(RIGHT(field, 2)) <> 1) then FindLabel = INT(MID(field, 8, 3)) &"-"& ...
0
votes
1answer
42 views

Multiple field vbscript query

I'm fairly new to arc gis and I'm trying to string along several queries. individually they work in same query they don't. background I want to query all permit types rc, re, re/ap, and db; less than ...
0
votes
0answers
28 views

Activate the Geography Page programatically in ArcPad 10

In ArcPad Studio, when you are working with the axf file of a feature layer, there is an attribute for labeled "geographypagevisible". This determines whether or not the geography page is visible on ...
0
votes
2answers
38 views

ArcPad 10: Accessing the Geography information of a feature through ArcPad Studio (VB Script)

I am trying to access the geography feature property of a feature being edited. I need to do it programatically (in order to auto populate a field using the geography) using VB Script. I cannot seem ...
0
votes
1answer
93 views

Multiple script hyperlinks not loading in ArcGIS

I've set up my layer to use hyperlinks based on a script. When I use the Hyperlink tool and click on a link, often times it loads just fine. The problem I have is when there are multiple points on ...
3
votes
1answer
301 views

How to Populate new field using expression containing MAX value from another field in ArcGIS attribute table using field calculator?

I've got one field X with 10 numerical attributes (float/double). I've created a new field Y (also float/double) which I need to populate with the percentage of each record/attribute (in each of the ...
1
vote
1answer
107 views

Designing ArcPad Quickforms to Collect Biological Data?

I am trying to design a Quickform in ArcPad 10.2 to enable efficient capture of biological survey information in the field on a Trimble Juno 3D. I am currently investigating using the Form Creation ...
1
vote
1answer
80 views

ArcPad VBscript restrict layer editing

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

Removing time from date field labeling in VBScript

I'm not at all experienced with writing VBScript for labeling purposes. Here is my code so far: Function FindLabel ( [Date_of_Birth] ) if not isnull ( [Date_of_Birth] ) then FindLabel = ...
1
vote
0answers
78 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. Thanks for your help.
1
vote
1answer
38 views

mulitple line labeling arcgis

I try to label a field according to his length with VBScripting in Argis 10.0 The idea is : If myfield is more than a certain length, then please add a new line and split the field correctly. My ...
1
vote
2answers
150 views

How to query a data table embedded in ArcPad AXF file package using VBscript?

I would like to ask for some help on writing some VBscript (Supported in ArcPad) in a user form Command Button where the user activated the form with a unique feature ID(hence named COA_ID) already ...
0
votes
2answers
666 views

Date Time format in ArcGIS 10.1

I have a Date column in my feature class and I want the date to appear in "dd MMM yyyy" format as a label to a polygon. I am using Arc Map 10.1. I tried taking Jscript. var Dt = new Date(); Dt = ...
2
votes
2answers
2k views

How to convert field values from lower case to upper case in ArcGIS 10.1?

Using the Field Calculator in ArcGIS 10.1, I am able convert the first letter in a value from lower case to upper case. How do you convert the entire value to upper case, though? I can't seem to ...
1
vote
1answer
473 views

How do you calculate a column value based on the value of another column?

I am trying to select data based on whether it starts with certain characters and then update a field. For example if [Asbuilt] starts with "WL" then do something. Here are the two methods I have ...
0
votes
0answers
295 views

How can I get shape filename in attribute field using field calculator with VBA?

I want to store ths shapefile name in an attribute field using the field calculator and visual, but can't find the way to do it. Can anyone help me, please? Thanks!!!
1
vote
0answers
161 views

Picture fill symbol fails with a polygon graphic

The following code snippet successfully draws a graphic polygon and fills it with the specified picture fill symbol. When the x values for all of the points are made negative and a repeat call to the ...
3
votes
1answer
277 views

Convert ArcMap label expressions from VBScript to Javascript or Python

I have a large number of layers (hundreds) with label expressions written in VBScript. I am using ArcMap 9.3.1, and I'm now starting to export the layers as MPKs for use in our ArcGIS Runtime (WPF) ...
1
vote
0answers
30 views

Script for populating field in ArcGIS 10 with consecutive numbers (where start numbers is decided by me) [duplicate]

Possible Duplicate: How to add automate values to attribute field? I need a script (for Arc GIS 10) by which I can populate a field against some selected polygons features. For instance, i ...
2
votes
1answer
271 views

field calculation in arcgis

i have a data which contain a code of area an value of area in shapefile, ex.: area|value 1|33 1|43 1|31 2|12 2|43 3|66 3|76 the question is how to calculate total value per area with arcgis, i ...
1
vote
2answers
494 views

How to Add Values together using FindLabel (VBscript) function of ArcMap Label Expression?

I'm wanting to add together values from multiple fields in shp file and display the result as a the label here's what I'm looking at right now: if ( [SwineGesBo] + [SwineSowLt] > 0) then output = ...
2
votes
2answers
2k views

ArcMap field calculator VBScript

I want to do some advanced level scripting with VBA in the field calculator. I have done a simple coding in the code block. Here is the codes. dim X if [Name]="University" then X=101101 ...
6
votes
2answers
312 views

How to parse serial date in ArcGIS?

I have imported a shapefile that contains a serial date number that looks like this: 41256.260799. I would like to create a new field that shows only the hour and second like this: 06:33. I've tried ...
3
votes
1answer
3k views

Field Calculator VB Script Codeblock IF statement syntax is wrong

I can't figure out why the syntax is wrong in Field Calculator ArcMap 10. The complete codeblock is Dim CapitalDia As Number Dim TwagDia As Number Dim X As Number CapitalDia = [New_Pipe_S] TwagDia ...
1
vote
1answer
205 views

ArcPad get vbs script location

Within arcpad (edit form) I want to get the current location of the vbs script running. This simple vbs script outside of arcpad works fine. wscript.echo " " + Wscript.ScriptFullName However, when ...
3
votes
3answers
422 views

How to make Field Value constant size(length) by appending zeros towards the end?

I have been racking my brain, but I can't seem to find a solution to appending my field values in my .dbf to correspond with the values of my feature's attribute table. All I need to do is to append ...
4
votes
4answers
2k views

How to concatenate numbers and add in leading zeros?

I have three text fields populated as follows: 1, 9, 1 that I need to concatenate into a field that looks like 01.09.01. Getting to 1.9.1 is easy but can anyone help out with how to formulate it so ...
2
votes
1answer
2k views

How to combine If Then with InStr in ArcMap field calculator?

I want to write an if then in field calculator that tests if a field in the attribute table contains one of several versions of another string (the versions vary by capitalization). Trouble is, I ...
3
votes
2answers
3k views

Remove first n characters in label using ArcGIS 10 label expression builder with VBscript

I have a planning cadastre dataset. It has the type of plan (DP, RP or SP) and then the plan number, thusly: DP123456 RP1248590000 SP3855 etc... I want to make a label in the expression builder in ...
1
vote
2answers
1k views

ArcGIS field calculator: VBScript get data from previous row

When using the field calculator, how do I get data from the previous row in VBScript? In Python I'd do something like this: for index, row in enumerate(rows,start=1): row[index-1] += 5 I'm ...
3
votes
1answer
684 views

VBscript Regular Expression in ArcMap Field Calculator

I'm looking for a regex in VBscript that I can use on a ArcMap table. I know what it would look like in python: pat =r'[0-9]{3,4}' This filters all numeric characters from the string which have the ...
6
votes
1answer
566 views

ArcMap 10: How do I escape certain characters when labeling?

I am labeling certain Oil & Gas areas by Operator in ArcMap 10, using this expression: "" & [OPERATOR] & "" & vbNewline & "" & [UNIT_NAME] & "" The only problem is ...
1
vote
3answers
2k views

Using VBScript to label shapefile in ArcMap

If you're reading this for the first time, it might be best to focus on section beneath ANOTHER UPDATE. I'm a beginner with VBScript and I have a question about using an VBScript expression for a ...
0
votes
1answer
100 views

create geometry in arcpad

i want to create a point geometry in ArcPad 10 VBScript, to make custom feature drawing. so i want create point geometry then record.shape = point or records.AddNew(point) i want to create ...
3
votes
1answer
588 views

ArcPad 10 Studio, from form to vbscript back to form

There is very little documentation on using vbscript within a form. Any help with syntax for ArcPad 10 would be appreciated. Within my subroutine, I want to grab some numerical data entered in a ...
2
votes
1answer
868 views

Programatically write values to ArcPad Form control box

Using this blog post I've managed to store user names as global variables in ArcPad. The next step is to use those variables in form 'controls' aka form fields. Per the author's comments under his ...
1
vote
1answer
1k views

ARCPAD - VBscript to update values in attribute table

I am working on an automating tool for ArcPad for inventory issues on our mobile GIS machine (Trimble GeoXH - Geoexplorer 2008 series - Windows mobile 6.1 and Arcdap 10.0.3). I have developed the ...
3
votes
2answers
4k views

Using conditional statements in Field Calculator

I have two fields, "P_Area" and "PC_Area", whose sizes I'd like to compare in a third field, "Areas_Equal". The "Areas_Equal" field should contain a "Yes" if the other two are equal and a "No" if they ...
0
votes
4answers
321 views

How to solve a run-time error in Thiessen polygons command line

Well I revise my post by giving more information for my problem hoping I may get some help please. I call Procedure 2 from a loop that is within Procedure 1 (see below). The program stacks in the ...
1
vote
0answers
159 views

How can I denote the values of reclassification using variables?

I used the following lines of code to classify a raster. However, my problem is how can I denote the old and new classification values in the last code line using variables? Then number of values ...
1
vote
0answers
240 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 ...
2
votes
0answers
105 views

How can I identify the pixel with the maximum value in a grid? [duplicate]

Possible Duplicate: How to find the locations of the highest values in a raster? How can I identify the pixel with the maximum value in a grid and get its coordinates? Any VBA code please?
13
votes
2answers
3k views

How can I create weighted Thiessen polygons?

I have a point shape file and I create Thiessen (Voronoi) polygons programmatically using this scripting syntax: CreateThiessenPolygons_analysis (in_features, out_feature_class, fields_to_copy) ...