POST
|
Thanks, I was able to take your script and with some slight modifications, I think it's going to work for what I need! Really appreciate the help!
... View more
08-18-2014
11:54 AM
|
0
|
0
|
645
|
POST
|
I'm trying to build a process in Model Builder that takes several SDE Feature Classes (all named M_X_*) and exports them to shape files in a given directory. This seems easy enough, but there are two issues that I'm not sure how to address: Each shape file that gets exported needs to be renamed to something different, with no logic behind the naming convention (M_X_CASING becomes xCasing, M_X_AERIAL_MARKER becomes xAirMrkr, etc.) One of the feature classes is too large and needs to be split into two shape files. Essentially, we use a where clause and just export it twice. In the past, this entire process was done using a command line script and the sde2shp.exe ArcSDE Utility, but we'd like to get away from that. I was thinking we could wrap all of this into a geoprocessing service that could be executed on demand through ArcMap. Is there a way to do this using the model builder? Maybe a way we could build a lookup table with the feature class name, the name of the exported file, and the where clause, and then iterate through it? Or would I be better off writing a custom python script to do this?
... View more
07-31-2014
01:04 PM
|
0
|
2
|
3630
|
POST
|
I finally figured out the issue (after far too long, I might add!). SQL Server Native Client was installed, but the connection file was setup using an alias to the database server, not the server name itself. The database aliases are stored in the registry on each machine and they had not been pushed to any of the new GIS servers we had provisioned. I got the registry file that I needed to create the proper entries and it works perfectly now. Thanks for the help!
... View more
07-31-2014
07:53 AM
|
0
|
0
|
809
|
POST
|
I did some further investigation. I was able to use the ListFeatureClasses() method on a file geodatabase succesfully from the server, so it appears like it may be an issue when accessing the SDE through the connection file. The connection file is setup as a database connection with databse authentication, and I don't have any issues accessing the feature classes through ArcCatalog on my desktop.
... View more
07-30-2014
09:58 AM
|
0
|
0
|
809
|
POST
|
I wrote a python script that simply lists out all of the feature classes in our SDE database, which I'm running directly through the Python Shell. The script will eventually export feature classes from our SDE database to a file geodatabase via Windows Task Scheduler, but I was having trouble getting that to work, so I simplified it to do some testing. The script is below:
import arcpy
from arcpy import env
env.workspace = "//mplgis-fs.moc.com/gis_data/connections/ConnectiontoMPLGIS-TEST.sde"
print arcpy.ListFeatureClasses()
On my desktop PC (Win 7 64-bit, ArcGIS for Desktop 10.2.2), the script executes correctly and returns the list of features: But when I run it on the server (Windows Server 2008R2, ArcGIS for Server 10.2.2), it does not return any feature classes, and I'm stumped as to why that is: Any thoughts on what might be causing it? In the screenshots I show that the server is using the ArcServer license, while the desktop is using the ArcInfo, but I'm not sure if that should make a difference.
... View more
07-29-2014
12:59 PM
|
0
|
8
|
4022
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|