Wow, thank you so much for your efforts! I will try it out the next days
Thanks for this tool! Exactly what I need. Only, I'm having the following trouble. Can you troubleshoot your code for me? I'm using ArcGIS version 10.6. The error message I receive is as follows ... many thanks in advance:
Running script Point2Rectangle... Failed script Point2Rectangle... Traceback (most recent call last): File "C:\Users\username\AppData\Roaming\ESRI\Desktop10.6\ArcToolbox\My Toolboxes\point2rectangleID.py", line 62, in <module> main() File "C:\Users\username\AppData\Roaming\ESRI\Desktop10.6\ArcToolbox\My Toolboxes\point2rectangleID.py", line 18, in main AddIDField(fc_out, fc_in, fld_id) File "C:\Users\username\AppData\Roaming\ESRI\Desktop10.6\ArcToolbox\My Toolboxes\point2rectangleID.py", line 58, in AddIDField arcpy.AddField_management(fc_out, fld_id, fld_in.type, fld_in.precision, fld_in.scale, fld_in.length) File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 3424, in AddField raise e ExecuteError: Failed to execute. Parameters are not valid. WARNING 000012: OBJECTID already exists ERROR 000800: The value is not a member of TEXT | FLOAT | DOUBLE | SHORT | LONG | DATE | BLOB | RASTER | GUID. Failed to execute (AddField). Failed to execute (Point2Rectangle).
Can you share the data that you are using? I probably know what is going wrong, but would like to validate some things.
Thank you for such a quick reply. I actually resolved it myself ... I was premature with my question, and was actively editing my post when you replied. The problem lies with using the feature class' FID or OBJECTID as the unique identifier for "ID field". I created a new column and copied the FID over, and the tool worked properly when I directed it to use that column as the "ID field". However, I suppose you could edit your code to account for a user using the FID/OBJECTID as the "ID field" since it is listed as a valid field in the drop down menu.