in the middle of my for loop I change layouts to do a find but it never actually switch the layout. if I make a stand alone script where I tell it to go to layout "x" it works fine but if I call that script from within my loop or I do it the same way in the loop it doesn't change
Does anyone have any idea why this doesn't work ?
How do you tell it doesn't work? If you simply run it, you may not notice how it changes. Try to run the script in the debugger or add a pause after the Go to Layout command.