modelbuilder: how to pass a featureclass from script to buffer tool?

Discussion created by dkochli on Jul 20, 2011
Latest reply on Jul 21, 2011 by dkochli
Hi all
Im trying to pass a featureclass (FC) from a python script to the buffer-tool in ModelBuilder (see attached work flow).

This is my script:

[INDENT]import arcpy

DB = arcpy.GetParameterAsText(0)
arcpy.AddWarning("1. DB received: " + DB)
arcpy.env.workspace = DB

FC = DB + "\interne_Daten\wegtypen"
arcpy.AddWarning("2. FC found: " + FC)


In ModelBuilder, my script above has an input parameter as workspace and a (derived) output parameter as feature class.

The buffer tool requires a FC as input - however, I can't get it to work.

What am I doing wrong? How can I pass a feature class from a script to a tool?

Any hint would be much appreciated.