@ivelin.peychev wrote:
Hi @dale
There seems to be an issue (may as well be designed this way) with the -snapshot command when used in a script:
If you create a couple of snapshots manually, then run the script below to create several snapshots.
Then comment out the creation part and uncomment the deletion part:import rhinoscriptsyntax as rs import scriptcontext as sc # Create snapshots list_of_snapshot_names = ["ALA","BALA","NICA"] for name in list_of_snapshot_names: rs.Command("-Snapshots Save {0} _Cancel".format(name)) # """ # Deleting all snapshots list_of_snapshots = sc.doc.Snapshots.Names for name in list_of_snapshots: print name rs.Command("-Snapshots Delete {0} _Cancel".format(name)) """
Apparently you cannot delete snapshots that were created manually.
The script identifies them, prints their names but doesn’t delete them.
Posts: 1
Participants: 1