Home/ Reference/ Document

doc.ClearSelection()

Deselects everything. Call it before a batch run so you don't accidentally modify whatever the user had selected by hand.

Signature

doc.ClearSelection()

Notes

Deselects everything. Call it before a batch run so you don't accidentally modify whatever the user had selected by hand.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
doc.ClearSelection()                    # clear the selection
print("Selection cleared")

About this section: Document

Document — documents and file handling.

Other entries in this section