IDEA
|
Please display messages that references the arcpy.AddMessage() function in source python code that runs custom geoprocessing widgets when consumed from a geoprocessing service in Web AppBuilder. When one runs the geoprocessing service from the GP service REST endpoint, any print messages that reference arcpy.AddMessage() function in the source script are shown as the job is submitted and run. Is it possible for those messages to be displayed in the Geoprocessing Widget window when the job is being run to provide the user with some informational messages so they know something's happening?
... View more
01-31-2017
05:07 PM
|
11
|
0
|
1059
|
POST
|
Thanks for the reply. That's actually how I initially tried to perform this, but can't get the map object to save. The function I have is this to return the list of layers in the data frame: def list_layers_mxd(self, mxd_path, data_frame = "", layers = ""): mxd = arcpy.mapping.MapDocument(mxd_path) df = arcpy.mapping.ListDataFrames(mxd, data_frame)[0] layers = arcpy.mapping.ListLayers(mxd, layers, df) layers.sort() del mxd del df return layers so I reference that function in: def findreplace_paths_mxd(self, mxd_path, new_path): layers = deq_gis().list_laerys_mxd(mxd_path) mxd = arcpy.mapping.MapDocument(mxd_path) for lyr in layers[0]: old_source = lyr.workspacePath mxd.findAndReplaceWorkspacePaths(old_source, new_path, 'False') arcpy.RefreshActiveView() arcpy.RefrechTOC() mxd.save() del mxd in my mind this should save the changes made to the .mxd, but when I open the saved .mxd nothing has changed. Sometimes it works if referenced in the arcpy window in arcmap, using the 'current' reference. I removed all but one data frame, which helps if run in the desktop but still doesn't do anything in standalone code. Also, saveacopy() creates a new copy but doesn't save the workspace path change. Can't figure out if I'm doing something wrong or if there's a bug in the arcpy class library.
... View more
08-31-2012
08:54 AM
|
0
|
0
|
382
|
POST
|
Hello all, Got stuck trying to fix broken links in a series of mxds. I found if a map has more than one data frame, the findandreplaceworkspacepaths method is not working, or at least the mxd.save() call isn't saving the changes, even though the code runs without error. Even if I ran code similar below through the arcpy window using the 'current' map object call, and clicking the save icon in ArcMap or performing File->Save from the File menu in ArcMap does not save any changes. Once I removed all but one data frame from an mxd, the code and all save/save as operations worked fine. Is this a bug, or am I doing something wrong? Thanks ahead of time. I'm using ArcGIS v10sp4, and am just trying to change shapefile workspace paths in an mxd. Here is a quick code sample: import arcpy mxd = arcpy.mapping.MapDocument(r'\\filelocation\map.mxd') mxd.findAndReplaceWorkspacePaths(r'\\filelocation1', r'\\filelocation2') arcpy.RefreshTOC mxd.save() del mxd
... View more
08-30-2012
01:05 PM
|
0
|
3
|
1204
|
POST
|
We recently found our ArcPad .apm's cannot open .axf files after they've been deployed to a Trimble Juno 3B mobile device, running ArcPad v10sp4, after shutting down/restarting the device. Our .apm's have between 5-13 shapefile reference layers that are read only. The .axf's are editable, and run fine in the desktop environment. Our custom forms have no effect on the .axf when viewed from the desktop or mobile device, but cannot be added to or read from a .apm. During troubleshooting efforts to identify the problem, we noticed our code, .axf's, .apm's, etc all worked great on our Trimble Juno SB, which was running ArcPad v10sp3. Our ArcPad Field Application, associated workflow, data, and other files have performed flawlessly over the past few months via the Trimble Juno SB-ArcPad v10sp3 configuration. If one navigates on the Juno 3b to an .axf file, it will open in ArcPad as expected, but you cannot add a .axf to a map after shutting down and restarting the unit. So, we performed a hard reset on the Trimble Juno 3B, and deployed ArcPad v10sp3. This fixed the 'unreadable' .axf problem immediately on the Juno 3B. Therefore, we're removing ArcPad v10sp4 from all our GPS devices and computer workstation, and rolling them back to ArcPad v10sp3. My question to those in the know is: What's going on in ArcPad v10sp4 that won't allow reading an axf? We have already attempted several hard resets of the Trimble Juno's, and performed complete installs of ArcPad and SQL CE cab files, as noted in this forum posting (http://forums.arcgis.com/threads/59763-Can-not-read-layers-in-axf-file-in-arcpad?highlight=arcpad+can%27t+read+axf.) GPS & Computer OS Specs: Trimble Juno 3B Operating System: Windows Embedded 6.5 Handheld Trimble Juno SB Operating System: Windows Mobile 6.1 Classic Computer: Windows XP Pro SP3 Thank you, Chris
... View more
07-18-2012
10:20 AM
|
1
|
0
|
588
|
POST
|
Ditto -- I've found if I use simple symbology and remove labeling it 'usually' fixes the problem when using 'Get Data for ArcPad', but now I can't get it to work at all. What is going on here?
... View more
06-21-2010
03:33 PM
|
0
|
0
|
948
|
Title | Kudos | Posted |
---|---|---|
11 | 01-31-2017 05:07 PM | |
1 | 07-18-2012 10:20 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|