Update the values for unique symbology on a layer based on a range domain

I’m quite sure that it’s evident by now, based on my previous programming posts, and others, that I do a lot of seemingly random tasks. One of the things I love about using Python in ArcGIS is that it allows me to perform tasks which would be tedious otherwise.

I wrote this script to create symbology for a layer which needed to be symbolised by the values in the range domain on a certain field (in this case, max 12). The feature class was empty at this point, so I couldn’t Right Click > Properties > Symbology > Categories > Unique Values > Add All Values. I also didn’t feel like using Add Values and manually typing in each number. Yes, my max was 12, but what if it was 50 in the future?

At this point, I’m basically using any excuse to get into Python. I do try at least to start the task in ArcMap, before asking myself, “Can this be done using Python?” Invariably, the answer is always a resounding “Yes”.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s