Questions tagged [vbscript]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
20 views

VBscript to change label only for certain values

I want labels displayed for two fields: [ID_Messpkt] and [Pb_corr], both numeric type I want to change the label for certain values of one of the fields: [Pb_corr] I have two scipt that work ...
3
votes
2answers
149 views

Conditionally labeling layer based on three fields

I am labeling our power line span layer based on the conductor/wire type. This information is located across three fields in the span layer which represent phases A,B,C. Basically I want code that ...
0
votes
0answers
27 views

Debugging VB script in ArcGIS Field Calcultor?

I work in ArcMap and I would like to use Field Calcultor (VB script) but my script is not working. The message is: there was a failure during processing check the geoprocessing results window for ...
0
votes
1answer
31 views

Adding two to every value of field using ArcMap Field Calculator

I am working on a road network and each section is assigned a certain value and increases by 1 each section until it gets to around 500 which is the end. A change I had to make was adding two ...
0
votes
0answers
23 views

Select By Attribute: If-Then VB Statement

I am attempting to write an If-Then Statement where if all the UtilityBillingMerge101719.() are true then return all of the results that are true that have an account number. This currently works, ...
2
votes
1answer
38 views

Using field calculator to populate one column using other data in same table in ArcMap

I'm not the best with using the field calculator of ArcMap and I'm unsure of what's wrong with my VBScript Basically the new column needs to contain data pulled from the same row in the following ...
6
votes
1answer
100 views

Stationing Callouts using VBScript Labeling in ArcMap?

I have a shapefile that I'm trying to produce a specific label for using VBScript. I'm using the values in the [MEASURE] field. "PI: " & INT([MEASURE]/100) & "+" & (ROUND(([MEASURE] - INT(...
0
votes
1answer
33 views

Windows Embedded Handheld 6.5 Professional - How to Uninstall VBScript Runtime Library and Install again?

I've been having trouble getting the Trimble Positions for ArcPad Extension to correctly install on my Trimble Geo 7X handheld. I saw that another user asked about something similar and the solution ...
1
vote
1answer
18 views

Including rotated label alongside stacked label in ArcMap?

I am trying to replicate the label that I have attached an image of. Is this possible in ArcMap? So far I have stacked 3 labels but am unsure how to: Create 3 individual boxes around the stacked ...
0
votes
1answer
41 views

Basing an 'ELSIF' expression on several fields

I am still fairly new to coding so please excuse what may be simple mistakes. I am working in ArcMap 10.5 and have an Overhead Conductor feature layer that I need to label based on what field (...
1
vote
1answer
57 views

Using “Elseif” “OR” “And” statement to create label from two fields

I'm an admittedly novice when it comes to scripting but I have been able to create a basic 'else if' with 'OR' expression to create a label for a fuse feature class I have constructed. I am now trying ...
1
vote
1answer
51 views

Modifying text with tags in If Then Else in VBScript Label Expressions

I am having a problem with formatting text in a label expression using VBscript. Here is my label expression: Function FindLabel ([Mean], [Count]) if ([Mean] < 1) then FindLabel = [Count] &...
0
votes
2answers
42 views

Inputting formatted concatenate in field of attribute using ArcGIS Desktop?

I am new to working in ArcGIS Desktop. I have feature point data with 3 fields in table attribute (objectID, shape and sequence). I want to add another field lets say called "name_sequence).. in ...
-2
votes
1answer
89 views

What's wrong with this VBscript in field calculator - ArcGIS?

The code fails when run What I try to do is to fill a field "CLASSNAME"(created text field) according to field "Value"'s value. If the value in "Value"(raster's by default field) is 1, then in "...
1
vote
1answer
129 views

Using VBScript for advanced labeling in ArcMap?

I am trying to do some advanced labeling with VBScript and need some help getting to the finish line. I have never scripted anything prior to last week so I am definitely a newbie when it comes to ...
1
vote
0answers
61 views

Replacing more than one escape character when labeling in ArcMap using VBscript?

I have written a label expression to match font color to the symbology for a point file based on unique values. Problem is, occasionally the comments will include one or the other special characters ("...
0
votes
1answer
683 views

If/Then Statement with LIKE using the Field Calculator

I cannot get the below to work with a LIKE variable within the If/Then statement. Is there something that I am missing? Prelogic Script dim y If [Categories] LIKE '%Orange%' Then y = "Medium" Else ...
1
vote
2answers
704 views

Using field calculator if statement to update another field using another field's values?

Using VBA in field calculator I am trying to figure out the expression that if 3 conditions are met populate a field using another field's value and I cant get it to work! CALC_CLASS is a joined table ...
2
votes
1answer
2k views

Writing If-Then statement in ArcGIS Pro field calculator using Python?

I've been using ArcGIS Pro over ArcMap recently because ArcMap is giving me some incorrect summary statistics that I use to populate a data field in a number of feature classes. The problem is that I'...
0
votes
0answers
17 views

Calculating Field based on Domain Description of Another Field

I am trying to get the description from a field to write to another field. However, When I calculate the new field it gives me the code and not the description. I tried using VB, but I can't seem to ...
1
vote
1answer
3k views

How do I add a space in a label with vbscript?

I am labeling point features in Acrmap 10.3. I have the points labeled with three fields from the attributes on the same line, but there is no space between them. what is the expression to add a ...
1
vote
0answers
143 views

Hyperlink two documents in ArcMap using VBscript when one might be “null”

I am an Ecologist that frequently dips into GIS work but I know next to nothing about script. I copied a script I found on this site and it ALMOST works for my application. I am hopeful its a quick/...
0
votes
1answer
70 views

Travel entire streets segments

I m using ArcGIS 10.4.1 and Network Analyst extension, in the network dataset properties-> Attributes. I created an attribute called PromoteStops1, next in Script Evaluators, I used the following ...
0
votes
0answers
57 views

Making two functions and then combining them in ArcGIS Network Analyst?

I am new in the VBScript world, so I am really confused with programming. I need to do this expression in my evaluator in my Network Analyst. Basically I am adding a "cost" that is my percentage of ...
0
votes
2answers
1k views

Splitting (stacking) labels in ArcMap in multiple lines using vbScript?

I want to show labels in ArcMap on multiple lines. The label I have is written as: Caritas Lebanon Migrant Center, DRC, Handicap International, NRC, SCI. I want to show it in separate lines. e.g.: ...
0
votes
0answers
73 views

CAD Equivalent of Maplex and VBScript for Labeling

Is there a CAD equivalent of maplex functionality and VBScript usage to produce custom labels? I'm pulling a shapefile into CAD, but not sure what support there is to intelligently label the ...
0
votes
1answer
335 views

ArcMap Python script for attribute split, replace and concatenate [closed]

I have a problem with attribute table which I'd like to learn to solve without MS Excel. The Shapefile I have, has an attribute field, which consists of 3 parts, separated by ";" -sign. Here is an ...
2
votes
1answer
43 views

How to create a directory in Scripter Automation [closed]

Is it possible to create a directory in Scripter Automation? I need to call ActiveX plugin. In VB you can call it with My.Computer.FileSystem.CreateDirectory("C:\Documents and Settings\AllUsers \...
0
votes
1answer
372 views

if-then statement using VBscript not working

I'm trying to reclass from the value of field using if then statement. the statement is like this.. In the figure above, what is making the result not work on my ArcGIS?
1
vote
1answer
49 views

Creating unique identifier for cadastral parcels in ArcGIS 10.5?

Creating unique identifier for cadastral parcels in ArcGIS 10.5 (ArcView)? I'm adding selected parcels to a feature class and I would like to have a text prefix and then three or four digit number ...
1
vote
2answers
11k views

Remove last 5 characters with Field Calculator in ArcGIS Desktop? [duplicate]

I wonder how to delete a word (or the last 5 characters) using the field calculator in ArcGIS 10.2. I have a column such as: Paris City; London City; Berlin City I need to remove "City", to be left ...
1
vote
1answer
559 views

Using Attribute Assistant to update field when value in another layer is updated?

I have been searching for an AA method that can update our CP system status field to "UP" in our gas main layer whenever a control point test location is created or modified on that gas main feature. ...
3
votes
1answer
313 views

Trying to shorten length of a field using field calculator

I currently have a field that has text for a hyperlink to a photo that I am trying to shorten. I only need the name of the file at the end but the length of the name varies by a few characters. The ...
0
votes
1answer
160 views

How to translate VBScript to Python-parser in Field Calculator

How do I translate the following VBScript code in Field Calculator to Python using the Python-parser? Function FindLabel ( [MHUNIT], [BLDG_NUM] ) If Not IsNull( [MHUNIT] ) Then FindLabel = [MHUNIT]...
-3
votes
1answer
55 views

Using field calculation with vb? [closed]

Could you please help with the code below. dim n if [Flow] <200 then n = -(16.6*Log (30/10.112))*Log ( [Flow] /200)))^2)) else elseif [Flow] > 4000 then n = 42.2+10*(LOG [Flow]) +(33*(LOG( [...
-2
votes
2answers
2k views

vb script for carriage return in label string over 50 character long

IN ArcGIS, what is the vbscript in the label expression box to build a label which has the outcome that if the string is over 50 characters long then the label should be formatted over 2 lines.
2
votes
2answers
369 views

Conditional Labels, Multiple Labels ArcGIS

I'm attempting to write a code to show 6 fields that all have some Null values. The fields will have accompanying text labels that are not a field, and each one needs to be on a different line. The ...
2
votes
1answer
399 views

Using Field Calculator to assign consecutive letters for each feature?

I have a feature class generated in ModelBuilder using a transect script that contains multiple transects. Before moving on to further build the survey I would like to assign ID's to each feature in ...
3
votes
1answer
126 views

Large Label Expression Causes Application Error

I'm having trouble with a large label expression and I keep crashing with an application error. I'm trying to display sample results as stacked: Label ID Sample depth 1 Sample Depth 2 Sample Depth ...
1
vote
1answer
292 views

Converting label expression from VBScript to Python in ArcGIS Desktop?

I have a feature class with label expression in VB script. I do not have the skill to convert a VB script to a python script. Here is the VBScript:- Function FindLabel ( [DESCRIPTION] ) if (left(...
2
votes
1answer
151 views

Using CJK character orientation in label expression of ArcMap?

I'd like to set label expressions by VBscript in ArcGIS, here comes the problem. Since labels are constructed by Chinese and English, so I set the label expression like: If CJK character is checked, ...
2
votes
0answers
179 views

Multiple Line in single stacked text box using ArcGIS Desktop? [closed]

I am having difficulties with creating a stacked label based on different soil boring depth. Below is my attribute table: I want to display something like this stacked in 1 text box: Every time I ...
0
votes
2answers
37 views

Need expression function vb/jscript [closed]

How to display some information on the label, as an example of the attribute "32710100010080123" too long. I just want to show four last number to "0123", help me to make vbscript expression label.
2
votes
2answers
230 views

ArcMap label with python if elif

I would like to translate a vbsript expression into a python expression. But it doesn't work! Here is the code in vbscript: Function FindLabel ( [CONTENU], [NOM_OBJET_USUEL], [ALTITUDE_FIL_EAU_M] ) ...
0
votes
1answer
70 views

FindLabel vbScript expression not working?

Below expression is not working Function FindLabel ( [NameEnglish], [Remarks], [FacilityType] ) namh = "" rems = "" fact = "" if not isnull ( [NameEnglish] ) then namh =...
0
votes
1answer
101 views

Combining label expressions? [closed]

How to combine below expressions Function FindLabel ( [Medium], [LocationStatus], [Status] ) if isnull ( [Medium] ) then FindLabel= "" else FindLabel = [Medium] & " Flowline" end ...
2
votes
1answer
714 views

Handling NULL values when using CInt?

This expression works perfectly when integer fields are 0 instead of NULL but now I am working with a GDB that has many NULL values. I'm not sure how to force CInt to only run if field is not null. ...
1
vote
2answers
91 views

Show Label if field1 + field2 = x

I'm trying to show a label if a field + another field = a certain value. Not sure the proper way to do this. I've tried cint([field1]) + cint([field2]) = x but that doesn't work either. It says the ...
0
votes
3answers
462 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 ...
2
votes
1answer
2k 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] &" ...