Home/ Reference/ Document

doc.Grid / doc.SnapToGrid / doc.SnapToShapes / doc.SnapToGuidelines

The grid and the various snapping switches. Turn them all off for automated layout, or SetPosition lands on the wrong spot.

Signature

doc.Grid / doc.SnapToGrid / doc.SnapToShapes / doc.SnapToGuidelines

Notes

The grid and the various snapping switches. Turn them all off for automated layout, or SetPosition lands on the wrong spot.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
# turn snapping off for generated layouts, or SetPosition lands elsewhere
doc.SnapToGrid = False            # no snap to grid
doc.SnapToShapes = False          # no snap to objects
doc.SnapToGuidelines = False      # no snap to guides

print("All snapping turned off")

About this section: Document

Document — documents and file handling.

Other entries in this section