Force script tool featureset default location to use in_memory workspace?

Discussion created by csny490 on Jan 19, 2013
I have a script tool (not an add-in) that gets raw interactive point input from users using a parameter with a 'featureset' data type. Technically it works, but with one pretty major performance issue:

When users start up the tool, there is a longish delay (3 seconds or so) as ArcGIS auto-creates .gdb file in my TEMP directory in which to store the user-defined points (called something like C:\Temp\arcC593\gp273D19A103704209BEA5FF7DAA478784.gdb). Every time the tools is run, a different .gdb file is created, and tool start up time gets longer and longer with each new scratch .gdb in the TEMP directory. After 10 runs start up time is around 10 seconds.

Is there any way to get the featureset to point to an in_memory featureclass instead? I've tried everything (env variables, etc) I can think of... I would be happy if I could even get it to point at the guaranteed Scratch.gdb!

I thought featuresets were supposed to be a 'lightweight' representation that exists in RAM, but the script tool implementation of creating user-defined interactive featuresets seems to be as heavy and clumsy as an elephant on a pogo stick.

Am I missing something?