POST
|
Hi guys, I am trying to work out a calculation (either python or VBscript) in ArcGIS that will enable me to calculate mass site names that include both text and sequential numbers. I need a field calculation that will add the same text at the start of each attribute (e.g. "JCB-"), and then a number following it which corresponds to the site's numerical unique ID. So for example: I have a site, with an ID of 1994. It was found at a location called JCB, so its site name needs to be JCB-1994. Then, the following site ID may be 458, so it would be JCB-458. As they may not be consecutive numbers, I need the field calculator to take the numerical information from the existing attribute ID and not simply run the next consecutive number. Can anybody suggest a script I can use? I have used something similar in the past but have recently moved office and lost the reference sheet I was using I thank you in advance! Jess
... View more
03-12-2017
06:32 PM
|
0
|
1
|
756
|
POST
|
Champion- that worked perfectly. Thank you all so much, you have really helped me out!!
... View more
02-15-2016
06:16 PM
|
0
|
0
|
513
|
POST
|
Thank you Wes! that worked! Although it gave the SITE_NAME decimal points, i.e. MTP-100.0, MTP-101.0. Is there any way to prevent it displaying as decimal points? Otherwise, I am very happy- thank you so much!
... View more
02-15-2016
06:07 PM
|
0
|
2
|
513
|
POST
|
Hi Dan, thank you for replying. This was a process that I attempted earlier, to no avail unfortunately. I simply get the message, "There was a failure during processing, check the Geoprocessing Results window for details". I have attached the results in case that helps. It would appear that it is having an issue with trying to concatenate a string and a number attribute? at least, this is what Error 000539 means. .
... View more
02-15-2016
05:51 PM
|
0
|
0
|
513
|
POST
|
Hello, I am hoping somebody is able to help me. I manage several point feature classes that relate to heritage sites in NSW. Each of these sites is also attributed a state identifying number as they are registered with the government. I am hoping to simplify the editing process by running a field calculation. The feature class contains a UNIQUE_ID (type: double) attribute, as well as a LEASE (Type: string) attribute, and these two values together comprise the same information reflected in the third attribute, called SITE_NAME, which represents the state registered site name. For example: UNIQUE_ID: 100 LEASE: MTP SITE_NAME: MTP-100 I would have thought it'd be simple to generate a field calculator for SITE_NAME by combining UNIQUE_ID and LEASE: SITE_NAME = [LEASE] + [UNIQUE_ID] and this would eliminate the need to generate code to add numbers on to each entry etc., as the site name number directly reflects the UNIQUE_ID. However I have run multiple calculations with different inputs and each time it fails. Can anybody suggest what I am doing wrong? I am absolutely terrible at using Python so I was hoping I could use VBScript for this, but I'll take what I can get. TIA, Jess
... View more
02-15-2016
05:06 PM
|
0
|
6
|
2095
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|