Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vbscript]

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

0
votes
0answers
10 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
14 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
36 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
43 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
29 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
56 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
68 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
35 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
448 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
420 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
830 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
16 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
2k 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
106 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
59 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
51 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
774 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
67 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
278 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
272 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
43 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
8k 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
465 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
277 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
139 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
54 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
1k 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
285 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
328 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
115 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
232 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
127 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
139 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
36 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
178 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
53 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
81 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
460 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
90 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
379 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
1k 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] &" ...
0
votes
2answers
59 views

Volume using VB Script of the field calculator

I am trying to compute the volume of the area given certain condition. I wrote the following VBScript code, however I am getting error that it has failed to do so. Can anyone look into it and ...
2
votes
1answer
45 views

Using ArcGIS field calulator with VB Script

My code looks like the following: if [LWS50yrp] <136.5 then [DMG_50y] = 0.1 elseif [LWS50yrp] >=136.5<154 then [DMG_50y] = 0.15 elseif [LWS50yrp] >=154<166 then ... ...
1
vote
1answer
258 views

Editing Field using VBscript or Python in Attribute Table?

I add a field called Name in attribute table in arcgis 10.1 but I can't edit this field. From this site, I have learned that this can be done by field calculator using VBscript or Python. As I have ...
0
votes
1answer
161 views

Label Expression If Statement remove Zeros

I am trying to perform a semi-complicated labeling expression that shows one field divided by another field and some additional fields with no division. The issue I ran into was that the denominator ...
3
votes
0answers
93 views

VBScript Syntax Error in ArcGIS labeling? [closed]

I have been using a script on older ArcGIS to convert depths in engineering format to the Hydrographic format seen on charts. On trying to use it I get a syntax error in Line 14. No matter how I ...
4
votes
2answers
158 views

Dropping & inserting specific characters within a field being used for labeling

I would like to find out how to properly format a conditional expression in labeling, so as to only get specific characters back out of a field that has 9 characters in it, but don't wish to label ...
5
votes
1answer
96 views

Change entire label style after certain extent

I need to design a dynamic label in ArcMap that changes its entire style after a certain zoom extent. The research I've done suggests to me that there is currently no way to use VBscript to manipulate ...