|
POST
|
Scenario: 1. Developer "A" has a working WAB app, published to AGOL organization account and works perfectly. 2. Developer "B" takes over WAB app originally built by Developer "A" and has some requested changes to apply to it. Developer "B" acquires the .zip file of the currently deployed WAB, attempts to "Import" it in WAB Developer installed locally and gets error: "Parse app failed". Just how does Developer "B" import that WAB to make changes via WAB Developer (local install) and redeploy to AGOL? Thanks!
... View more
03-09-2016
07:59 AM
|
0
|
9
|
4437
|
|
POST
|
arcpy.InsertCursor # Create insert cursor for table
rows = arcpy.InsertCursor("c:/base/data.gdb/roads_lut")
# Create 25 new rows. Set the initial row ID and distance values
for x in range(1, 26):
row = rows.newRow()
row.setValue("rowid", x)
row.setValue("distance", 100)
rows.insertRow(row) arcpy.da.InsertCursor fields = ['rowid', 'distance']
cursor = arcpy.da.InsertCursor('c:/base/data.gdb/roads_lut', fields)
for x in range(0, 25):
cursor.insertRow((x, 100)) Not tested, just going off of the help doc InsertCursor—Help | ArcGIS for Desktop Edit: that link doesn't work if clicked, strange. Just copy/paste url into a new browser address box.
... View more
03-04-2016
08:33 AM
|
1
|
0
|
8256
|
|
POST
|
Likely not a python issue if it had been working. What is the sdeFolder variable set to? Is it an actual valid path? Does test.sde actual exist in that folder? I'd think you could do some quick checks directly in ArcCatalog.
... View more
03-03-2016
11:42 AM
|
0
|
1
|
1795
|
|
POST
|
Hi David --- probably not what you want to hear, but I cannot reproduce this issue with my install of WAB1.3 on the Attribute Table widget. I was sure to clear my browser's (Chrome) cache, re-launched nodejs session, even had to re-enter my portal address --- but the settings I had configured for the widget and service had "stuck" just fine for me. This was tested on a web layer that is saved to My Content and shared out. That web layer was created by adding a Map Service to a WebMap, setting symbology and other properties, then saving it to My Content (as a Feature Service). I'll give it a try with just a straight-up Map service as well. Edit: It looks like it takes any and all services (Feature or Map service) from the source WebMap and makes them all Feature Services because you cannot configure a specific Map Service like I was thinking. Anyway -- I don't seem to have the issue you are experiencing.
... View more
03-02-2016
12:43 PM
|
0
|
2
|
1427
|
|
POST
|
Just a wild guess and I haven't tested or attempted to run this idea but perhaps you should try to copy each input table to in_memory workspace first and use that as the input, then delete it from the workspace after each iteration. for infile in listing:
#remove file extesnion. Just a guess here.
inputTab = infile[:-4]
#check to see if it exists and delete it if so
if arcpy.Exists(r"in_memory\\" + inputTab):
arcpy.Delete_management(r"in_memory\" + inputTab)
#copy the input table to the in_memory workspace and use it to perform the task
arcpy.TableToTable_conversion(infile, r"in_memory\", inputTab)
newfeature_shp = outshape[:-4]+str(index)+".shp"
arcpy.XYToLine_management(inputTab, newfeature_shp, .....]
index+=1
... View more
03-01-2016
05:51 AM
|
0
|
0
|
2497
|
|
POST
|
I thought so! Hope all is well! (City of North Port was my first consulting gig many moons ago). I'll have to dig a bit to see what else might be the problem. It's always a challenge to work thru nulls, empty strings and those that appear to be empty but are padded.
... View more
02-24-2016
10:06 AM
|
0
|
14
|
2191
|
|
POST
|
You may have mentioned this already, but the examples will work with TEXT field types (eg, it's possible LOCN or you address Number column is actually a number type column?). Anyway... See if this adaptation works better. It's just looking for empty strings (ie, "not input1") or actual strings (ie, "input1"). Also, in my sample data I thought I was looking at an empty value but it actually had a space in it --- so it was treated as an actual value and did not evaluate as expected. This is why I included the .strip() into the input variables). def processInput(input1, input2, input3):
if (not input1.strip()) and (not input2.strip()):
return input3.lstrip()
elif (input1.strip()) and (not input2.strip()):
return input1 + " " + input3
elif (not input1.strip()) and (input2.strip()):
return input2 + " " + input3
else:
return input1 + " " + input2 + " " + input3 (I wish I could write this more elegantly like some of the other contributors! Need to work on that)
... View more
02-24-2016
08:13 AM
|
0
|
16
|
2191
|
|
POST
|
You need to check if the list you are building contains any digits because if you return anything with only text it will bomb since the field you are calculating is type Integer. def makestr(test):
numlist = []
for s in test:
if s.isdigit():
numlist.append(s)
retlist = ''.join(numlist)
if any(char.isdigit() for char in retlist):
return retlist
... View more
02-24-2016
07:34 AM
|
1
|
3
|
2579
|
|
POST
|
Like Adrian mentions, you will need to add some Pre-Logic code to the expression. From the field calculator: 1. Right click the field to calculate and in the Field calculator dialog, choose the appropriate Parser (ie, Python) 2. Place a check in the "Show Codeblock" box 3. In the Pre-Logic Script Code: section, add a def() that should look something like (I'm not totally certain about the exact logic desired, but this will get close I think): def processInput(input1, input2, input3):
if input1 == "" or input2 == "":
return input3
else
return input1.strip() + "" + input2.strip() + "" + input3.strip() 4. In the box below the Pre-Logic script area, enter in the def() name and add your field parameters: processInput( !LOCN!, !LOCD!, !LOCS!) Order them appropriately. edit: apologies as I'm showing strictly from the Field Calculator dialog, which does not specifically address the original question of a field calculation from within a model or python script. You will have to adapt this as needed.
... View more
02-23-2016
12:13 PM
|
1
|
4
|
4001
|
|
POST
|
We simply use Windows task scheduler pointing to individual .cmd/.bat files that execute .py scripts. Aside from managing dev/test/prod versions, it's pretty straight forward.
... View more
02-17-2016
01:47 PM
|
1
|
0
|
3971
|
|
POST
|
Just as a quick test, I'd comment out the infile.write just to see if the print statement is invoked in the else part of the condition. If that's the case, the problem isn't with your conditional statement, it's with that .write line.
... View more
02-12-2016
09:02 AM
|
1
|
1
|
4022
|
|
POST
|
Unfortunately at the moment I have no exposure/skill in the .NET ecosystem, or any of its languages. I agree this type of requirement begs for a .NET approach, and someday soon I may need to just learn something solid about it. All of the information required to learn it is out there. For free.
... View more
02-12-2016
08:53 AM
|
0
|
0
|
1924
|
|
POST
|
Sounds more like a need to develop a .NET add-in rather than python. In my experience, python is more useful/in-line with Geoprocessing than it is manipulating ArcObjects and other UI components to ArcGIS.
... View more
02-12-2016
08:26 AM
|
1
|
2
|
1924
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-17-2020 10:47 AM | |
| 1 | 10-25-2022 11:46 AM | |
| 1 | 08-08-2022 01:40 PM | |
| 1 | 02-15-2019 08:21 AM | |
| 2 | 08-14-2023 07:14 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-22-2025
02:28 PM
|