POST
|
Also, can you tell me if there is any sample data I can study?
... View more
09-18-2019
07:40 AM
|
0
|
1
|
945
|
POST
|
Thanks John. Can you point me to the other migration tools and methods?
... View more
09-17-2019
09:32 AM
|
0
|
1
|
945
|
POST
|
I found this text in the UN Migration Tools Documentation: "Related records should be consistently managed; for example, if a fuse point on an electric network is protecting all three phases, the related record should have three-unit records, one for each phase. It should not be also represented as one-unit record with all three phases." Is there an easy way to triple the amount of related records that I already have? Should the FuseUnit table specify which phase each unit is protecting? i.e. [Phase] = B
... View more
09-17-2019
08:05 AM
|
0
|
5
|
1062
|
BLOG
|
05-24-2019
07:29 AM
|
0
|
0
|
12256
|
BLOG
|
Does the barcode scanner have a character limit? I have two barcodes, both Code_39, one with eight characters (plus * on both sides), and one with 22 characters (plus *). The 22 character code won't scan.
... View more
05-23-2019
07:38 AM
|
0
|
0
|
12256
|
POST
|
OK - sorry to be such a pest. Your code as written is gold. I got this to work by adding a [FourthFailure] field. There was ONE inspection that failed four inspections. Thanks again Joshua Bixby and Randy Burton for so much help.
... View more
12-11-2018
09:17 AM
|
0
|
0
|
441
|
POST
|
Thanks to both of you. When I do change that line to == "FAIL", I get the error: Traceback (most recent call last):
File "C:\....py", line XX, in <module>
row[len(flds) + 1 + i] = v
IndexError: list assignment index out of range
... View more
12-11-2018
07:49 AM
|
0
|
2
|
3443
|
POST
|
Thanks again Bixby. I'm already indebted to you and can hardly imagine you take this another step further. That being said, I'll share that the script completed without error but the results are not as desired.
... View more
12-10-2018
02:40 PM
|
0
|
5
|
3443
|
POST
|
Thanks Bix. I wish I knew enough to debug why this isn't working for me. Does this pass through if a cmmon_fld doesn't exist? For example if "UGI_BarrierNeeded" didn't exist in the Capacitor feature class, would it just go on to the next or fail? I cannot get past line 32 in your example. I'm getting error: "A column was specified that does not exist." I put some print statements to help me get down to the bottom but I'm still clueless. print("begin meat")
for fc in fc_list:
for fld in new_flds:
arcpy.AddField_management(fc, **fld)
with arcpy.da.UpdateCursor(fc,common_flds + [fld["field_name"] for fld in new_flds]) as cur:
print ("cur defined")
print (str(fld))
print (str(new_flds))
for row in cur:
print("begin row in cur") Here are the print results: begin meat cur defined {'field_type': 'TEXT', 'field_name': 'ThirdFailure', 'field_length': 40} [{'field_type': 'TEXT', 'field_name': 'From_FC_Name', 'field_length': 20}, {'field_type': 'TEXT', 'field_name': 'FirstFailure', 'field_length': 40}, {'field_type': 'TEXT', 'field_name': 'SecondFailure', 'field_length': 40}, {'field_type': 'TEXT', 'field_name': 'ThirdFailure', 'field_length': 40}] Traceback (most recent call last): File "C:\Users\..........py", line XX, in <module> for row in cur: RuntimeError: A column was specified that does not exist.
... View more
12-10-2018
09:00 AM
|
0
|
8
|
3443
|
POST
|
Thanks for your reply and sorry for the confusion. I'm new to python and scripting in general. Line #25 I did butcher for this post. Yes, my screenshot is showing common columns in the 16 feature classes. All 16 feature classes get inspected for all the same things - we just keep them separated because they're different features (Poles vs. Transformers vs. Capacitors, etc). My thought is that the "MergedFeatureClass" will have an additional 3-4 fields, on top of [From_FC_Name]. Those 3-4 additional fields would be named [FirstFailure], [SecondFailure], [ThirdFailure], etc. Rarely does an inspection have more than one fail. So if CapacitorFeatureClass fails in the [UGI_GraffitiRemoval] column then I want the row under MergedFeatureClass' [FirstFailure] column to contain the attribute of "UGI_GraffitiRemoval". If Capacitor fails UGI_GraffitiRemoval and UGI_BarrierNeeded, then [FirstFailure] and [SecondFailure] would get populated with the respective column name.
... View more
12-08-2018
01:27 PM
|
0
|
10
|
3442
|
POST
|
I have sixteen different feature classes that mostly have the same fields that share the same domain (Pass/Fail). I want to create a script that (1) creates a new FC bringing these all together, New_Feature_Class field examples: [FirstFailure], [SecondFailure], and [ThirdFailure]. then (2) populates rows with Field Name IF [Field] = Fail. If a row from one of the original 16 feature classes have no fields with a 'Fail', then none of the new [Failure] fields would get populated. I've created the first part (below), I just can't even imagine how the second part happens. import arcpy
from arcpy import *
import os
arcpy.env.overwriteOutput = True
database = "C:\\etc"
arcpy.env.workspace = database
fc_list = arcpy.ListFeatureClasses()
for fc in fc_list:
fieldname = "From_FC_Name"
arcpy.AddField_management(fc, fieldname, "TEXT", field_length = 20)
with arcpy.da.UpdateCursor(fc, fieldname) as cursor:
for row in cursor:
if row[0] == None:
row[0] = str(fc)
cursor.updateRow(row)
arcpy.ClearEnvironment("workspace")
final_fc = "path"
arcpy.CreateFeatureclass_management(final_fc)
arcpy.Append_management(fclist2, final_fc)
... View more
12-07-2018
02:25 PM
|
0
|
12
|
4584
|
POST
|
So I tried doing a "copy the sent data to a new survey". It got uploaded to AGOL but without the photo.
... View more
08-01-2018
11:35 AM
|
0
|
0
|
1059
|
POST
|
I signed in and tried to resubmit. They're gone from the Outbox, they're in Sent, but still they don't show up in AGOL. I have 200+ other surveys uploaded from other devices, with photos.
... View more
08-01-2018
11:03 AM
|
0
|
1
|
1059
|
POST
|
There are attachments included, probably 99% of them have attachments. The survey is public, I am the survey owner, and I am an "Admin Lite" in my org.
... View more
08-01-2018
09:58 AM
|
0
|
3
|
1059
|
Title | Kudos | Posted |
---|---|---|
1 | 05-03-2023 07:31 AM | |
1 | 05-15-2024 11:28 AM | |
1 | 10-04-2023 07:37 AM | |
1 | 05-02-2023 09:05 AM | |
1 | 12-20-2022 12:00 PM |
Online Status |
Offline
|
Date Last Visited |
09-06-2024
05:07 PM
|