How to undo Python script operations?

899
2
Jump to solution
09-04-2023 01:22 AM
desert
by
New Contributor III

Hello.

 

I'm a CGA beginner who has been finding a lot of help by reading the content here.(trial ver.2022.1)

I have a question.

After running a Python script and not being satisfied with the result, I tried to revert it to the original state, but I couldn't find an 'UNDO' feature.

Does Python script have an undo feature?

Any advice will be greatly helpful to me.

Thank you for reading.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
SimonHaegler
Esri Contributor

Hi,

welcome to the world of procedural modeling with CGA. 🙂

There is unfortunately no undo functionality for Python scripts. If you are unsure about the correctness of a script, it is best practice to save a copy of the scene file (cej) before running the script. Or run the script on a copy of the scene (copying could even be part of the script itself).

Best,
Simon

View solution in original post

2 Replies
SimonHaegler
Esri Contributor

Hi,

welcome to the world of procedural modeling with CGA. 🙂

There is unfortunately no undo functionality for Python scripts. If you are unsure about the correctness of a script, it is best practice to save a copy of the scene file (cej) before running the script. Or run the script on a copy of the scene (copying could even be part of the script itself).

Best,
Simon

desert
by
New Contributor III

Having to prepare a copy every time I test a Python script can be inconvenient, but it seems there's no other choice.
I should create Python scripts carefully.
Thank you for your response.

0 Kudos