POST
|
Hi @Lake_Worth_BeachAdmin, I want to publish 30 pdfs to Arcgis Online, I use the same code but i want to modifiy the propreties like this : Name of one of my pdfs : Map_community_A3_TEST_61001 Template : ([DOCUMENT_TYPE]_[OBJECT]_[FORMAT]_[NAME]_[CODE]) I want to modifiy pdf_propreties from pdf_propreties = {'type':'PDF', 'description':'PDF upload for map viewer','title':pdf_name, 'tags':'OPENDATA', 'access':'Public'} To : pdf_propreties = {'type':'PDF', 'description':'DOCUMENT_TYPE, FORMAT, NAME','title':NAME, 'tags':'DOCUMENT_TYPE, FORMAT, NAME, CODE', 'access':'Public'} Do u think there's a way to do it ? Thank you 🙂
... View more
04-16-2021
05:54 PM
|
0
|
0
|
1434
|
POST
|
Hi @davedoesgis, Did find a solution ? i have the same problem! Thank you 🙂
... View more
04-12-2021
07:08 AM
|
0
|
1
|
850
|
POST
|
Hey @Martin1 , Can u post the full script please ! Thank you !
... View more
03-24-2021
06:52 AM
|
1
|
2
|
2266
|
POST
|
Hi @CecíliaSouza , Can u post the full script please ? Thank you.
... View more
02-17-2021
07:22 AM
|
0
|
2
|
1664
|
POST
|
Hey @JakeSkinner, I modified some things and it worked perfectly, Thank you for your help 🙂
... View more
01-15-2021
08:20 AM
|
0
|
1
|
1811
|
POST
|
what i want to do is reuse the script below but i want it to search each service and overwrite it with the new one...because my first script it publishes the layers separately as Feature Services. import arcpy
import os, sys
from arcgis.gis import GIS
# Start setting variables
# Set the path to the project
prjPath = r"D:\Sample Data\SampleWorking\SampleWorking.aprx"
# Update the following variables to match
sd_fs_name = "ShereeTest"
portal = "https://www.arcgis.com/"
user = "enter_username"
password = "enter_password"
# Set sharing options
shrOrg = True
shrEveryone = True
shrGroups = ""
# End setting variables
# Local paths to create temporary content
relPath = r"C:\GIVE_A_FILE_DIRECTORY"
sddraft = os.path.join(relPath, "WebUpdate.sddraft")
sd = os.path.join(relPath, "WebUpdate.sd")
#Create a new sddraft and stage to sd
print("Creating SD file...")
arcpy.env.overwriteOutput = True
prj = arcpy.mp.ArcGISProject(prjPath)
mp = prj.listMaps()[0]
arcpy.mp.CreateWebLayerSDDraft(map_or_layers=mp,
out_sddraft=sddraft,
service_name=sd_fs_name,
server_type="HOSTING_SERVER",
service_type="FEATURE_ACCESS",
folder_name=None,
overwrite_existing_service=True,
copy_data_to_server=True)
arcpy.StageService_server(in_service_definition_draft=sddraft,
out_service_definition=sd)
print("Connecting to {}".format(portal))
gis = GIS(portal, user, password)
# Find the sd, update it, publish it with overwrite and set sharing and metadata
print("Search for original SD on portal...")
sdItem = gis.content.search("{} AND owner:{}".format(sd_fs_name, user), item_type="Service Definition")[0]
print("Found SD: {}, ID: {} n Uploading and Overwriting...".format(sdItem.title, sdItem.id))
sdItem.update(data=sd)
print("Overwriting existing feature service...")
fs = sdItem.publish(overwrite=True)
if shrOrg or sheEveryone or sheGroups:
print("Setting sharing options...")
fs.share(org=shrOrg, everyone=shrEveryone, groups=shrGroups)
print("Finished updateing: {} - ID: {}".format(fs.title, fs.id))
... View more
01-07-2021
02:50 AM
|
0
|
4
|
1849
|
POST
|
@JakeSkinner No, I modified the layers manually on Arcgis Pro, now I want to overwrite the old services that I had previously published...
... View more
01-07-2021
02:12 AM
|
0
|
6
|
1809
|
POST
|
Hey @JakeSkinner, I made a script for the publication of feature services from Arcgis pro to Online. but what i did is publish all the layers separately, each layer has its own service. to do this i used a loop, now i want to update the layers i had posted, if you have any idea how to do it please ! This is the script that i used : import arcpy
import os
# Sign in to portal
arcpy.SignInToPortal('https://.arcgis.com', 'UserName', 'Password')
in_server = "https://*********.fr/server/"
# Set output file names
outdir = r"F:\Projet_ArcGisPro\TEST\Output"
# Reference map to publish
aprx = arcpy.mp.ArcGISProject(r"F:\Projet_ArcGisPro\TEST\TEST.aprx")
m = aprx.listMaps()[0]
lyrs = m.listLayers()
for lyr in lyrs:
service = lyr.name
sharing_draft = m.getWebLayerSharingDraft("HOSTING_SERVER", "FEATURE", service, lyr)
sharing_draft.summary = lyr.name
sharing_draft.tags = lyr.name
sharing_draft.description = lyr.name
sharing_draft.credits = lyr.name
sharing_draft.useLimitations = lyr.name
sharing_draft.portalFolder = "SERVICES_OpenData"
print(service)
sddraft_filename = service + ".sddraft"
sddraft_output_filename = os.path.join(outdir, sddraft_filename)
# Create Service Definition Draft file
sharing_draft.exportToSDDraft(sddraft_output_filename)
# Stage Service
sd_filename = service + ".sd"
sd_output_filename = os.path.join(outdir, sd_filename)
arcpy.StageService_server(sddraft_output_filename, sd_output_filename)
# Share to portal
print("Uploading Service Definition...")
arcpy.UploadServiceDefinition_server(sd_output_filename, in_server,"","","","","","","SHARE_ONLINE","PUBLIC","SHARE_ORGANIZATION")
print("Successfully Uploaded service.") Thank you for your help 🙂
... View more
01-07-2021
01:52 AM
|
0
|
8
|
1776
|
POST
|
Hey Peter, I'm trying to publish individually all the layers in arcgis pro to AGOLE, not as a single Feature Service with all layer at the same time (Every layer has his own feature service). I'm currently using this code : import arcpy
import os
# Sign in to portal
arcpy.SignInToPortal('https://Example.maps.arcgis.com', '*******', '*******')
# Set output file names
outdir = r"F:\Projet_ArcGisPro\******\******"
service = "WebMap"
sddraft_filename = service + ".sddraft"
sddraft_output_filename = os.path.join(outdir, sddraft_filename)
# Reference map to publish
aprx = arcpy.mp.ArcGISProject(r"F:\Projet_ArcGisPro\******\*****.aprx")
m = aprx.listMaps(Carte)[0]
lyrs = m.listLayers()
for lyr in lyrs:
service = lyr.name
sharing_draft = m.getWebLayerSharingDraft("HOSTING_SERVER", "FEATURE", service, lyr)
sharing_draft.summary = "My Summary"
sharing_draft.tags = "My Tags"
sharing_draft.description = "My Description"
sharing_draft.credits = "My Credits"
sharing_draft.useLimitations = "My Use Limitations"
# Create Service Definition Draft file
sharing_draft.exportToSDDraft(sddraft_output_filename)
# Stage Service
sd_filename = service + ".sd"
sd_output_filename = os.path.join(outdir, sd_filename)
arcpy.StageService_server(sddraft_output_filename, sd_output_filename)
# Share to portal
print("Uploading Service Definition...")
arcpy.UploadServiceDefinition_server(sd_output_filename, "My Hosted Service")
print("Successfully Uploaded service.") And I'm getting this error : Can you help me please ! Thank you !
... View more
11-27-2020
07:19 AM
|
0
|
1
|
2733
|
POST
|
Thank you Mr Carlson for your help i will try it. Kind Regards,
... View more
11-26-2020
06:08 AM
|
0
|
0
|
953
|
POST
|
Hey i'm trying to publish a webmap from Arcgis pro to Online... I keep getting this error message : ExecuteError: Failed to execute. The parameters are not valid. ERROR 000732: Server: The My Hosted Services dataset does not exist or is not supported Failed to execute (UploadServiceDefinition).
Thank you for help
... View more
10-30-2020
06:30 AM
|
0
|
0
|
756
|
BLOG
|
Hey Frank, We use Outlook Excange, after research i found that Integromat does not support Outook...
... View more
09-24-2020
12:12 AM
|
0
|
0
|
7980
|
Title | Kudos | Posted |
---|---|---|
1 | 03-24-2021 06:52 AM |
Online Status |
Offline
|
Date Last Visited |
09-29-2021
08:02 AM
|