<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1026196#M59929</link>
    <description>&lt;LI-CODE lang="python"&gt;# OUTPUTS, most temporal 
out_path=r"D:\testScript"
out_name="Hello.shp"
geometry_type = "POLYGON"
template = "study_quads.shp"
has_m = "DISABLED"
has_z = "DISABLED"
Myres = "Myres.shp"
arcpy.Delete_management(out_name) 
out_name_erase = "in_memory" + "\\" + "out_name_erase" 
polygon = "in_memory" + "\\" + "polygon" 
polygon_dissolve = "in_memory" + "\\" + "polygon_dissolve"
arcpy.CreateFeatureclass_management(out_path, out_name, geometry_type)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 12 Feb 2021 07:52:13 GMT</pubDate>
    <dc:creator>konstantBrr</dc:creator>
    <dc:date>2021-02-12T07:52:13Z</dc:date>
    <item>
      <title>Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025820#M59902</link>
      <description>&lt;P&gt;import arcpy, math, gc&lt;/P&gt;&lt;P&gt;# Workspace, overwrite&lt;BR /&gt;arcpy.env.workspace = r"D:\testScript\My.gdb"&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;# INPUTS&lt;BR /&gt;objects_input = "objects.shp" # must be polygons&lt;BR /&gt;objects = "objects_lyr.shp"&lt;BR /&gt;arcpy.MakeFeatureLayer_management(objects_input, objects)&lt;/P&gt;&lt;P&gt;# OUTPUTS, most temporal&lt;BR /&gt;result = "result.shp"&lt;BR /&gt;result_erase = "in_memory" + "\\" + "result_erase"&lt;BR /&gt;polygon = "in_memory" + "\\" + "polygon"&lt;BR /&gt;polygon_dissolve = "in_memory" + "\\" + "polygon_dissolve"&lt;/P&gt;&lt;P&gt;arcpy.CreateFeatureclass_management(arcpy.env.workspace, result, "POLYGON")&lt;/P&gt;&lt;P&gt;# Parameters&lt;BR /&gt;distance = 3 # distance for move in direction&lt;BR /&gt;direction = 90 # direction in degrees (90 is from north to south)&lt;BR /&gt;index = 0&lt;/P&gt;&lt;P&gt;# Set UpdateCursor&lt;BR /&gt;cur_objects = arcpy.da.UpdateCursor(objects, ("FID"))&lt;BR /&gt;for row_objects in cur_objects:&lt;BR /&gt;try:&lt;BR /&gt;fid = row_objects[0]&lt;BR /&gt;sql = '"FID" = ' + str(index)&lt;BR /&gt;index += 1&lt;/P&gt;&lt;P&gt;# Initialize lists&lt;BR /&gt;lines_list = []&lt;BR /&gt;lines_created = []&lt;/P&gt;&lt;P&gt;# Select current feature&lt;BR /&gt;arcpy.SelectLayerByAttribute_management(objects, "NEW_SELECTION", sql)&lt;BR /&gt;vertexes = "in_memory" + "\\" + "vertexes"&lt;/P&gt;&lt;P&gt;# Convert object to vertexes&lt;BR /&gt;arcpy.FeatureVerticesToPoints_management(objects, vertexes, "ALL")&lt;BR /&gt;index_vertex = 0&lt;/P&gt;&lt;P&gt;# Set SearchCursor for vertexes&lt;BR /&gt;cur_vertexes = arcpy.da.SearchCursor(vertexes, ("SHAPE@XY"))&lt;BR /&gt;for row_vertexes in cur_vertexes:&lt;BR /&gt;vertex_coords_x = row_vertexes[0][0]&lt;BR /&gt;vertex_coords_y = row_vertexes[0][1]&lt;/P&gt;&lt;P&gt;# Define points coordinates&lt;BR /&gt;point_move_x = vertex_coords_x - (distance) * math.cos(math.radians(direction))&lt;BR /&gt;point_move_y = vertex_coords_y - (distance) * math.cos(math.radians(90 - direction))&lt;/P&gt;&lt;P&gt;# Make list of points&lt;BR /&gt;new_line = ([[vertex_coords_x, vertex_coords_y], [point_move_x, point_move_y]])&lt;BR /&gt;lines_list.append(new_line)&lt;/P&gt;&lt;P&gt;# From second cycle&lt;BR /&gt;if index_vertex &amp;gt; 0:&lt;BR /&gt;lines_vertexes = ([[vertex_coords_x, vertex_coords_y], start_line])&lt;BR /&gt;lines_ends = ([[point_move_x, point_move_y], end_line])&lt;BR /&gt;lines_list.append(lines_vertexes)&lt;BR /&gt;lines_list.append(lines_ends)&lt;BR /&gt;start_line = [vertex_coords_x, vertex_coords_y]&lt;BR /&gt;end_line = [point_move_x, point_move_y]&lt;BR /&gt;index_vertex = index_vertex + 1&lt;/P&gt;&lt;P&gt;# Cycle that makes polylines from points&lt;BR /&gt;for lines_step in lines_list:&lt;BR /&gt;lines_created.append(arcpy.Polyline(arcpy.Array([arcpy.Point(*sour) for sour in lines_step])))&lt;/P&gt;&lt;P&gt;arcpy.FeatureToPolygon_management(lines_created, polygon)&lt;BR /&gt;arcpy.AggregatePolygons_cartography(polygon, polygon_dissolve, 1)&lt;/P&gt;&lt;P&gt;# Final editing&lt;BR /&gt;arcpy.Erase_analysis(polygon_dissolve, objects, result_erase)&lt;BR /&gt;arcpy.Append_management(result_erase, result, "NO_TEST")&lt;BR /&gt;arcpy.Delete_management("in_memory")&lt;BR /&gt;arcpy.Delete_management(vertexes)&lt;BR /&gt;start_line = []&lt;/P&gt;&lt;P&gt;# Clear selection, memory and deleting temps&lt;BR /&gt;arcpy.SelectLayerByAttribute_management(objects, "CLEAR_SELECTION")&lt;BR /&gt;print ("Object number: " + str(index - 1) + " -- done.")&lt;BR /&gt;gc.collect()&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Catch errors&lt;BR /&gt;except Exception as e:&lt;BR /&gt;pass&lt;BR /&gt;print ("Error:")&lt;BR /&gt;print (e)&lt;BR /&gt;print ("\n")&lt;BR /&gt;index += 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_______________________________________________________&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "D:/testScript/myDBpy.py", line 10, in &amp;lt;module&amp;gt;&lt;BR /&gt;arcpy.MakeFeatureLayer_management(objects_input, objects)&lt;BR /&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 6520, in MakeFeatureLayer&lt;BR /&gt;raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Features: Dataset objects.shp does not exist or is not supported&lt;BR /&gt;Failed to execute (MakeFeatureLayer).&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 13:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025820#M59902</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-11T13:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025824#M59903</link>
      <description>&lt;P&gt;I've not read the entire script, also please consider formatting it to make it easier to read.&lt;/P&gt;&lt;P&gt;I can however see a workspace envionment set as an FGDB, then referencing a shapefile called "objects.shp".&lt;/P&gt;&lt;P&gt;You wont have a shapefile in that workspace, so give the full path to the shapefile.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 13:52:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025824#M59903</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-02-11T13:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025828#M59904</link>
      <description>&lt;P&gt;Please mention any error messages or results that the script is currently producing.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 14:08:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025828#M59904</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-02-11T14:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025830#M59905</link>
      <description>&lt;P&gt;You also have an updateCursor that probably can be a search cursor since it doesn't look like it is ever updating the row.&lt;/P&gt;&lt;P&gt;Another tip that I see is that your objects is pointing to 'objects_lyr.shp'.&amp;nbsp; Since it is only a view (think of it as a temporary copy of the original data that you can do stuff to), you don't need the .shp at the end.&amp;nbsp; It can live and be referenced as 'objects_lyr' and you can also reference it through assigning the MakeFeatureLayer to a variable.&amp;nbsp;&amp;nbsp; This doesn't effect the code at all, but more of a FYI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# INPUTS
objects = "objects_lyr.shp"
arcpy.MakeFeatureLayer_management(objects_input, objects)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# INPUTS
objects_input = "objects.shp" # must fix this per David's response
objectOutName = "objects_lyr.shp"
objLyr = arcpy.MakeFeatureLayer_management(objects_input, "objects_lyr")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then replace 'objects' with 'objLyr' where needed so its more readable and people know that it is referring to a Layer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 14:19:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025830#M59905</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-11T14:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025839#M59906</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - GeoNet, The Esri Community&lt;/A&gt;&amp;nbsp;would help with readability&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 14:25:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025839#M59906</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-02-11T14:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025868#M59908</link>
      <description>&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "D:/testScript/myDBpy2.py", line 18, in &amp;lt;module&amp;gt;&lt;BR /&gt;arcpy.CreateFeatureclass_management(arcpy.env.workspace, result, "POLYGON")&lt;BR /&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 1807, in CreateFeatureclass&lt;BR /&gt;raise e&lt;BR /&gt;ExecuteError: ERROR 000354: The name contains invalid characters&lt;BR /&gt;Failed to execute (CreateFeatureclass).&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:21:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025868#M59908</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-11T15:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025869#M59909</link>
      <description>&lt;P&gt;import arcpy, math, gc&lt;/P&gt;&lt;P&gt;# Workspace, overwrite&lt;BR /&gt;arcpy.env.workspace = r"D:\testScript\My.gdb"&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;# INPUTS&lt;BR /&gt;objects_input = r"D:\testScript\objects.shp" # must be polygons&lt;BR /&gt;objects = "objects_lyr.shp"&lt;BR /&gt;arcpy.MakeFeatureLayer_management(objects_input, objects)&lt;/P&gt;&lt;P&gt;# OUTPUTS, most temporal&lt;BR /&gt;result = "result.shp"&lt;BR /&gt;result_erase = "in_memory" + "\\" + "result_erase"&lt;BR /&gt;polygon = "in_memory" + "\\" + "polygon"&lt;BR /&gt;polygon_dissolve = "in_memory" + "\\" + "polygon_dissolve"&lt;/P&gt;&lt;P&gt;arcpy.CreateFeatureclass_management(arcpy.env.workspace, result, "POLYGON")&lt;/P&gt;&lt;P&gt;# Parameters&lt;BR /&gt;distance = 9 # distance for move in direction&lt;BR /&gt;direction = 90 # direction in degrees (90 is from north to south)&lt;BR /&gt;index = 0&lt;/P&gt;&lt;P&gt;# Set UpdateCursor&lt;BR /&gt;cur_objects = arcpy.da.UpdateCursor(objects, ("FID"))&lt;BR /&gt;for row_objects in cur_objects:&lt;BR /&gt;try:&lt;BR /&gt;fid = row_objects[0]&lt;BR /&gt;sql = '"FID" = ' + str(index)&lt;BR /&gt;index += 1&lt;/P&gt;&lt;P&gt;# Initialize lists&lt;BR /&gt;lines_list = []&lt;BR /&gt;lines_created = []&lt;/P&gt;&lt;P&gt;# Select current feature&lt;BR /&gt;arcpy.SelectLayerByAttribute_management(objects, "NEW_SELECTION", sql)&lt;BR /&gt;vertexes = "in_memory" + "\\" + "vertexes"&lt;/P&gt;&lt;P&gt;# Convert object to vertexes&lt;BR /&gt;arcpy.FeatureVerticesToPoints_management(objects, vertexes, "ALL")&lt;BR /&gt;index_vertex = 0&lt;/P&gt;&lt;P&gt;# Set SearchCursor for vertexes&lt;BR /&gt;cur_vertexes = arcpy.da.SearchCursor(vertexes, ("SHAPE@XY"))&lt;BR /&gt;for row_vertexes in cur_vertexes:&lt;BR /&gt;vertex_coords_x = row_vertexes[0][0]&lt;BR /&gt;vertex_coords_y = row_vertexes[0][1]&lt;/P&gt;&lt;P&gt;# Define points coordinates&lt;BR /&gt;point_move_x = vertex_coords_x - (distance) * math.cos(math.radians(direction))&lt;BR /&gt;point_move_y = vertex_coords_y - (distance) * math.cos(math.radians(90 - direction))&lt;/P&gt;&lt;P&gt;# Make list of points&lt;BR /&gt;new_line = ([[vertex_coords_x, vertex_coords_y], [point_move_x, point_move_y]])&lt;BR /&gt;lines_list.append(new_line)&lt;/P&gt;&lt;P&gt;# From second cycle&lt;BR /&gt;if index_vertex &amp;gt; 0:&lt;BR /&gt;lines_vertexes = ([[vertex_coords_x, vertex_coords_y], start_line])&lt;BR /&gt;lines_ends = ([[point_move_x, point_move_y], end_line])&lt;BR /&gt;lines_list.append(lines_vertexes)&lt;BR /&gt;lines_list.append(lines_ends)&lt;BR /&gt;start_line = [vertex_coords_x, vertex_coords_y]&lt;BR /&gt;end_line = [point_move_x, point_move_y]&lt;BR /&gt;index_vertex = index_vertex + 1&lt;/P&gt;&lt;P&gt;# Cycle that makes polylines from points&lt;BR /&gt;for lines_step in lines_list:&lt;BR /&gt;lines_created.append(arcpy.Polyline(arcpy.Array([arcpy.Point(*sour) for sour in lines_step])))&lt;/P&gt;&lt;P&gt;arcpy.FeatureToPolygon_management(lines_created, polygon)&lt;BR /&gt;arcpy.AggregatePolygons_cartography(polygon, polygon_dissolve, 1)&lt;/P&gt;&lt;P&gt;# Final editing&lt;BR /&gt;arcpy.Erase_analysis(polygon_dissolve, objects, result_erase)&lt;BR /&gt;arcpy.Append_management(result_erase, result, "NO_TEST")&lt;BR /&gt;arcpy.Delete_management("in_memory")&lt;BR /&gt;arcpy.Delete_management(vertexes)&lt;BR /&gt;start_line = []&lt;/P&gt;&lt;P&gt;# Clear selection, memory and deleting temps&lt;BR /&gt;arcpy.SelectLayerByAttribute_management(objects, "CLEAR_SELECTION")&lt;BR /&gt;print ("Object number: " + str(index - 1) + " -- done.")&lt;BR /&gt;gc.collect()&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Catch errors&lt;BR /&gt;except Exception as e:&lt;BR /&gt;pass&lt;BR /&gt;print ("Error:")&lt;BR /&gt;print (e)&lt;BR /&gt;print ("\n")&lt;BR /&gt;index += 1&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:22:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025869#M59909</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-11T15:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025873#M59910</link>
      <description>&lt;P&gt;Still not workinng! May be cause&amp;nbsp; I'm verry junior in python coding for arcgis&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy, math, gc&lt;/P&gt;&lt;P&gt;# Workspace, overwrite&lt;BR /&gt;arcpy.env.workspace = r"D:\testScript\My.gdb"&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;# INPUTS&lt;BR /&gt;objects_input = r"D:\testScript\objects.shp" # must be polygons&lt;BR /&gt;objects = "objects_lyr.shp"&lt;BR /&gt;arcpy.MakeFeatureLayer_management(objects_input, objects)&lt;/P&gt;&lt;P&gt;# OUTPUTS, most temporal&lt;BR /&gt;result = "result.shp"&lt;BR /&gt;result_erase = "in_memory" + "\\" + "result_erase"&lt;BR /&gt;polygon = "in_memory" + "\\" + "polygon"&lt;BR /&gt;polygon_dissolve = "in_memory" + "\\" + "polygon_dissolve"&lt;/P&gt;&lt;P&gt;arcpy.CreateFeatureclass_management(arcpy.env.workspace, result, "POLYGON")&lt;/P&gt;&lt;P&gt;# Parameters&lt;BR /&gt;distance = 9 # distance for move in direction&lt;BR /&gt;direction = 90 # direction in degrees (90 is from north to south)&lt;BR /&gt;index = 0&lt;/P&gt;&lt;P&gt;# Set UpdateCursor&lt;BR /&gt;cur_objects = arcpy.da.UpdateCursor(objects, ("FID"))&lt;BR /&gt;for row_objects in cur_objects:&lt;BR /&gt;try:&lt;BR /&gt;fid = row_objects[0]&lt;BR /&gt;sql = '"FID" = ' + str(index)&lt;BR /&gt;index += 1&lt;/P&gt;&lt;P&gt;# Initialize lists&lt;BR /&gt;lines_list = []&lt;BR /&gt;lines_created = []&lt;/P&gt;&lt;P&gt;# Select current feature&lt;BR /&gt;arcpy.SelectLayerByAttribute_management(objects, "NEW_SELECTION", sql)&lt;BR /&gt;vertexes = "in_memory" + "\\" + "vertexes"&lt;/P&gt;&lt;P&gt;# Convert object to vertexes&lt;BR /&gt;arcpy.FeatureVerticesToPoints_management(objects, vertexes, "ALL")&lt;BR /&gt;index_vertex = 0&lt;/P&gt;&lt;P&gt;# Set SearchCursor for vertexes&lt;BR /&gt;cur_vertexes = arcpy.da.SearchCursor(vertexes, ("SHAPE@XY"))&lt;BR /&gt;for row_vertexes in cur_vertexes:&lt;BR /&gt;vertex_coords_x = row_vertexes[0][0]&lt;BR /&gt;vertex_coords_y = row_vertexes[0][1]&lt;/P&gt;&lt;P&gt;# Define points coordinates&lt;BR /&gt;point_move_x = vertex_coords_x - (distance) * math.cos(math.radians(direction))&lt;BR /&gt;point_move_y = vertex_coords_y - (distance) * math.cos(math.radians(90 - direction))&lt;/P&gt;&lt;P&gt;# Make list of points&lt;BR /&gt;new_line = ([[vertex_coords_x, vertex_coords_y], [point_move_x, point_move_y]])&lt;BR /&gt;lines_list.append(new_line)&lt;/P&gt;&lt;P&gt;# From second cycle&lt;BR /&gt;if index_vertex &amp;gt; 0:&lt;BR /&gt;lines_vertexes = ([[vertex_coords_x, vertex_coords_y], start_line])&lt;BR /&gt;lines_ends = ([[point_move_x, point_move_y], end_line])&lt;BR /&gt;lines_list.append(lines_vertexes)&lt;BR /&gt;lines_list.append(lines_ends)&lt;BR /&gt;start_line = [vertex_coords_x, vertex_coords_y]&lt;BR /&gt;end_line = [point_move_x, point_move_y]&lt;BR /&gt;index_vertex = index_vertex + 1&lt;/P&gt;&lt;P&gt;# Cycle that makes polylines from points&lt;BR /&gt;for lines_step in lines_list:&lt;BR /&gt;lines_created.append(arcpy.Polyline(arcpy.Array([arcpy.Point(*sour) for sour in lines_step])))&lt;/P&gt;&lt;P&gt;arcpy.FeatureToPolygon_management(lines_created, polygon)&lt;BR /&gt;arcpy.AggregatePolygons_cartography(polygon, polygon_dissolve, 1)&lt;/P&gt;&lt;P&gt;# Final editing&lt;BR /&gt;arcpy.Erase_analysis(polygon_dissolve, objects, result_erase)&lt;BR /&gt;arcpy.Append_management(result_erase, result, "NO_TEST")&lt;BR /&gt;arcpy.Delete_management("in_memory")&lt;BR /&gt;arcpy.Delete_management(vertexes)&lt;BR /&gt;start_line = []&lt;/P&gt;&lt;P&gt;# Clear selection, memory and deleting temps&lt;BR /&gt;arcpy.SelectLayerByAttribute_management(objects, "CLEAR_SELECTION")&lt;BR /&gt;print ("Object number: " + str(index - 1) + " -- done.")&lt;BR /&gt;gc.collect()&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Catch errors&lt;BR /&gt;except Exception as e:&lt;BR /&gt;pass&lt;BR /&gt;print ("Error:")&lt;BR /&gt;print (e)&lt;BR /&gt;print ("\n")&lt;BR /&gt;index += 1&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:26:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025873#M59910</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-11T15:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025875#M59912</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "D:/testScript/myDBpy2.py", line 18, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CreateFeatureclass_management(arcpy.env.workspace, result, "POLYGON")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 1807, in CreateFeatureclass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;raise e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 000354: The name contains invalid characters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (CreateFeatureclass).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:27:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025875#M59912</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-11T15:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025879#M59913</link>
      <description>&lt;P&gt;Thank You. I will try it!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:30:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025879#M59913</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-11T15:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025880#M59914</link>
      <description>&lt;P&gt;Your have result ='result.shp', then in create feature class you're using an FGDB environment. This results in the name error.&amp;nbsp; Where did you get this script from?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:30:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025880#M59914</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-02-11T15:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025884#M59915</link>
      <description>&lt;P&gt;Junior Scool of copy&amp;amp;paste&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://gis.stackexchange.com/questions/156927/creating-buffer-only-in-specific-direction-using-arcgis-for-desktop?noredirect=1&amp;amp;lq=1" target="_blank"&gt;https://gis.stackexchange.com/questions/156927/creating-buffer-only-in-specific-direction-using-arcgis-for-desktop?noredirect=1&amp;amp;lq=1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:35:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025884#M59915</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-11T15:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025925#M59918</link>
      <description>&lt;P&gt;&lt;A href="https://gis.stackexchange.com/questions/156927/creating-buffer-only-in-specific-direction-using-arcgis-for-desktop?noredirect=1&amp;amp;lq=1" target="_blank"&gt;https://gis.stackexchange.com/questions/156927/creating-buffer-only-in-specific-direction-using-arcgis-for-desktop?noredirect=1&amp;amp;lq=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 16:17:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1025925#M59918</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-11T16:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1026036#M59921</link>
      <description>&lt;P&gt;Your error message says that there is a problem in line 10, which &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/167692"&gt;@DavidPike&lt;/a&gt; addressed in his replies.&lt;/P&gt;&lt;P&gt;File "D:/testScript/myDBpy.py", &lt;U&gt;&lt;STRONG&gt;line 10&lt;/STRONG&gt;&lt;/U&gt;, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;Next bit of info in the error message says that 'objects.shp' is your problem&lt;/P&gt;&lt;P&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Features: &lt;U&gt;&lt;STRONG&gt;Dataset objects.shp does not exist or is not supported&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;Failed to execute (MakeFeatureLayer).&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# INPUTS
objects_input = "objects.shp" ### IF ITS IN A sde/FGDB, THERE IS NO EXTENSION

# Like this
objects_input = 'objects'&lt;/LI-CODE&gt;&lt;P&gt;I'd HIGHLY suggest to spend some time getting familiar with a debugger and step through your code- especially code taken from SO.&amp;nbsp; Looking at your script, you have some cyclic selections going on that may have gotten mixed up when you copied from SO and fit it to your data.&amp;nbsp; Like this updateCursor- you set the fid but don't use it anywhere and use the sql query to query the same features 'objects' that the cursor is using.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Set UpdateCursor
cur_objects = arcpy.da.UpdateCursor(objects, ("FID"))
for row_objects in cur_objects:
try:
fid = row_objects[0]
sql = '"FID" = ' + str(index)
index += 1

# Initialize lists
lines_list = []
lines_created = []

# Select current feature
arcpy.SelectLayerByAttribute_management(objects, "NEW_SELECTION", sql)
vertexes = "in_memory" + "\\" + "vertexes"&lt;/LI-CODE&gt;&lt;P&gt;... Shouldn't be using the updateCursor either if it is not updating anything.&amp;nbsp; If you need to iterate over each feature in the fc, then there are probably better ways of doing so like maybe creating a range for the number of features and passing that number into your SelectLayerByAttributes function.&amp;nbsp; It looks like you are just going 0: .... for the function.&lt;/P&gt;&lt;P&gt;Rename your variables so they make sense and so that anyone reading your code can tell what they are.&amp;nbsp; Same with Featureclasses, shapefiles, databases, etc.&amp;nbsp; It's just good practice and when you have to revisit the script you wont be scratching your head trying to figure out what 'objects' are.&lt;/P&gt;&lt;P&gt;And formatting code for the forum is clicking on the &amp;lt;/&amp;gt; icon in the toolbar above the textarea, pasting the into the window and the most important part is selecting python from the dropdown.&lt;/P&gt;&lt;P&gt;Spend some time with your debugger- it'll help you get familiar with your code.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 20:26:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1026036#M59921</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-11T20:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1026137#M59925</link>
      <description>&lt;P&gt;read the code formatting link I posted very early on in this post&lt;/P&gt;&lt;P&gt;And you can't have a shapefile in a geodatabase, only in a folder.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has been pointed out several times.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 01:21:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1026137#M59925</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-02-12T01:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1026195#M59928</link>
      <description>&lt;P&gt;Thank you all for your support! My problem is solved! Ijust change parameters of output shp-file.&lt;BR /&gt;Sorry for my incorrect and long topic. This is cause I just registered at community.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 07:50:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1026195#M59928</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-12T07:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Hi. Have problem with Creating buffer only in specific direction.  What's wrong?</title>
      <link>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1026196#M59929</link>
      <description>&lt;LI-CODE lang="python"&gt;# OUTPUTS, most temporal 
out_path=r"D:\testScript"
out_name="Hello.shp"
geometry_type = "POLYGON"
template = "study_quads.shp"
has_m = "DISABLED"
has_z = "DISABLED"
Myres = "Myres.shp"
arcpy.Delete_management(out_name) 
out_name_erase = "in_memory" + "\\" + "out_name_erase" 
polygon = "in_memory" + "\\" + "polygon" 
polygon_dissolve = "in_memory" + "\\" + "polygon_dissolve"
arcpy.CreateFeatureclass_management(out_path, out_name, geometry_type)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 12 Feb 2021 07:52:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hi-have-problem-with-creating-buffer-only-in/m-p/1026196#M59929</guid>
      <dc:creator>konstantBrr</dc:creator>
      <dc:date>2021-02-12T07:52:13Z</dc:date>
    </item>
  </channel>
</rss>

