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
vote
1answer
30 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
0answers
377 views

Adding a polygon in ArcGlobe via GraphicsContainer.AddElement

I'm trying to add some data to an ArcGlobe; however, it's not showing up and I'm wondering what the issue is. I am doing the following: IGeometry geometry; Ipolygon polygon = myPolygon; ...
0
votes
0answers
149 views

Is there any way to fix the position of fixed buttonpads in the top toolbar in MapBasic?

Here is my code to create some buttons: Include "icons.def" Declare Sub Main Declare Sub button_prompt Sub Main Create ButtonPad "Providers" As PushButton Icon MI_ICON_ZOOM_QUESTION Calling ...
0
votes
1answer
14 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
29 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
29 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
26 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 ...
3
votes
3answers
695 views

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

How do I append my field values in my .dbf to correspond with the values of my feature's attribute table. I need to append 0's to the field value if the field value is less than 11 characters in ...
2
votes
3answers
117 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 ...
4
votes
1answer
4k 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 ...
6
votes
2answers
467 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 ...
1
vote
1answer
40 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
68 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
60 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 ...
1
vote
1answer
103 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
0answers
53 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
48 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 = ...
0
votes
1answer
104 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 ...
1
vote
4answers
139 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
3answers
3k 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 ...
1
vote
1answer
51 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! ...
3
votes
2answers
234 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
139 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 ...
3
votes
2answers
1k views

Multiline VBScript Label Expressions in Arcpy

I am able to set simple label expressions, but when I try to set multiline expressions (which all VBScript expressions are) it does not get copied into the expression box properly. I have tried using ...
3
votes
3answers
1k 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 ...
0
votes
0answers
29 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
71 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 ...
2
votes
1answer
304 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 ...
1
vote
1answer
40 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.
0
votes
1answer
99 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 ...
2
votes
1answer
328 views

Field calculation in ArcGIS Desktop?

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 ...
4
votes
2answers
5k views

Nested “if” statements in ArcGIS Field Calculator

The solution in VB for the base process is @ "If then" VB Script code (or Python) equivalent to SQL's IN ('x','y',z') expression in ArcGIS Field Calculator question? ...
1
vote
2answers
289 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
65 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
685 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 ...
1
vote
2answers
161 views

Adding button to Arcpad form

I am trying to add a button to an Arcpad form that sets the values to Cereal and Corn. This is as far as I have gotten and I am stuck. Any help would be appreciated! EDIT: I Made apl that has a form. ...
1
vote
1answer
177 views

Calculate value from an equation using Field Calculator Python/VB Script

I wanted to calculate a result value from 3 fields using an equation. VBScript or Python codes are also accepted..:-) the equation is RESULT= [(R^2/3)(S^1/2)]/n..
1
vote
1answer
143 views

how to label only number using vbscript in arcgis 10.1

I have a GPS station feature dataset and I need to label using field NAME. However, I need to label only the number, for example in the field NAME the name are GPS123, STATION 239, STN 325 but the ...
0
votes
1answer
78 views

Needed either python or VB Script to write right indent

Question : I have a field column that is has numbers with percent. The field properties are string and 50 in length. I ran it in an expression using round([T_Acres]/207 * 100,0) + "%" in VB script . ...
2
votes
1answer
158 views

Is there an equivalent of ArcGIS Hyperlink script editor in QGIS?

I am trying to find similar functionality in QGIS to ArcGIS Hyperlink script editor. In ArcGIS I can parse VBScript from a selected field in an attribute table. The script would execute on mouse ...
0
votes
0answers
44 views

Custom ArcPad toolbar button

I am trying to re-create something like the quick capture tool set already provided on arcpad, so it will allow me to capture points on the field easier. I have it currently where a form pops up and ...
3
votes
2answers
132 views

Removing 0 values when labelling an integer field

I am trying to do a simple labelling exercise however I am a bit stuck on how to remove unwanted '0' values. I have three fields which I would like to display in a stacked label i.e. on three lines. ...
0
votes
1answer
131 views

Label related records in ArcMap from enterprise geodatabase

Two questions related to labeling 1:M related records in ArcGIS 10.2. I have successfully built an Advanced Label expression in Python to label records from a related table. I am currently working ...
1
vote
3answers
114 views

If/then Field Calculator

I have two fields in my model, the first is a spatial join return for the township, the second is a spatical join to a city. If there is not city, then the field is left blank. The column that has ...
3
votes
1answer
302 views

Why is this field calculator expression evaluated incorrectly when using Python syntax?

I have a polygon featureclass containing an integer field 'gridcode'. I've added 2 new float fields VB_calc and Python_calc, both of which should be equal to gridcode / 1,000,000. If I calculate the ...
1
vote
0answers
30 views

How do I create a new layer in an ArcPad Map that's a buffer from another layer?

I'm editing code that someone else wrote for an plant species management database. Currently, you have to be holding the GPS receiver inside of the polygon for it to automatically find the previous ...
0
votes
1answer
77 views

Expression to display Image in MapTips?

In ArcMap, is it possible to display an image by using a path in the attribute table to show an image in MapTips? Any Python or vbScript expression are welcome as long as it is MapTips which shows ...
3
votes
4answers
1k views

Label using VBscript in ArcMap - multiple IF statements?

I have 4 fields that hold number values. I only want a label returned if the field <>0. For instance, if col1<>0, then label = col1 AND if col2 <>0 then label = col2, etc. So, I want all ...
4
votes
2answers
5k 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 ...
3
votes
1answer
101 views

Merge String fields in ModelBuilder by undefined ArcGIS user?

I'm using ArcGIS 10. I have a doubt, because I already have a merged shapefile, with two string Fields, some Null and some filled (comes from the merge tool). So, now I want to get the values from ...