Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How can I use a multivalue output parameter with ArcPy?

Please give an example.

share|improve this question
    
This sounds like a pure Python question. Would you like to migrate it to SO? –  whuber May 7 '11 at 17:46
2  
No, arcpy is specific to ArcGIS. An example would be the results of a ListFeatureClasses as shown in the help files help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//… but I am almost convinced that is now what is being sought since there are dozens of examples of multivalued outputs, no even SetParameterAsText would qualify –  Dan Patterson May 7 '11 at 18:42
    
@Dan Sure, Arcpy is part of ArcGIS. But isn't a multivalued output really just a matter of standard Python syntax? –  whuber May 7 '11 at 20:02
1  
There is a question on esri forums forums.arcgis.com/threads/… (with no answer). Could you add some code to make it a little clearer? I'm not sure I understand the question still (having read this one, and the esri forum one) –  djq May 8 '11 at 13:22
3  
@celenius Thank you: the ESRI forums question at least clears up my confusion: 'multivalue' is an ESRI construct. –  whuber May 8 '11 at 14:12
show 2 more comments

1 Answer 1

Not sure how to credit this to Bruce Nielsen but his answer at the ArcGIS Discussion Forum seems to have been accepted there.

Since a multivalue input parameter is a text string delimited by semicolons, I would think the output parameter would be the same. In theory, you should be able to create the appropriate output with the following change to the example code:

arcpy.SetParameter(3, ';'.join(listOfClippedOutputLayers))
share|improve this answer
add comment

Your Answer

 
discard

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.