|
POST
|
What I am trying to figure out is by doing this in Model Builder: I want to be able to write an expression with the Calculate Field tool in a model to say if the attribute in the PARCEL_TYPE field is Condo, then copy the related attribute in the PID_1 Field into the PID_NEW field. In the past, I would do this manually. Now, I am building a model to do this automatically. Thank You
... View more
11-02-2016
12:27 PM
|
0
|
1
|
1241
|
|
POST
|
I have a polygon feature class within a file geodatabase that contains parcel information for our utility district. I am working on building some models to update the parcel data from raw data. One of the areas that I am stuck on is with using the Calculate Field tool. One of the fields has (2) attributes (Proxy and Condo). What I am trying to do is to select all rows that have an attribute of "Condo" and copy the PID (Parcel Number) into a new field. Also, to enter the attribute "Condo" into a new field as well. Not sure how to select the PIDs that have the 'Condo' attribute and copy only those records into a new field. Thank You for the help
... View more
11-02-2016
07:32 AM
|
0
|
3
|
1975
|
|
POST
|
The I get: "RuntimeError: Unspecific error" Says something about line 20 Does the code and everything look okay? I added your suggestion and nothing.
... View more
09-19-2016
03:14 PM
|
1
|
1
|
769
|
|
POST
|
Today is not my day apparently. I am running this through IDLE/Command Prompt I keep getting a runtime error. This is the code I have for the UpdateCursor. Maybe something is wrong?? fc = "C:\MEWCo GIS System\Electric System\MEWCo_Electric_Model-LOCAL.gdb\Secondary\SERVICE_LOCATION"
fields = ["ACALARA_TYPE", "ACALARA_MODEL", "ACALARA_METER_TYPE"]
def proc(actype, acmodel):
# try except block handles non-handled cases!
try:
if actype == 75 and acmodel == 130:
result = "CEN3S4S20"
elif actype == 109 and acmodel == 2:
result = "UMT2.1"
else:
# we ran into an uncovered case
raise(Exception)
except:
raise ## remove this line after you get it working
result = "undefined"
return result
with arcpy.da.UpdateCursor(fc, fields) as rows:
for row in rows:
row[2] = proc(row[0], row[1])
rows.updateRow(row) Thank You
... View more
09-19-2016
02:41 PM
|
0
|
4
|
2711
|
|
POST
|
I know there is a way to run this process through Arcpy Update Cursor. However, I am not sure exactly how to start the code.
... View more
09-19-2016
11:46 AM
|
0
|
6
|
2711
|
|
POST
|
Curtis: Thank you for the reply and the script. I tried entering it into Calculate field through the FC Table. However, all of the fields in the ACALARA METER TYPE field got filled in with "undefined" from the last part of the script.
... View more
09-19-2016
11:36 AM
|
0
|
3
|
2711
|
|
POST
|
I have been looking around the internet all morning to figure out how to write a Python script to accomplish what I need to do, and so far, I am not finding what I need. Need to see if someone can start me in the correct direction. I have (2) text fields: ACALARA TYPE and ACALARA MODEL with coded meter type attributes Another field: ACALARA METER TYPE will hold the actual Meter Type The data in the first two fields is held in a different database and I have a Python script built that will take that data and update these Feature Class Fields. What I need to do is build a second python script that is composed of an if/else statement. EXAMPLE: If ACALARA TYPE = 75 and ACALARA MODEL = 130 Then the ACALARA METER TYPE field will update to show "CEN3S4S20" If ACALARA TYPE = 109 and ACALARA MODEL = 2 Then the ACALARA METER TYPE field will update to show "UMT2.1" There are around 2 dozen other combinations with additional Meter Type outputs that I will have to include Figuring out how to write this code will help with other Feature Classes that I have been updating manually. Thank You
... View more
09-19-2016
11:00 AM
|
0
|
12
|
4917
|
|
POST
|
Wanting to know how to print the value/attribute from a specific field within the GDB table to the Shell Window
... View more
08-08-2016
09:48 AM
|
0
|
1
|
3440
|
|
POST
|
All of these are really helpful. The only thing that I do not know how to do and not being answered is when the results are produced in the Geodatabase Table from the Summary Statistics tool into a specific field is how to tell the Python script to "print/report" the value in that field in the Python shell. I know it may not make sense why I am doing it that way, but for me it works. I want to use the Python scripts that I am designing to run outside of ArcGIS, so when the script is complete, the data/results display in the Python Shell window. Thank You
... View more
08-08-2016
09:35 AM
|
0
|
3
|
3440
|
|
POST
|
The way I have been doing it is export the data into an Excel file and then use the Sum tool in Excel and than manually convert it. I want to be able to have the ability to do this in Python. Right now, i am building it in IDLE and want the final result to show in the IDLE Shell. Not sure how I get the results that are populated in the Geodatabase table to "Print" to the shell.
... View more
08-05-2016
01:50 PM
|
0
|
0
|
3440
|
|
POST
|
I have a good idea on the SearchCursor and the Summary Statistics. Been able to get the sum total of all the lines and it automatically saves into a table. What I need to do is run this in IDLE and have the results from the field that shows the total, "Print" in the python Shell once the script is complete.
... View more
08-05-2016
01:39 PM
|
0
|
2
|
3440
|
|
POST
|
I have a feature class composed of Overhead and Underground Electric Conductor, along with a different feature class of main water lines. I am attempting to build a python script that I can use to add into a tool for a "One-Click Button" to calculate and display the TOTAL distance of all of the lines in and feature class. To start, I am looking for some direction on designing and writing the Python script that will do this and produce the results of the total distance of conductor, water line in feet and miles. Any help on what tools to use to give the results would be great. Thank You
... View more
08-05-2016
01:24 PM
|
0
|
9
|
5402
|
|
POST
|
Sounds good. I will mess around with some different workflows and see what works the best. Thank You
... View more
07-29-2016
10:08 AM
|
0
|
1
|
5425
|
|
POST
|
Dan: Thank you for that. I actually just found that after doing a google search. I'm still trying to learn the complex world of Python scripting and takings different bits of script and putting them together. The way the script is written is set to run in ArcMap or ArcCatalog. How would I modify the script to run specifically in IDLE since the script is designed to run from Arc Toolbox with the user adding in text parameters? There would be about (12) different file(s) that all would go into the same File Geodatabase and result in (12) new geodatabase tables.
... View more
07-29-2016
10:00 AM
|
0
|
3
|
5425
|
|
POST
|
I am currently running ArcGIS 10.2.2 and would like to run a script through IDLE. I have around (12) different .TXT files of parcel data that is produced on a weekly basis from the county GIS database and want to be able to import them into a File Geodatabase - geodatabase table. From there, I have a good understanding of what to do from there to incorporate any changes into my working datasets. Its the beginning part that I am having issues with. Instead of doing table by table by hand, would like a Python script to do this for me automatically.
... View more
07-29-2016
09:25 AM
|
0
|
5
|
5425
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-23-2026 10:58 AM | |
| 1 | 11-20-2025 02:52 PM | |
| 1 | 10-30-2025 12:42 PM | |
| 1 | 10-16-2025 10:51 AM | |
| 1 | 08-27-2025 08:47 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|