IDEA
|
@JeffBarrette Thanks! Obviously this is not a normal type thing but now that i'm working thru it, I can see a lot of potential uses. Couple other thoughts: * It would be nice to have a similar method to ConvertLayoutFileToLayout for just the MAPX file. Seems like this function already does the work since it imports the Layout and Map... why can't I do the same with just the map? This technique is really useful for server-side geoprocessing services and the pagx/mapx files are easy to handle and keep in source control * I'm using 3.1.x right now (due to 11.1 at the Portal/Server level) and the .database and .updateDatabases isn't available until 3.2 ... took me a bit to figure out why i kept getting an error on thsoe. * I was able to update the homeFolder, default toolbox, default geodatabase using the specific properties you mentioned. However it leaves references to the original atbx and gdb in the project. Not a huge deal, someone can clean those open when they first open the project manually or otherwise not a big deal. The database one probably cleans up when you use the updateDatabases() method but I'm not seeing anything that allow you to remove the toolbox. removeItem() or a updateToolboxes method is probably needed as well?
... View more
a week ago
|
0
|
0
|
78
|
IDEA
|
@Rhys-Donoghue I came up with about the same process... however one thing i'm noticing is that the 'projects home folder' is still mapped to the original 'folder of the blank aprx'. Did you figure out a way to remap this?
... View more
a week ago
|
0
|
0
|
107
|
POST
|
Thanks Ben, I've probably worked out that solution as well... i have file level access to the config store so i'm able to open the item json and scrap the ids from there... not totally ideal but slightly faster than an api query and a bit easier to code.
... View more
2 weeks ago
|
0
|
0
|
37
|
POST
|
I'm seeing the same results ... none of the good result values are being populated according to the doc. Any chance you reported this as a bug?
... View more
3 weeks ago
|
0
|
0
|
82
|
POST
|
Thanks for the follow up... looks like someone else created an 'idea' for this: https://community.esri.com/t5/arcgis-pro-ideas/add-an-arcpy-mapping-analyzeforsd-equivalent-to/idc-p/1405280#M29212 but classically not getting thru ...
... View more
3 weeks ago
|
0
|
0
|
47
|
POST
|
It looks like the old AnalyzeForSD is still there library but is appears to fail opening the APRX ... from an ArcMap 10.8 install: mapping.py: def AnalyzeForSD(sddraft):
"""AnalyzeForSD(sddraft)
Analyzes Service Definition Draft ( .sddraft ) files to determine
suitability and sources of potential performance issues before converting
a Service Definition Draft file to a Service Definition ( .sd ) file.
sddraft(String):
A string that represents the path and file name for the Service Definition
Draft ( .sddraft ) file."""
import arcgisscripting
return convertArcObjectToPythonObject(arcgisscripting._analyzeForSD(*gp_fixargs([sddraft], True))) My attempt at running this in Pro... all the imports work and it seems to start reading the sddraft from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject
import arcgisscripting
from arcpy.geoprocessing._base import gp_fixargs
sddraft = r"C:\Temp\Map.sddraft"
r = convertArcObjectToPythonObject(arcgisscripting._analyzeForSD(*gp_fixargs([sddraft], True)))
Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: C:\Temp\Map.aprx
... View more
3 weeks ago
|
0
|
0
|
51
|
IDEA
|
@ShilpiJain Analyze BEFORE StageService is really needed for copyDataToServer=False. In my attempts, I've set this property to false, but the StageService copies all of my data to a local geodatabase before i could get the warning about the data source not being registered. This is unacceptable workflow as it puts an extreme load on the db server that wasn't necessary if it had given us the 'not registered warning' before attempting to pull it across. I've also run out of disk space, had file too big errors and other things associated with pulling too much data from a db server. If you're not going to add an 'Analyze' function then StageService tool should immediately quit with errors when copyDataToServer=False. Just like the UI does.
... View more
3 weeks ago
|
0
|
0
|
159
|
POST
|
@RonnieRichards Did you figure anything out on this? I'm having about the same issue... setting sharing_draft.copyDataToServer = False and I want to be able to get the 'data source not registered' warning/error BEFORE creating the .sd file. So far it will copy all the data locally, then tell me it's not registered. Which is especially not good for large datasets. The 'analyze' button in the UI must be doing something that's not exposed to the api or gp toolset?
... View more
3 weeks ago
|
0
|
2
|
54
|
POST
|
Hi All, This process was working correctly just recently, only change has been the latest ArcPro update. I'm basically following the examples in this help doc. Sample of bare min code to reproduce below. My service/task list is pretty complicated so the script is a HUGE time/mistake saver. I've tried a few tweaks and modified it down to just one tool and always get the same result. I've also tried the script with just a single, simple out-of-the box tool (AddXY) rather than the custom tools/scripts -- example below. Environment: ArcPro 3.2.2 ArcGIS Server (standalone 11.1) Process Results: sddraft and sd files get created (no warnings, errors in analyze) I've opened the sd archive and extracted. Everything looks fine. The toolbox contains tools to be published as tasks as configured sd file uploads fine to arcgis server service creates without error no arcgis server manager log errors or warnings nor obvious messages at info level Two issues: service task list is empty! minor but the message level setting does not take. SOC count and other service properties get set correctly. Repro script: result = arcpy.management.AddXY(
in_features=r"D:\temp\data\scratch\Default.gdb\GPXPoints"
) ^
sd = r"D:\temp\data\scratch\xy.sd"
sddraft = r"D:\temp\data\scratch\xy.sddraft"
serverconnectionfile = r"D:\temp\data\scratch\arcgis_on_server.com.ags"
serviceName = "XYTest"
analyzeMessages = arcpy.CreateGPSDDraft(
result, sddraft, serviceName, server_type="FROM_CONNECTION_FILE",
connection_file_path= serverconnectionfile,
copy_data_to_server=True, folder_name=None,
summary="XY Service", tags="gp", executionType="Synchronous",
resultMapServer=False, showMessages="INFO", maximumRecords=5000,
minInstances=2, maxInstances=3, maxUsageTime=100, maxWaitTime=10,
maxIdleTime=180)
analyzeMessages
#{'errors': {}, 'warnings': {}, 'messages': {}}
arcpy.server.StageService(sddraft, sd)
#<Result 'D:\\temp\\data\\scratch\\xy.sd'> Attached are the output sddraft and sd files Thanks for any insights.
... View more
03-15-2024
02:29 PM
|
0
|
0
|
219
|
POST
|
No i don't think so... the layer indices definitely stayed the same but those are defined in the properties
... View more
02-15-2024
12:36 PM
|
0
|
0
|
130
|
POST
|
Hi Eugene, (sorry replied on the wrong login) 1. I don't think i've upgraded or patched my version of Pro since that last publish. I'm running 3.1.2... looks like there's a 3.2.2 available so i'm going to see what happens if i update... 2. sorry for the confusion... My screen shots are just examples of the INT field. I have multiple fields that allow NULL, if the field is an INT and value = NULL, the publish process sets the value = 0, If the fields is STRING and value = NULL, the publish process sets the value = {empty string} or "" when viewed in JSON.
... View more
02-15-2024
12:21 PM
|
0
|
2
|
136
|
POST
|
Hi All, Something happened since early December with either Pro or AGOL. We have a feature service that gets updated on monthly-ish interval using the 'Overwrite Web Layer' button in ArcPro. The polygon layer getting published has multiple INT and STRING fields where 'Allow Null=True' and many of the features have NULL values. This was all fine and dandy when we last ran the update on 12/6/23. Today when we ran the update, all the null values are converted to something explicit. INT values are now 0, STRING values are now 'empty string'. This basically broke our application code that expects NULL as well as symbols, query and everything else where NULLs were expected. WTF? Luckily we caught this in a TEST version before deploying to PROD. How do we get the data to publish as NULL? Screen shot of a REST endpoint query for the same data on the PROD (nulls correct) and TEST (nulls converted to 0): I ran a few other publish tests to verify it's not just the 'overwrite' and get the same results. Here's screen shot from Pro of the features being published (source gdb) and the gdb that's extracted from the .SD file uploaded during the publish process. The nulls are being converted sometime in the 'publishing process'
... View more
02-15-2024
10:18 AM
|
0
|
4
|
175
|
IDEA
|
@KenGalliher1 Thanks! That's great. Unfortunately my particular case at the moment is 'traditional' versioning.
... View more
12-11-2023
10:05 AM
|
0
|
0
|
408
|
POST
|
@Bud yeah, the SQL profile is crazy lots of dynamic sql text and cursor fetches... the As&Ds look simple enough when you see a few edits on a version or two but the live data makes me think I'll miss something unless I know it's perfectly crafted. Current strategy is: SQL sproc: cursor over version names set_current_version select OIDs to temp (use editor tracking columns if it helps) merge against base temp OIDs do some tweaks for special cases ... we'll see
... View more
12-01-2023
11:32 AM
|
0
|
0
|
88
|
Title | Kudos | Posted |
---|---|---|
1 | 2 weeks ago | |
1 | 07-26-2023 03:18 PM | |
9 | 12-01-2023 09:37 AM | |
5 | 10-23-2023 11:31 AM | |
1 | 11-15-2022 10:58 AM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|