I suspect there isn't a way to do this, but in case there is:
Does anyone know how to pick up all the possible set values for a particular field from php? The reason I'm asking is that it means adding a new set value will not break all the programs that depend on it! In general, I try and write stuff that doesn't require an update to be made in several different places, if at all possible.