Create script to use in modelbuilder

Discussion created by Hawksley on Jul 1, 2010

I would really appreciate if someone could help me out.

I'm trying to build a model that re-creates real estates in the past.

To do this I've created a layer that contains all the "changes" that the property has been through.
That is; every bit of land that has either been added or removed to the property.

In order to get the correct view of the property in, say 1970, I add the areas that have been removed until that date (to a layer that contains the realestate of today), and remove the areas that have been added since that date.

I???ve managed to create a model that performs these actions, but it not as ???automatic??? as I want it. Also, the model should be able to run regardless what property you choose as Indata.

So: can someone give me any tips on how to write a script (I guess that is the best way to go) that adds the areas that has been removed (labeled ???From???) and erase areas that has been added (labeled ???To???), in date-order from now back to the selected date.

2008 From Add
2000 To Cut
1990 From Add
1985 From Add
1980 To Cut
1970 From Add

That is:
If Operation = ???From??? then
end if

All the best


Attached a part of the model as it looks atm (mostly in swedish)