|
POST
|
OK...I think I have other issues, Maybe you can help???? I have an app I wrote 7 months ago that is now having issues....I am trying to do some updates to it and I get the white screen...I can remove the framework.controls and that might help thank you But now it appears I have other issues.... I was using am older template Quick Report App and now when I RUN it from QtCreator its telling me: "Type QuickReportApp unavliable" Is this due to the newer version of appstudio that it errors out? Can I fix this by simply uninstalling the new version and install an older version of AppStudio and QtCreator?
... View more
09-22-2021
07:15 AM
|
0
|
3
|
2243
|
|
POST
|
can you please tell me how you did this....how did you revert.....I am in a huge time crunch and need to make a change and create a new app....I dont have time to rebuild my whole app
... View more
09-22-2021
06:18 AM
|
0
|
5
|
2256
|
|
POST
|
Thanks for your reply's....very appreciated... I think we are talking about two different approaches....I was trying to use an older .py file but was told that its out of date (see below). As @ZacharySutherby points out in this post here and I mentioned in one of my comments above, the original update media folder script is now outdated and contains modules that have been superseded by the ArcGIS API for Python. We have updated this script to use the ArcGIS API for python and the updated script is present in our Survey123-tools github repo. Then was told that I should use ArcPro Notebook and the github repo below...because the other one was out of date. These extended blog posts are so confusing with X amount of potential solutions in them. I am so confused. I am running my code from ArcPRO and from a Notebook Tab... The Notebook script starts like this and DOES NOT run in a .py file...There is no .py file.... So what does the start of your .py file look like and how does it authenticate.... import arcgis
from arcgis.gis import GIS
import tempfile
import zipfile
import shutil
import os
# Script Parameteres
portalURL = r'https://www.arcgis.com'
username = 'xxxxx'
password = 'xxxxx'
itemID = '00da9adxxxxxxxxxxdd81d290'
updated_files = ['GameCheckQuery.csv']
source_loc = r'C:/Users/Desktop/Project/Update_Media_Folder/Update/'
download_folder = r'C:/Users/Desktop/Project/Update_Media_Folder/Download/'
#----------------------------------------------------------
# Connect to GIS
gis = GIS(portalURL, username, password, verify_cert=False)
#------------------------------------------------
survey_manager = arcgis.apps.survey123.SurveyManager(gis)
surveyId = survey_manager.get(itemID)
surveyProp = surveyId.properties
print(surveyProp)
... View more
09-08-2021
01:31 PM
|
0
|
1
|
1305
|
|
POST
|
Yea I get the gis='pro' thing.... How do you automate a script that is embedded inside the ArcPro project? Are you using Windows Task Scheduler? Have you used ArcGIS Notebook Server before?
... View more
09-08-2021
12:08 PM
|
0
|
3
|
1308
|
|
POST
|
So I cannot use .py files and schedule any longer??? I have to use ArcPro and Jupyter ??? How do I automate the script running? Do I need to install ArcGIS Notebook Server to automate this? Whats the difference between Jupyer in Pro and ArcGIS Notebook Server?
... View more
09-08-2021
10:31 AM
|
0
|
5
|
1865
|
|
POST
|
Thanks Doug So if I have the code baked into an ArcGIS Pro project in a "New Notebook" tab how do I automate it to run nightly. It appears I can no longer use a .py file and use Task Scheduler to run it nightly.
... View more
09-08-2021
10:28 AM
|
0
|
0
|
1866
|
|
POST
|
OK I think I have this working from ArcGIS Pro on my Laptop....it appears to be updating and uploading this to AGOL. Most Important How do I automate it to run when I want it to. I am new to using Pro and it appears to be baked into an ArcGIS Pro project?????
... View more
09-08-2021
05:34 AM
|
0
|
8
|
1875
|
|
POST
|
Im confused....I know I have the correct Credentials but keep getting coming up with a NULL for the token I am trying to get via the script. This returns NULL...any thoughts print "token: " + json.dumps(agol_helper.token) NOTE: I have ArcMap 10.8.1 installed. I have python 2.7 and python 3.4 on my machine. Could this be causing the issue? If so is there a way that I can specify to use python 2.7? It appears I am using 2.7.18 print ("...Starting")
# initialize the portal helper class
# ago.py is part of the 10.3 python install
agol_helper = ago.AGOLHelper(portal_url)
print portal_url
print ("...Authenticating")
# login
print credentials['userName']
print credentials['passWord']
agol_helper.login(credentials['userName'], credentials['passWord'])
print "token: " + json.dumps(agol_helper.token)
print ("...Querying")
# get the name of the zip file
serviceInfo = getServiceDefinition(agol_helper.token, itemID) Noting that I updated the "portal_url" parameter for my AGOL online account....line 11 # User Parameters
# ItemID of the Form item you want to update
itemID = "00da9adCr45f4f15b3443ecadd81vfgh"
# Local folder where the Form data will be downloaded (include a / at end of path)
download_folder = "C:/Users/tjv34534/Desktop/CWD_Project/Update_Media_Folder/"
# Updated file name (ie MyList.csv)
updated_file = "CheckQuery.csv"
# Folder path of the updated file (include a / at end of path)
source_loc = "C:/Users/tjv34534/Desktop/CWD_Project/Update_Media_Folder/UpdatedMediaFiles/"
# Address of your ArcGIS portal
portal_url = r"https://xxxxxx.maps.arcgis.com/"
# ArcGIS user credentials to authenicate against the portal (case sensitive)
credentials = {'userName' : 'xxxxx', 'passWord' : 'xxxxx'}
# ArcGIS portal security type (LDAP, NTLM, OAuth, Portal, PKI)
security_type = "Portal"
... View more
09-07-2021
09:50 AM
|
0
|
10
|
1894
|
|
POST
|
What zip file? I have to create a Zip file everytime?
... View more
09-02-2021
07:14 AM
|
0
|
1
|
1917
|
|
POST
|
So right now I have 4 media files. The excel file points to them. Do I simply add these CSV files to my AGOL folder? How do I update the excel file to point to these files in AGOL? I would then republish and it should now point to the files in AGOL??? How? Are there any examples of how to update these tables via python?
... View more
08-30-2021
06:15 PM
|
0
|
2
|
2957
|
|
POST
|
There are other things my lists do as in prepopulate etc.... I am looking for an automated process that I can replace the Media Files at will and then automatically republish the project nightly. Preferable from Python script.
... View more
08-30-2021
03:35 PM
|
0
|
4
|
2961
|
|
POST
|
What is the ago.AGOLHelper I know I have the correct UserName and Password but I am getting a NULL for the agol_helper.token agol_helper.token = NULL agol_helper = ago.AGOLHelper(portal_url)
print ("...Authenticating")
# login
agol_helper.login(credentials['userName'], credentials['passWord'])
print ("...Querying")
# get the name of the zip file
serviceInfo = getServiceDefinition(agol_helper.token, itemID)
... View more
08-30-2021
01:17 PM
|
0
|
0
|
2967
|
|
POST
|
I found this https://www.arcgis.com/home/item.html?id=521168944ace40d0827991eeeba03689 I am just trying to figure out what is happening....I dont even know if I can still use this as its from 2017 !! What Zip file? Do I need to zip up the whole project or just the media files? I'm really confused as to what is going on....I assume that I can use this to update my media files daily if need be.
... View more
08-30-2021
12:05 PM
|
0
|
1
|
2975
|
|
POST
|
I have an existing project that has a few media files. I have frequent updates to these media files as well as occasional form updates. I need a python script that I can run via scheduler that will publish this project nightly. I have read a bunch of posts but cant find anything clearly stated that shows how to do this. Is there anyone out there that can help provide a solution?
... View more
08-30-2021
11:49 AM
|
0
|
23
|
6212
|
|
POST
|
Declare Variable Set variable to the field property in Renderer In my case I had to get the real field name...passed the value from the dropdown box to a function and RETURN the real field name I did #3 above with a listener on change of the Dropdown box I set that to the renderer... rendererPolygon.field = returned real name Then add the layer to the map Any questions hit me up.... var speciesChoosen2, originalSpecies;
var fieldChoosen = ""; // varaible holding field value to render on
var rendererPolygon = new ClassBreaksRenderer({
type: "class-breaks",
field: fieldChoosen
});
const monumentLayer = new FeatureLayer({
title: "National Monuments",
fields: [
{
name: "OBJECTID",
alias: "ObjectID",
type: "oid"
}
],
objectIdField: "OBJECTID",
geometryType: "polygon",
source: resultsPolygonLayer2.graphics,
renderer: rendererPolygon,
popupTemplate: {
title: '"{' + fieldChoosen + '}"'
}
});
// SNIP
Function getFieldName(typeName){
if (typeName == "some value") {
fieldChoosen = "field1";
return "field1";
}
else if (typeName == "typeName") {
fieldChoosen = "field2";
return "field2";
}
else {
fieldChoosen = "";
return "nothing found";
}
};
// SNIP
dropdownSelect.addEventListener("change", function() {
var type = event.target.value;
var e = document.getElementById("well-type");
originalSpecies = e.value;
var fieldValue2 = getFieldName(originalSpecies);
speciesChoosen2 = fieldValue2;
fieldChoosen = speciesChoosen2;
rendererPolygon.field = speciesChoosen2;
// SNIP
// Noting that this is all done before adding the layer to the map. Its all about timing.
function addFeatureLayer(){
map.add(monumentLayer);
monumentLayer.refresh();
}
... View more
06-01-2021
09:13 AM
|
0
|
0
|
1459
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|