Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a model wherein one of the parameters is a compound variable, that is made of multiple variables joined together. How can this be done?

For example: create an insider buffer using Buffer(analysis) and name the output feature class from the distance parameter.


BufferDistance = 1000
InputFC = d:\test.gdb\boundaries

Buffer tool parameters:

Input Features = %InputFC%
Output Feature Class = %InputFC%_%BufferDistance%
Distance = -%BufferDistance% Meters

A negative buffer distance is needed to create an inside buffer, but that means the %BufferDistance% variable can't be used in the output FC name. Thus the need for a compound variable.

share|improve this question

I suspect the easiest way to do it would be through Python (or VBA).

  1. Start by putting your model together, including parameters for the input and output variables.
  2. Then from the model menu export the model to a Python script
  3. Open the script in an editor of your choice (I use Eclipse with the Pydev extension, but Notepad++ works, as does IDLE).
  4. Simply set the output parameter equal to the buffer distance etc. eg:
  1. Run the script
share|improve this answer
soo, it appears that actual answer is "you can't" :) This works, and I'll use it, but I might as well just skip model builder altogether and do everything in python. Thanks. – matt wilkie Aug 31 '10 at 21:56
doesn't look like it I'm afraid. However you can add discrete pieces of script to model builder, and use those answers (not tried it myself, but see the adding a boolean example (…) on the ArcGIS help). Good luck! – om_henners Sep 1 '10 at 5:41
up vote 2 down vote accepted

I've since learned it is also possible to do this using the Calculate Value tool, see Add arbitrary code to Arcgis model builder?. It's not as involved as creating a script and adding to a toolbox.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.