Hotkey - "dynamic" spaced grid

Next
 From:  Paul (AIRGLASS)
509.1 
Hi all,
I worked up a little hotkey script this evening to change grid spacings on the fly that might be useful to some:

PageDown=script:moi.grid.size = (moi.grid.size) / 2; moi.grid.snapSize = moi.grid.size; if (moi.grid.size < 1) {moi.grid.accentedLineFrequency = 1 / (moi.grid.size) } else {moi.grid.accentedLineFrequency = 12 / moi.grid.size};
PageUp=script:moi.grid.size = (moi.grid.size) * 2; moi.grid.snapSize = moi.grid.size; if (moi.grid.size < 1) {moi.grid.accentedLineFrequency = 1 / (moi.grid.size) } else {moi.grid.accentedLineFrequency = 12 / moi.grid.size};

You can also add in the following to turn on grid display and snap at the same time:

moi.grid.display = true; moi.drawingAids.gridSnap = true;

The major grid lines are accented every 1" when the grid spacing is below 1", and accented every 12" when the spacing is above 1".

Metric system users would want to change the values in the 'if' statement to suit themselves-

Now if I could only figure out how to incorporate viewport zoom into it too, I'd be a happy camper!

Paul
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Frenchy Pilou (PILOU)
509.2 In reply to 509.1 
Works fine :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All