Do you have: View > Grids & Guides > Snap to Document Grid on?
Also usefull to make sure that your lines fall on the whole pixels.
By default a line is aligned to the centre of the stroke, causing it to cover 2 half pixels.
If you want to change that behaviour for the open document, make sure you have nothing selected and choose either Align Stroke to the Inside or Outside from the Stroke panel.
If you want that behaviour for all new documents:
Close all documents, select a stroke of 1 pt and change the Align in the stroke panel.
1 person found this helpful
There are a couple of things you have to do if you want to draw and position objects as whole numbers.
Below I have my grid set to 100 pixels with 100 pixel increments, zoomed in to 600%. The object measurement and position depends on the Transform panel's transform anchor point, so you can't set the anchor point to one of the center points, you have to select one of the corners. The center point measures the x y as the center of the object.
Also, as Ton mentioned you have to set strokes to inside or outside and you should check Dimensions Include Stroke Weight from the Tranform flyout menu.
With this setup and with Snap to Grid selected, rectangles will snap to a 1 pixel grid as you draw them. If you are moving existing objects with your mouse, you have to be zoomed in for snapping to work, so setting your cursor key preference distance to 1 pixel and using your arrow keys can be better. Shift-arrow moves 10 pixels
Hi Rob, this is appreciated, I'm going to do all this now!
In CS6 on OSX 10.8.5 if I turn off Snap to Grid and turn on Smart Guides with the setup I'm showing in #3, I always get whole numbers when I draw. The rulers have to be set to pixels–it looks to me like if units are set to pixels Smart Guides are smart enough to know you want whole pixels.