|
POST
|
Sorry I didn't expand on what was happening, if I run in catalog python window it was returning an empty list, but if I ran a standalone python window it would crash as per my original post and screenshot. thanks for your time
... View more
06-12-2017
06:06 PM
|
0
|
0
|
2857
|
|
POST
|
Xander Bakker your sample code has pointed out my issue. On line 11 you have this: arcpy.ListFeatureClasses(feature_dataset=fds) What i have been using in all my code is the equivalent of: arcpy.ListFeatureClasses(fds) So it seems for this tool to run on my machine I need to ensure I define the argument with feature_dataset= Thanks for your assistance everybody, I have been pulling my hair out with this one. When I install 10.5 I would be curious to know if I need to continue to name the argument as above.
... View more
06-12-2017
06:04 PM
|
0
|
0
|
2857
|
|
POST
|
ANSWER: I was missing the 'feature_dataset=' from line 14 of my test code. Credit goes to Xander Bakker for the sample code that pointed this out arcpy.ListFeatureClasses(feature_dataset=test_dataset) Hey All, I have ArcMap installed at version 10.3.1 and I have several automation scripts, and I have recently noticed all my scripts that use arcpy.ListFeatureClasses() fatally error out at that tool. Is someone else able to confirm they are able to run this without any critical errors? I have just used the below code to test it bare basics, if someone else could please assist by changing the three variables to suit, does it run successfully? import arcpy
connection = r"Database Connections\GISADMIN@SDE_Spatial@SDE-DB.sde"
arcpy.env.workspace = connection
test_dataset = r'Database Connections\GISADMIN@SDE_Spatial@SDE-DB.sde\SDE_SPATIAL.GISADMIN.Airport'
test_feature_within_dataset = r'Database Connections\GISADMIN@SDE_Spatial@SDE-DB.sde\SDE_SPATIAL.GISADMIN.Airport\SDE_SPATIAL.GISADMIN.Airport_Lighting_Zones'
print arcpy.Exists(test_dataset)
print arcpy.Exists(test_feature_within_dataset)
print 'It will fail at the next line of code'
print arcpy.ListFeatureClasses(test_dataset)
print '\n\nTEST COMPLETE' I am considering updating my machine to the latest version, but before I take this step I am hoping someone can confirm it doesn't work at this version? Thanks very much for your time. Cheers
... View more
06-08-2017
10:08 PM
|
0
|
8
|
5013
|
|
POST
|
Excellent, exactly what I require. I previously thought field mapping was for changing field types from one to another, I didn't realise that we could rename at the same time. Thats fantastic, exactly what I required. Cheers
... View more
03-22-2017
02:27 PM
|
0
|
0
|
1586
|
|
POST
|
Hey All, I have a feature class that resides within my SDE, I have added this to an ArcMap document, and created a join to a SQL Query Layer, the Table view looks good, showing field names, not alias. So I then run the Feature Class to Feature Class tool to convert it to a shapefile. I then take a look at the resultant shapefile, and I note that the field names have been exported, not retaining the Alias as viewed within the MXD. What I am wanting is to retain the field alias (or as much as possible with the naming constraints of a shapefile). Any ideas on how I can achieve this? Here is the original Feature Class properties: I think create a join to my SQL Query Layer: I then run Feature Class to Feature Class tool, and this is the name of the output fields:
... View more
03-21-2017
10:58 PM
|
0
|
3
|
2625
|
|
POST
|
I knew it was too close to finish time to be trying to think of something simple like that! haha Thanks!
... View more
02-06-2017
09:54 PM
|
0
|
0
|
4856
|
|
POST
|
Hi All, Just wondering if there is an easy way in the Query Builder to create a definition Query where the attributes first character starts with X?? Just for an example, in the below screenshot how would one create a query to return all features where the Feature_Type starts with the letter 'Y'?? At this stage it would only show YARRAMBA CRES. and YARRUNGA. I was thinking something like using LEFT(FEATURE_TYPE,1) = 'Y' but this is invalid, I am assuming there is some other easy way that I cannot think of at 5pm in the afternoon! #sql #definition query. Any suggestions?
... View more
02-06-2017
09:44 PM
|
0
|
4
|
7232
|
|
POST
|
Currently I right click on my DB connection as administrator, click the domains tab and type it into the grid in that window. We do not allow end users to have the admin password, so the end user cannot do this themselves, so I am trying to get around this by creating something they can use.
... View more
01-18-2017
04:22 PM
|
0
|
0
|
1290
|
|
POST
|
Hey All, I have an Enterprise GDB that has a feature class of our Road network (polylines). One of the fields within this Feature Class is 'Road Name', this has a domain applied to it so as end users cannot misspell road names when entering them. The bottleneck with this setup is that each time a new road is constructed in our Local Government Area the end users has to email me the road name, then I manually enter it into the domain myself. This can be a delay for the end user and is not ideal. My ideal scenario would be a toolbox tool that I can create so the end user can open it, and simply enter a road name and click run, and the road name will be added to the domain for them to use. I have no idea how to even start something like this, has anyone else got a similar setup with a solution I could apply? Cheers
... View more
01-16-2017
03:10 PM
|
0
|
4
|
2349
|
|
POST
|
That is interesting, it does indeed update the Min X and Min Y values accordingly. (this dataset is currently locked, so I couldn't save the changes), but it looks like it will do the trick. In response to Dan Patterson I have exported the data to a shapefile, and have run the check geometry tool and it has found 12 errors to repair. So when I get a chance I will run the Repair Geometry tool to resolve these issues also! Thanks for your comments.
... View more
12-21-2016
08:07 PM
|
0
|
0
|
1347
|
|
POST
|
Hi Dan, Just running that tool I get this error: ERROR 000314: Database Connections\GISADMIN@SDE_Spatial@SDE-DB.sde\SDE_SPATIAL.GISADMIN.Cadastre\SDE_SPATIAL.GISADMIN.land_parcels_active_region is not a Shapefile or a feature class in a Personal or File Geodatabase. I did fail to mention this is within our Enterprise GDB. I am thinking all I would have to do is export this FC to a FileGDB, then run the tool then re-import into the SDE. Do you think this may work? Cheers -Ben
... View more
12-21-2016
04:50 PM
|
0
|
1
|
1347
|
|
POST
|
Hi All, I have a polygon feature class of properties in our local city, and if I zoom to extents on this particular feature class it zooms right out to the never never, so I am assuming I have some rogue parcel of land drawn in. So I thought that if I select ALL parcels in my local city, open attribute table, and then invert my selection, it should show me the trouble parcel, but it does not show any selections at all... I am stumped as to how to clean this up. Anyone got any tips? This is where I would expect it to zoom extents: This is what actually happens:
... View more
12-21-2016
02:39 PM
|
0
|
5
|
2099
|
|
POST
|
Hi All, I am employed as GIS Administrator here in our Local Government office. Recently our permissions within the server have been reviewed and due to company policy the "Processadmin" role and the "CREATE FUNCTION", "CREATE PROCEDURE", "CREATE TABLE", and "CREATE VIEW" permissions also removed as it is a company security risk. I have been asked to provide reasoning as to why I should have these permissions. The only thing I can think of is for disconnecting users, are there other reasons I am not thinking of? The majority of my work is being done as the Data Owner, this has been unaffected and still works fine. Any suggestions or comments are greatly appreciated. Cheers
... View more
12-19-2016
04:08 PM
|
0
|
2
|
2198
|
|
POST
|
Just to close off my own question, it turns out that for some reason the permissions had changed on my Geodatabase Admin (SDE) User and this was causing the problem. I had to elevate to my in house IT Dept to resolve.
... View more
12-19-2016
03:56 PM
|
1
|
0
|
2028
|
|
POST
|
Hi All, I have three different levels of database connection in ArcCatalog on my PC which I use to connect to our Enterprise GDB for various reasons. I have my user level connection for data editing. I have one called GISADMIN which is the Data Owner. And another with is called SDE which is the Geodatabase Admin User. I have no access to the Database Admin User, this is managed by our in house I.T Dept. I am trying to use the arcpy.DisconnectUser function in a python script, but no matter which of the connections mentioned above I use, I get the following error: >>> arcpy.DisconnectUser(r'Database Connections\SDE@SDE_Spatial@SDE-DB.sde',123494)
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\__init__.py", line 1086, in DisconnectUser
return gp.disconnectUser(sde_workspace, users)
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 504, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Unable to disconnect: The connection ID provided is for the current administrator connection
>>> I have confirmed this by trying to use all three connections, also trying to disconnect several different connections from my Enterprise GDB. Something strange is that if I put a completely random session ID in my python snippet, the exact same error is returned.... I am perplexed as to why this is happening to me, and I am unable to track down why this seems to have started happening all of a sudden. Anyone have any troubleshooting ideas for me? Nathan Duncan Cheers -Ben
... View more
12-12-2016
06:49 PM
|
0
|
4
|
3462
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-17-2018 08:51 PM | |
| 1 | 09-23-2018 07:38 PM | |
| 1 | 04-08-2019 10:05 PM | |
| 1 | 02-03-2019 03:06 PM | |
| 1 | 12-20-2019 07:16 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|