Hi,I would recommend a procedure and the call the procedure in a loop:something like:1. Procedure
def odmatrix(para1, ...):
arcpy.MakeFeatureLayer_management (inOrgins, para1)
....
and later calling this procedure (maybe then with a loop) with the needed parameters that change.
...
odmatrix("Pas_Lyr1999", ...)
odmatrix("Pas_Lyr2000", ...)
...
If that works put your parameters in a list a run a for-loop:
listlyr ("Pas_Lyr1999", "Pas_Lyr2000",...)
for i in listlyr:
odmatrix (i,...)
Haven't checked the syntax really, hope that answers your questions?