doc.Rulers / doc.Grid
Rulers and the grid object. Reading the grid settings in a script prevents "the thing I drew is half a cell off from where I expected".
Signature
doc.Rulers / doc.Grid
Notes
Rulers and the grid object. Reading the grid settings in a script prevents "the thing I drew is half a cell off from where I expected".
Python example (runnable)
Requires
pywin32. The example assumes app / doc / page / layer are already connected.
See Connection & InitPython
try:
grid = doc.Grid
print("Grid object: ", grid)
print("Ruler object: ", doc.Rulers)
except Exception as e:
print("Reading grid or ruler failed: ", e)
About this section: View & Performance
View & Performance — display and performance switches.
- This section has 6 entries; this is one of them.
- See the full section index: View & Performance
Other entries in this section
- app.OptimizationThe performance switch. Turning off screen redraw makes batch output s
- app.Refresh()Forces a redraw. With Optimization suppressing redraws, call this when
- doc.UnitDocument unit. Every coordinate and dimension follows it: set millimet
- doc.DirtyWhether the file has unsaved changes. This is what decides whether you
- doc.CreateView() / doc.ViewsOpens a new view window on the document. Useful for watching the whole