You can use DocumentOpen.Execute() instead of DocumentInsert.Execute(), to open in a new document instead of opening into the existing document. Don’t forget to close the current document at the end of the script using Window.ActiveWindow.Close().
You could simply delete all geometry at the beginning of the loop just before the DocumentInsert.Execute() using the ClearAll() command. This way you keep working in the same document.
Also, rather than creating a map, using “txtnums = map(str, range(1,51)),” you can loop on the integer, which is more normal, and just convert to string where that type is necessary:
Please Login to Report Topic
Please Login to Share Feed
You are navigating away from the AIS Discovery experience