Hi, I'm struggling to get a line to draw in my map document using a custom toolbox created with the Python add-in wizard for ArcGIS. The purpose of the toolbar is to select a DEM from a combobox of current rasters held within the opened map document, and then draw a line using the line button which is then converted into a 3D line and the profile of that line is copied to the windows clipboard for use in another program. The copying to clipboard part works fine, but when I try to have the currently drawn line display as a layer in the map document I get the following error message:
Traceback (most recent call last):
File "C:\Users\zieglerhm\AppData\Local\ESRI\Desktop10.5\AssemblyCache\{9B995FC4-0120-42F1-B20B-EBA53140BC41}\CopyProfileToClipboard_v4_addin.py", line 64, in onLine
pline_lyr_mem = arcpy.management.MakeFeatureLayer(dddline, "ProfileLine")
File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\management.py", line 6965, in MakeFeatureLayer
raise e
arcgisscripting.ExecuteError: ERROR 000622: Failed to execute (Make Feature Layer). Parameters are not valid.
ERROR 000628: Cannot set input into parameter out_layer.
This is the entire code with the exception of the function definition for copy(), which is used on the last line in the code to copy the profile to the windows clipboard.
Any ideas what I'm doing wrong here? I'm stomped.. been trying to crack this for hours.
Thank you for any help!