POST
|
Managed to resolve. instead of Tables = arcpy.ListTables("FHRT_20*") I should have used Tables = arcpy.ListTables("GISTEST.TEST.FHRT_20*") as the wild card. I missed the database and the user name. Now it works. Thank you Dan and Joshua for your kind effort to help me.
... View more
08-13-2019
10:45 PM
|
1
|
0
|
351
|
POST
|
It is happening only when the workspace is an sde database connection (C:\\Users\\app_arcgis\\AppData\\Roaming\\ESRI\\Desktop10.3\\ArcCatalog\\VMAPPDBUAT_GISDEL_GIS.sde) The code lists tables when the workspace is a file geodatabase (\\\\scamain\\gis_data\\FHRITest\\FHRITest.gdb) and deletes the table listed in line 6 of the following result, which is the oldest in the tables' list. >>>
10 tables found
[u'FHRT_20190810_070048', u'FHRT_20190814_070034', u'FHRT_20190813_153517', u'FHRT_20190813_153907', u'FHRT_20190813_154351', u'FHRT_20190813_154438', u'FHRT_20190813_154801', u'FHRT_20190813_154945', u'FHRT_20190813_155547', u'FHRT_20190813_155829']
FHRT_20190810_070048
>>>
... View more
08-13-2019
08:55 PM
|
0
|
2
|
351
|
POST
|
Hi Joshua, Thank you for your quick help. I tried to delete old three tables and I created the script like the following import arcpy arcpy.env.workspace = "\\\\main\\gis_data\\FHRITest.gdb" Tables = arcpy.ListTables("FHRT_20*") print(Tables) old_three = sorted(Tables, reverse=False)[:3] print ("\n" + "Following are the tables:" + "\n") print (old_three) arcpy.Delete_management(old_three, "table") and the script is throwing the following error [u'FHRT_20190805_161001', u'FHRT_20190805_161142', u'FHRT_20190805_162929', u'FHRT_20190805_163204', u'FHRT_20190805_163527'] Following are the tables: [u'FHRT_20190805_161001', u'FHRT_20190805_161142', u'FHRT_20190805_162929'] Traceback (most recent call last): File "N:\Scripts\DeleteOldTables.py", line 11, in <module> arcpy.Delete_management(old_three, "table") File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 4092, in Delete raise e RuntimeError: Object: Error in executing tool It must be very easy for you to resolve the issue.
... View more
08-12-2019
08:32 PM
|
0
|
5
|
1136
|
POST
|
I have been using ArcGIS 10.3.1. I have a list of tables in an enterprise geodatabase with date and time in the table name. Every day one table is created, as an outcome of some geoprocessing tasks with the date and time in the table’s name when the table is created. Naming format of the tables are FHRT_YYYYmmdd_HHMMSS Like FHRT_20190808_071015 (this table is created on 08 August 2019 at 07:10:15) FHRT_20190807_071218 (this table is created on 07 August 2019 at 07:12:18) FHRT_20190806_071119 FHRT_20190805_071913 FHRT_20190804_071418 FHRT_20190803_071014 FHRT_20190802_070815 etc. I want to create a python script that will keep the latest 3 tables (in this example FHRT_20190808_071015, FHRT_20190807_071218 and FHRT_20190806_071119) and delete the rest with similar name format. The geodatabase may have other tables with other name format (cadastre, property etc.), I do not want to touch those. Being new in Python I do not know how I would create the script that will specify the dates. I mean how will I instruct the script to keep the 3 tables that have the latest dates and delete the older tables? What module do i need to import and what would be the statement? Thank you in advance. Regards, Hafiz
... View more
08-07-2019
11:00 PM
|
0
|
14
|
1758
|
POST
|
Thanks Johannes. I tried that way before publishing this post. It did not give me the desired output. I appreciate your help.
... View more
08-09-2016
04:44 PM
|
0
|
0
|
966
|
POST
|
Hi, I have a line feature and a polygon feature for roads. The polygons do not have always the same width. The line features of the roads are not the center line of the roads but those line features are within the polygon features. I want to cut the polygon features according to the length of the line features. How can I do that? In the attachment I have shown the polygon features and the line features for roads and selected two line features to show the length. I want to cut all the polygon features in the polygon feature class according to the length of the all the line features in the line feature class. Any help is appreciated. Thanks. Hafiz
... View more
08-08-2016
07:36 PM
|
0
|
5
|
11737
|
POST
|
Thank you Richard. I am just wondering if there is any way to make it default so that any attribute table I open it shows all the records. Regards, Hafiz
... View more
05-19-2016
11:55 PM
|
0
|
3
|
1224
|
POST
|
Hi, Can someone please help me in the following regard? I want to see all the records of attribute table but it shows only 2000 records. How can I see it? Any help is appreciated. Regards, Hafiz
... View more
05-19-2016
10:58 PM
|
0
|
6
|
5775
|
POST
|
Morning Michael, Thank you for your quick reply. Please get the log file (Loaded.txt) attached. Type of the fields are both "String". I use alpha-numeric IDs. The version I am using is 6.26.2015. I would be really happy to get help to make the "Update_Linked_Record" working. Thank you for your help. Regards, Hafiz
... View more
04-03-2016
05:08 PM
|
0
|
1
|
1239
|
POST
|
Hi Michael, I use this tool extensively. I have been working at Wingecarribee Shire Council in New South Wales, Australia. We use this tool for managing Water, Sewer, Road and Drainage assets. Please get the table attached. Cheers, Hafiz
... View more
03-31-2016
11:12 PM
|
0
|
0
|
892
|
POST
|
Good day Pascal, I was trying to use UPDATE_LINKED_RECORD but unfortunately I could not make it work. Might I ask for your help please? I have two tables in the same geodatabase - "Manholes", which is a feature class and "Table", which is just a table. In "Manholes" among other fields there are GIS_ID and Address fields. In "Table" there are Business_ID and Address1 fields. GIS_ID and Business_ID fields contain same data. I will insert data into Address field and I want to update Address1 field with the help of UPDATE_LINKED_RECORD. This is what I did: OBJECTID * TableName FieldName ValueMethod OnCreate OnChange OnManual Comments RuleWeight OnChangeGeo ValueInfo 2558 Manholes ADDRESS UPDATE_LINKED_RECORD True <Null> True <Null> <Null> <Null> Table|Address1|GIS_ID|BusinessID Might I request you to prepare the dynamic value table for me and attach here as an excel file or send me at sehafiz@gmail.com? Thank you for your help. Kind regards, Hafiz
... View more
03-31-2016
10:45 PM
|
0
|
3
|
1239
|
POST
|
I have created a version for myself from the Default geodatabase. I have been using ArcPad 10.2 and ArcMap 10.2. When I checkout data in ArcMap from my version the axf file is not created. But when I checkout the data from the Default version the axf file is created. For your convenience I have attached 2 screenshots - one from the result of my geodatabase and another from the result of default geodatabase. 1. I need to know why is it happening. 2. What is the way to create the axf file from my version? I would highly appreciate your help. Thank you. Regards, Hafiz
... View more
12-14-2014
08:53 PM
|
0
|
1
|
2896
|
Title | Kudos | Posted |
---|---|---|
1 | 08-13-2019 10:45 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|