VBScript (Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft that is modeled on Visual Basic.
1
vote
1answer
89 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 ...
1
vote
0answers
39 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
139 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
164 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
165 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
397 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
142 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
554 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
0answers
101 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
127 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
442 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
455 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
793 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
784 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
408 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
199 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
803 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
74 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
396 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
439 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
894 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 ...
0
votes
4answers
249 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
112 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
188 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
103 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?
11
votes
2answers
1k 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)
...
3
votes
1answer
2k views
How to sort a feature class and then calculate a sequential ID field?
I am in ArcMap and I want to sort the records based on a field and then do a Calculate Field with an auto-incrementing value with the sort in-place. Any ideas?
It looks like I could get an update ...