I have managed to create a buffer (see below). Does somebody know how to add transparency to the polygon and to the buffer? EDIT:/ I added to the polygon (
ExcavationPolygon.transparency= 60 ) but unfortunately for buffer it shows error.
def onLine(self, line_geometry):
array = arcpy.Array()
part = line_geometry.getPart(0)
for pt in part:
print pt.X, pt.Y
array.add(pt)
array.add(line_geometry.firstPoint)
polygon = arcpy.Polygon(array)
Input = polygon
NewPolygons = "\\\\abc\\home\\xxx\\Documents\\moje dokumenty\\xyz\\arcgis\\new polygons"
if arcpy.Exists("NewPolygons"):
arcpy.Append_management(Input, NewPolygons, "Test", "", "")
else:
arcpy.CopyFeatures_management(Input,NewPolygons, "", "0","0","0")
print " Excavation Polygon located"
ExcavationPolygon = arcpy.CopyFeatures_management(Input,NewPolygons, "", "0","0","0")
PolygonBuffer = "\\\\abc\\home\\xxx\\Documents\\moje dokumenty\\xyz\\arcgis\\PolygonBuffer"
distanceField = "1.5"
sideType = "OUTSIDE_ONLY"
endType = "ROUND"
arcpy.Buffer_analysis(ExcavationPolygon, PolygonBuffer, distanceField, sideType, endType)
print "Buffer of 1.5 m completed"