POST
|
Hi Jeff much appreciated. My problem with python is that in my job I only get to use it now and again, I pick things up and then forget it as there are long breaks in between. I will have to check out the book you suggested. I did find your use of tuples more complicated in my head but that's just because i have only heard of them and never used them. Thanks again
... View more
02-01-2021
08:17 AM
|
0
|
2
|
999
|
POST
|
Thanks Blake I know there are more than one way to do this but i can actually follow what is going on in this method. My problem with python is that in my job I only get to use it now and again, I pick things up and then forget it as there are long breaks in between.
... View more
02-01-2021
08:06 AM
|
0
|
1
|
1003
|
POST
|
Hi, I am relatively new to Python. I have created a script to create 8 Mobile Map Packages, 1 for each area required. I was just wondering if there is a better or more efficient way to write the code? Possibly looping through each area.Each one uses the same Map File but clips each based off a different layer file. I have the script scheduled to run weekly yo update each with the latest data. Any help, tips or advice would be greatly appeciated. Thanks import arcpy
arcpy.env.overwriteOutput = True
# Local Input Variables:
inputmapfile = r"'\\filelocation\Water Map Files\Water Network.mapx'"
inputn1layerfile = r"\\filelocation\Water Layer Files\North_1.lyrx"
inputn2layerfile = r"\\filelocation\Water Layer Files\North_2.lyrx"
inputs1layerfile = r"\\filelocation\Water Layer Files\South_1.lyrx"
inputs2layerfile = r"\\filelocation\Water Layer Files\South_2.lyrx"
inpute1layerfile = r"\\filelocation\Water Layer Files\East_1.lyrx"
inpute2layerfile = r"\\filelocation\Water Layer Files\East_2.lyrx"
inputw1layerfile = r"\\filelocation\Water Layer Files\West_1.lyrx"
inputw2layerfile = r"\\filelocation\Water Layer Files\West_2.lyrx"
# Local Output Variables
north1outputfile =r"\\filelocation\Mobile Map Packages\North 1 Water Network.mmpk"
north2outputfile =r"\\filelocation\Mobile Map Packages\North 2 Water Network.mmpk"
south1outputfile =r"\\filelocation\\Mobile Map Packages\South 1 Water Network.mmpk"
south2outputfile =r"\\filelocation\\Mobile Map Packages\South 2 Water Network.mmpk"
east1outputfile =r"\\filelocation\\Mobile Map Packages\East 1 Water Network.mmpk"
east2outputfile =r"\\filelocation\\Mobile Map Packages\East 2 Water Network.mmpk"
west1outputfile =r"\\filelocation\\Mobile Map Packages\West 1 Water Network.mmpk"
west2outputfile =r"\\filelocation\\Mobile Map Packages\West 2 Water Network.mmpk"
# Process: Create Water Packages
arcpy.CreateMobileMapPackage_management(inputmapfile, north1outputfile, in_locator="", area_of_interest= inputn1layerfile, extent="DEFAULT", clip_features="CLIP", title="North 1 Water Network", summary="Mobile Map Package of the North 1 Water Network", description="", tags="Water Network, North 1", credits="", use_limitations="", anonymous_use="STANDARD", enable_map_expiration="DISABLE_MAP_EXPIRATION", map_expiration_type="ALLOW_TO_OPEN", expiration_date="", expiration_message="This map is expired. Contact the map publisher for an updated map.")
arcpy.CreateMobileMapPackage_management(inputmapfile, north2outputfile, in_locator="", area_of_interest= inputn2layerfile, extent="DEFAULT", clip_features="CLIP", title="North 2 Water Network", summary="Mobile Map Package of the North 2 Water Network", description="", tags="Water Network, North 2", credits="", use_limitations="", anonymous_use="STANDARD", enable_map_expiration="DISABLE_MAP_EXPIRATION", map_expiration_type="ALLOW_TO_OPEN", expiration_date="", expiration_message="This map is expired. Contact the map publisher for an updated map.")
arcpy.CreateMobileMapPackage_management(inputmapfile, south1outputfile, in_locator="", area_of_interest= inputs1layerfile, extent="DEFAULT", clip_features="CLIP", title="South 1 Water Network", summary="Mobile Map Package of the South 1 Water Network", description="", tags="Water Network, South 1", credits="", use_limitations="", anonymous_use="STANDARD", enable_map_expiration="DISABLE_MAP_EXPIRATION", map_expiration_type="ALLOW_TO_OPEN", expiration_date="", expiration_message="This map is expired. Contact the map publisher for an updated map.")
arcpy.CreateMobileMapPackage_management(inputmapfile, south2outputfile, in_locator="", area_of_interest= inputs2layerfile, extent="DEFAULT", clip_features="CLIP", title="South 2 Water Network", summary="Mobile Map Package of the South 2 Water Network", description="", tags="Water Network, South 2", credits="", use_limitations="", anonymous_use="STANDARD", enable_map_expiration="DISABLE_MAP_EXPIRATION", map_expiration_type="ALLOW_TO_OPEN", expiration_date="", expiration_message="This map is expired. Contact the map publisher for an updated map.")
arcpy.CreateMobileMapPackage_management(inputmapfile, east1outputfile, in_locator="", area_of_interest= inpute1layerfile, extent="DEFAULT", clip_features="CLIP", title="East 1 Water Network", summary="Mobile Map Package of the East 1 Water Network", description="", tags="Water Network, East 1", credits="", use_limitations="", anonymous_use="STANDARD", enable_map_expiration="DISABLE_MAP_EXPIRATION", map_expiration_type="ALLOW_TO_OPEN", expiration_date="", expiration_message="This map is expired. Contact the map publisher for an updated map.")
arcpy.CreateMobileMapPackage_management(inputmapfile, east2outputfile, in_locator="", area_of_interest= inpute2layerfile, extent="DEFAULT", clip_features="CLIP", title="East 2 Water Network", summary="Mobile Map Package of the East 2 Water Network", description="", tags="Water Network, East 2", credits="", use_limitations="", anonymous_use="STANDARD", enable_map_expiration="DISABLE_MAP_EXPIRATION", map_expiration_type="ALLOW_TO_OPEN", expiration_date="", expiration_message="This map is expired. Contact the map publisher for an updated map.")
arcpy.CreateMobileMapPackage_management(inputmapfile, west1outputfile, in_locator="", area_of_interest= inputw1layerfile, extent="DEFAULT", clip_features="CLIP", title="West 1 Water Network", summary="Mobile Map Package of the West 1 Water Network", description="", tags="Water Network, West 1", credits="", use_limitations="", anonymous_use="STANDARD", enable_map_expiration="DISABLE_MAP_EXPIRATION", map_expiration_type="ALLOW_TO_OPEN", expiration_date="", expiration_message="This map is expired. Contact the map publisher for an updated map.")
arcpy.CreateMobileMapPackage_management(inputmapfile, west2outputfile, in_locator="", area_of_interest= inputw2layerfile, extent="DEFAULT", clip_features="CLIP", title="West 2 Water Network", summary="Mobile Map Package of the West 2 Water Network", description="", tags="Water Network, West 2", credits="", use_limitations="", anonymous_use="STANDARD", enable_map_expiration="DISABLE_MAP_EXPIRATION", map_expiration_type="ALLOW_TO_OPEN", expiration_date="", expiration_message="This map is expired. Contact the map publisher for an updated map.")
... View more
02-01-2021
06:54 AM
|
0
|
8
|
1032
|
POST
|
Prefect thanks again for all the help. I have used custom widgets that other users have created so I am familiar with hosting on an IIS server etc. Once again thanks for the help and information!
... View more
01-07-2021
03:26 AM
|
0
|
1
|
1510
|
POST
|
What i would have liked is to have a widget where the user could display the data as clusters but you have stated what i thought that i would have learn how to create custom widgets. To display the layer with cluster symbology through a webmap on Portal is this just using the heatmap symbology or is there another way to symbolise?
... View more
01-07-2021
03:13 AM
|
0
|
0
|
1513
|
POST
|
Hi Shay, Thanks for the quick response. Is there any guide on how to do this? For example when i download the info from that link, the folder structure is as follows: The apps i would use have a structure similar to this: Are there other steps i would have to take? Sorry about my lack of knowledge!
... View more
01-07-2021
03:01 AM
|
0
|
2
|
1515
|
POST
|
Hi, I am a complete newbie to Javascript, I normally use WAB and WAB Developer. Is there anyway to use the point clustering talked about in this blog: https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/summarize-and-explore-point-clusters-in-web-apps/ Within WAB? I don't think I have the access to install ArcGIS API for JavaScript . Is there someway to put this: https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster/index.html In a widget and bring it into WAB for the user to use. Thanks in advance!
... View more
01-07-2021
02:20 AM
|
0
|
7
|
1521
|
POST
|
Hi, When i try the share as map package tool i get the general function errors, I am using SDE data but i am ticking to include this data instead of referencing. I have also tried to create a map package using the Package Map geoprocessing tool. When i do this i also set to include data and i am setting an extent. In this case i get the following error: The data contains a geometric network and i was wondering if this is what is causing the error? When i reference the data it works fine but it does not clip the data to the extent set. The data i am trying to package is as follows: Settings as follows: Any help greatly apprenticed. Thanks
... View more
07-16-2020
07:57 AM
|
0
|
0
|
220
|
POST
|
Hi Xander Bakker Unfortunately i don't know when we will be upgrading!
... View more
07-16-2020
07:46 AM
|
0
|
0
|
1226
|
POST
|
Xander Bakker Both enterprise and portal are 10.6.1 Thanks for all your help it has been very useful and informative!
... View more
07-03-2020
06:01 AM
|
1
|
2
|
4765
|
POST
|
Hi Xander Bakker I tried to use the UrlEncode but get Execution Error:Runtime Error: Function Not Found: UrlEncode. Looking into the function it is only available from version 1.7 but i am trying to do this in our Portal which is 10.6.1 unfortunately
... View more
07-03-2020
12:59 AM
|
0
|
4
|
4765
|
POST
|
**UPDATE** Using %20 worked, the link says more info but i can live with that if this can't be changed. var removespaces = Replace($feature.FULLNAME, ' ', '%20')
... View more
07-02-2020
01:34 AM
|
1
|
6
|
4765
|
POST
|
Hi Xander Bakker You got me thinking the full name has spaces in it and that might be why this is not working, when the link is copied to an internet browser the spaces are automatically filled with %. After figuring this out I tried the following: var removespaces = Replace($feature.FULLNAME, ' ', '%') var link = 'http://telemweb/graph/' + removespaces +'?Historic&applet' IIf($feature["TELEMETRY_MATCH"]=='YES', link , 'Currently not linked to telemetry') However it does not return the correct output, it now just says no information available, is this % a special character, if I use ? the popup displays, although not the correct url: Example of full name : NWA1A BTCC C Diamond.Coolagh Road LM.Points.Coolagh Bolie Flow Example of full correct url: http://telemweb/graph/NWA1A%20BTCC%20C%20Diamond.Bolie%20WPS.Points.Analogue%20Inputs.Pumped%20Flow?Historic&applet
... View more
07-02-2020
01:10 AM
|
0
|
7
|
4765
|
POST
|
Hi Xander Bakker, The url starts http://telemweb/graph/ Then it contains the full name contained in the table, then finishes with ?Historic&applet How do i return it as a link? I made an attempt at using href= but i was unsuccessful. I was able to do it as a link when an image is included as media but this isn't a tidy solution when there is no valid link. Using the iif helped in these cases
... View more
07-01-2020
07:45 AM
|
0
|
9
|
4765
|
Title | Kudos | Posted |
---|---|---|
1 | 07-02-2020 01:34 AM | |
1 | 07-03-2020 06:01 AM |
Online Status |
Offline
|
Date Last Visited |
09-15-2021
09:54 AM
|