For example, I have a custom tool "wellTabletoFC". When I pull up the Item Description, it gives me a syntax as if it can be used within the console:
wellTabletoFC<SPAN class="punctuation token">(</SPAN>Input_Table<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
When I drag the script into the Python window, I get this code:
<SPAN class="operator token">>></SPAN><SPAN class="operator token">></SPAN> arcpy<SPAN class="punctuation token">.</SPAN>wellTabletoFC<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
Runtime error
Traceback <SPAN class="punctuation token">(</SPAN>most recent call last<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
File <SPAN class="string token">"<string>"</SPAN><SPAN class="punctuation token">,</SPAN> line <SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">in</SPAN> <SPAN class="operator token"><</SPAN>module<SPAN class="operator token">></SPAN>
AttributeError<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">'module'</SPAN> object has no attribute <SPAN class="string token">'wellTabletoFC'</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
How do I use my own tools in the same way as ArcGIS tools within ArcPy, for example:
arcpy<SPAN class="punctuation token">.</SPAN>Project_management<SPAN class="punctuation token">(</SPAN>
in_dataset<SPAN class="punctuation token">,</SPAN>
out_dataset<SPAN class="punctuation token">,</SPAN>
out_coor_system<SPAN class="punctuation token">,</SPAN>
transform_method<SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">{</SPAN>in_coor_system<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">{</SPAN>preserve_shape<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">{</SPAN>max_deviation<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">{</SPAN>vertical<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">)</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>I want to do this for 2 reasons:
- Run the tool within the Python console, while being able to return the tool output into a variable,
- Chain multiple custom tools together that are maintained separately, into a single workflow