AnsweredAssumed Answered

Accessing unique attributes for given field in custom tool

Question asked by leftieant76 on Oct 17, 2014



I'm in the process of building a custom process (via Python) and I am thinking about the next step, which is loading it to a toolbox. I need to load it as a tool as I will be distributing it to less confident or entry level users.


It would be really useful for the tool user to be able to access a unique list of attributes for a given field (the same attribute may appear in there many times) and I am wondering about the best way to do this.


I can easily generate a unique list as part of the script, but am unsure whether this would be exposed to the tool before it actually ran.


I did find some information here - Generating a choice list from a field | ArcGIS Blog - but I am not that familiar (or confident) with ModelBuilder, and from my cursory examination of this, it relies on building your tool, then exporting the code, then attaching the code to a tool.


What if I just want to code it straight up - ie skip ModelBuilder?


I'm a little (or a lot) bamboozled with all of this - if anyone could please explain how to do this with a custom tool (and even better, why it needs to be done that way), preferably in 3 syllable words or less, I would be eternally grateful.


Other limitation is that the deployment of the tool needs to be able to run with a basic (ArcView) licence.