arcpy.getparametersinfo() returning wrong set of parameters

1860
0
07-31-2014 09:47 AM
BakaryKoné
New Contributor

Hi everyone,

 

I'm creating a medium complex model (in Model Builder) in which i add different home made python script tools.

When i run the whole model, an exception is raised because for some reason, as one of my scripts gets the set of input parameters that where used for the preceding run script.

For example let say i have

Script1

S1Parameter1

S1Parameter2

S1Parameter3

 

Script2

S2Parameter1

S2Parameter2

 

The tool for Script1 is run, the output is collected and used in some process, and then tool for Script2 is run.

Well, script2 receives the set of parameters of Script1 (S1Parameter1, S1Parameter2, S1Parameter3) .....

 

If i try to get de parameters values from Sys.argv[], i can see the right parameters where sent (S2Parameter1, S2Parameter2).

But the arcpy.getparametersinfo() returns (S1Parameter1, S1Parameter2, S1Parameter3)

 

I'have seen in arcgis help  (ArcGIS Help 10.1)  that arcpy.getparametersinfo() can take the tool name as argument, but i tried all possible ways to set Tool_Name for my tool but could'nt find the right one.

 

So have someone got the same problem ?

and can someone tell me the right way to use the arcpy.getparametersinfo(tool_name) methode ?

0 Kudos
0 Replies