Is there any way to change polygon symbol using Python

4384
3
02-05-2015 08:48 PM
papegowda1
New Contributor

Using Python i have created a polygon shapefile with user input Coordinates. now i need to add this to ArcMap and change the polygon outline color with respect to user input.

 

Please let me know how do i change the polygon symbol after adding this to ArcMap. like removing the fill color and applying Outline color and Width as per user input

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

There is the arcpy.mapping module, Within the tree link you can explore the classes and functions to see if any will provide you with some clues

0 Kudos
papegowda1
New Contributor

Thanks Patterson for replay, unfortunately i do not find any classes in this for changing the layer symbol.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Arcpy is not as "powerful" as ArcObjects and doesn't support all the functionality of ArcObjects. So, you cannot create a new symbology. The "only" option is to assign an existing symbology (layerfile) to the polygon featureclass.

When it comes to the mapping module, there is a lot you can do, but you cannot create for instance new elements on the layout. You can change existing one, but not add new ones.

The alternative is using ArcObjects from within Python, but I think you don't want to go there... some more info on that can be found in the post by Darren Wiens‌: ArcObjects in Python

0 Kudos