Is it possible to limit the scope of a script tool to a specified group layer? Otherwise, the tool takes 3 minutes + to load because it is looking at irrelevant layers.
Would it be quicker to move the layers out of the group layer into a new data frame temporarily (either manually or via code), then do the analysis?
Can you be more specific on what you need the script tool to do? It sounds like you want to input certain layers only, which can be done by hard coding the values into Python, or using arcpy.GetParameterAsText to chose the input from the script GUI every time you run it. Unless I'm totally missing the mark here - in which case I need more info.
The script tool is appending layers of the user's choice to existing SDE layers which are all in the same group layer. The layers to be appended are different every time the tool is used, so hard coding will not work.
Also, I am already using tool parameters to gather the input using arcpy.GetParametersAsText. The problem is that it takes an inordinately long time for the parameter dialog to load. It seems to be slow due to the total number of layers, most of which are irrelevant to the process.
I tried Dan's suggestion to use a New Data Frame. I copied the destination layers to the new data frame and the response time is much improved. I have tested this with dev data, and editing the same layers in two different data frames during the same editing session does not seem to have any adverse affect. Please advise if you know of any reason I should not do this.
I would still like to find a way to simply limit the tool dialog to a single, specific group layer. For now, however, I will copy the SDE layers to which I need to append data to a second data frame and just switch data frames for the append operation.
Retrieving data ...