POST
|
I also closed all browsers and editors and reset the server. Then allowed full control of the wwwroot folder to all users: Still nothing.
... View more
08-03-2018
12:48 PM
|
0
|
0
|
2681
|
POST
|
I created this app in Web AppBuilder: ArcGIS Web Application I want to host it on our server. Here were my steps: 1. I first created a local test environment through the IIS Manager called C:\inetpub\wwwroot\GISApi 2. Through AGOL I clicked Create --> App: Using Web AppBuilder 3. Using Web AppBuilder developer version I created the app. It has two widgets, neither of which require a subscription to use. The content of the app (CSV file, hosted feature layer, web app, and the app) are all shared publicly. 4. After saving the finished app I went back to AGOL to download the zipfile. 5. I copied the zip to the GISApi folder then extracted it, and renamed the folder "Cooling". 6. I then tried running the app a few ways: a. I double clicked the index.html file, but the page never loaded: b. I put these URLs in the browser (Chrome) https://localhost/gisapi/Cooling/index.html , http://www.willcogis.org/website2014/gis/Cooling Here's what happened: There's no need for a proxy because the app's shared publicly. I then put a copy of the Cooling folder in our production folder. This is where the error message in the question title came from: I contacted ESRI and the tech downloaded the zip to his local server. He had the app up and running with no problems. I never went into the code at all so I'm guessing it might be my PC? At the moment I have a colleague in another department attempting to run the app from his PC on a different server.
... View more
08-03-2018
11:14 AM
|
0
|
4
|
4376
|
IDEA
|
For now I just double click the Layer in the Map Frame --> and in the Symbology tab click the color drop down --> Color Properties --> write down the RGB values. But, I'm all for having the Eye Dropper in Pro!!
... View more
08-02-2018
08:11 AM
|
0
|
1
|
5800
|
POST
|
Thanks for the help. @Dan I put mxd.save() after both try and except, but no difference. @michael I attempted saveACopy, but still no change in the data source. From what I read on Stack Exchange the findAndReplaceWorkspacePaths() function doesn't always work. I couldn't get it to work in three different scripts: arcpy - Getting findAndReplaceWorkspacePaths to work? - Geographic Information Systems Stack Exchange ArcGIS 10.2: ArcPy - how to replace workspace paths? - Geographic Information Systems Stack Exchange arcmap - ArcPy Changing Spatial Database Connection - Geographic Information Systems Stack Exchange Finally, I used this script, which has replaceWorkspaces(). And it worked. import os, arcpy
folderPath = r"\\gisfile\GISmaps\AtlasMaps\ATLAS_MAPS_18\Test Folder"
for fileName in [x for x in os.listdir(folderPath) if os.path.splitext(x)[1] == ".mxd"]:
fullPath = os.path.join(folderPath, fileName)
if os.path.isfile(fullPath):
mxd = arcpy.mapping.MapDocument(fullPath)
print "MXD: " + fileName
arcpy.env.workspace = fullPath
mxd.replaceWorkspaces("", "NONE", r"Database Connections\pathtoSDE.sde","SDE_WORKSPACE")
mxd.save()
del mxd
else:
print "error! {0} failed to be replaced".format(fullPath)
print "+++successfully changed data sources+++"
... View more
06-22-2018
02:26 PM
|
1
|
0
|
1183
|
POST
|
Thanks Dan, I see what you mean now. To run the program, I was using a shortcut of the Pythonwin.exe out of the 10.4 folder, I believe. That's what I'm doing now out of the 10.5 folder. In short, using a separate install of Python to run scripts that call the arcpy module will give you problems.
... View more
06-20-2018
01:00 PM
|
0
|
0
|
8228
|
POST
|
Update: I uninstalled ArcMap 10.5.1 then reinstalled. Might not have been necessary but it made sure i started fresh. I also deleted any folders referring to older versions of ArcMap. This is where I then installed the version of PythonWin you pointed out: C:\Python27\ArcGIS10.5\Lib\site-packages The pywin32-223.win32-py2.7.exe version is compatible with Python IDLE 2.7.13, which is the version that is installed with ArcGIS 10.5.1. After the install the PythonWin application lives here: C:\Python27\ArcGIS10.5\Lib\site-packages\pythonwin\Pythonwin.exe I think before I was simply not installing it in the correct location.
... View more
06-20-2018
12:21 PM
|
0
|
2
|
8228
|
POST
|
Jimmy, Thanks for the info. Did you install in your ArcGIS 10.5 folder? I did download the win32-py27 version as ArcMap requires Python 2.7. It saved to my 10.5 folder: C:\Python27\ArcGIS10.5. I got this Setup message and then finished the install. I'm not sure what this message meant. I opened Pywin and tried a few of my scripts. There were errors for all of them. It won't even import the Arcpy module, or any module for that matter. It seems as though it doesn't know where to find them. I uninstalled then reinstalled Pywin, but the same message appears. Have any idea what I'm doing wrong?
... View more
06-19-2018
12:36 PM
|
0
|
0
|
8228
|
POST
|
Dan, Line 21 never printed. But, that's OK because every layer points to the same "BonnScott.sde" connection. I think this would have printed if the connection had a name different from BonnScott. Yes, line 23 did print. Sorry, I should have mentioned that the script ran fine with no errors.
... View more
06-14-2018
01:10 PM
|
0
|
2
|
1183
|
POST
|
We have a new database connection and all our MXDs have to be updated. I ran a script to update the layers on a bunch of MXDs. Then I opened a map, right clicked a layer, properties, then checked under the source tab to see if the changes took place. But, the layer was still referencing the old connection. Is there a snippet I could include in this script, or something else, that verifies that the layers have indeed been updated? There is a print statement in the script, but that just prints the name of the MXD. It doesn't really give concrete proof. import arcpy
import os
def find_and_replace(MXD_workspace, oldPath, newPath):
arcpy.env.workspace = MXD_workspace
path = arcpy.env.workspace
for root, dirs, files in os.walk(path):
for name in files:
if name.endswith(".mxd"):
mxd_name = name
fullpath = os.path.join(root,name)
print mxd_name
print fullpath
mxd = arcpy.mapping.MapDocument(fullpath)
for df in arcpy.mapping.ListDataFrames(mxd):
for flayer in arcpy.mapping.ListLayers(mxd, "*", df):
if flayer.isFeatureLayer or flayer.isRasterLayer:
try:
mxd.findAndReplaceWorkspacePaths(oldPath, newPath, False)
print "Repaired the path for " + name
except:
print(mxd_name + " cannot replace paths")
mxd.save()
del mxd
print "complete..."
if __name__ == '__main__':
find_and_replace(r"\\gisfile\GISmaps\AtlasMaps\ATLAS_MAPS_18\CountyBoard",
r"Database Connections\BonnScott.sde",
r"Database Connections\gisEddy.gissql.sde") #(path2MXDs, path2oldGDB, path2newGDB)
... View more
06-14-2018
12:17 PM
|
0
|
5
|
1388
|
POST
|
Stephen, Thanks for the reply. Where would I download the source code from?
... View more
06-12-2018
08:03 AM
|
0
|
1
|
543
|
POST
|
In this webapp the input data displays in order that a user adds it. Is there a way to alphabetize it? I heard you can do this with the unique ID, but I'm struggling to see how. Here's how the data is displayed as of now:
... View more
06-12-2018
07:41 AM
|
0
|
3
|
678
|
POST
|
I updated from ArcMap 10.4 to 10.5 and now Pythonwin is not opening. Here is the full error message: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "pywin\framework\startup.py", line 49, in <module>
__import__(moduleName)
File "C:\Python27\ArcGIS10.4\Lib\site-packages\pythonwin\pywin\framework\intpyapp.py", line 3, in <module>
import win32con
ImportError: No module named win32con
It's looks as though it is because it's still rooted in the ArcGIS 10.4 folder. What is the best way to fix this?
... View more
03-20-2018
06:36 AM
|
0
|
8
|
11732
|
POST
|
Thanks for the help. I'll have to come back to this because i've been put on another project that should come first.
... View more
03-07-2018
06:22 AM
|
0
|
0
|
963
|
POST
|
https://community.esri.com/message/755067-arcpyfeatureclasstofeatureclassconversion
... View more
03-05-2018
01:37 PM
|
0
|
0
|
2148
|
Title | Kudos | Posted |
---|---|---|
1 | 2 weeks ago | |
1 | 07-30-2024 07:30 AM | |
4 | 12-13-2023 02:28 PM | |
1 | 07-23-2021 09:13 AM | |
2 | 12-12-2023 11:21 AM |
Online Status |
Offline
|
Date Last Visited |
3 hours ago
|