I want to extend my polyline to a given distance. How can I do this. I have attached image to clear my specification.
I am using .net in arcmap . I am also using python
Perhaps you are looking for something like this? arcgis 10.1 - A tool or way to Extend line by specified distance? - Geographic Information Systems Stack Exchange
I've put the script into a working script tool attached to this thread for you to try.
I agree with Reza, you need to figure out what you want to use first
arcpy - Extend line to specific distance or a line - Geographic Information Systems Stack Exchange
Useful to extend a line both ways by using with flip tool.
Thanks, Luke Sturtevant for creating a toolbox for this script, this tool seems to be the solution I'm looking for. Unfortunately, I receive an error with the following information when I try to use the script with a feature class in a file geodatabase in ArcMap 10.6:
Traceback (most recent call last):File "C:\Users\bschroeder\Desktop\Extend Lines.tbx\Extend Lines.tbx#extendLines2.py", line 54, in <module>SystemError: error return without exception set
Traceback (most recent call last):
File "C:\Users\bschroeder\Desktop\Extend Lines.tbx\Extend Lines.tbx#extendLines2.py", line 54, in <module>SystemError: error return without exception set
Any thoughts on what may be causing the error Arthur Crawford?
Hi Britta Schroeder. Sorry to hear the script isn't working for you. Amazingly after 5 years I downloaded the script tool and ran it on some sample data in a geodatabase and it worked. I'm guessing that error you are seeing is due to a schema lock on the data or perhaps the environment the data are in. Additionally, you could try initiating an edit session in the script by using arcpy.da.Editor before the script enters the update cursor near the end of the script. You could also try exporting the data to a shapefile or possibly a new geodatabase and testing the script on the new export.
Thanks, Luke Sturtevant, it was user error: my dataset was GCS with degree units and I was trying to enter a number intended for meters (which exceeded 360). It works great with the right units (said NASA).
Ahh okay. Yes, that script could certainly be refined to do some linear conversions based on spatial reference of the input or force a consistent projected spatial reference throughout processing regardless of the inputs. Glad you got it to work though!
Retrieving data ...