There's no real automated way to do this in Illustrator, but it can be done.
This answer is using Illustrator CS6, some of this may be more easily accessed in recent UI updates.
Merely add a new stroke via the Appearance Panel (Window > Appearance
), then...
- Set the stroke to dashed and adjust...

If you want the marks to only protrude into the encompassing shape, after you've got the marks in place...
- Highlight the dashed stroke in the Appearance Panel
- Choose
Effect > Path > Offset Path
and enter a negative value for the Offset
.
Note there is a bug in AI CS6 where the value field may not accept a negative value below 1 pica (1p0) and automatically converts any negatives to positives. For example, you can't enter -0p4
it gets converted to 0p4
automatically when you leave the value field or click the OK button. But you can enter -4pt
. So be aware you may need to be specific with negative values.

The corners are going to be squares, as in the images above. You could expand the appearance and then remove them. However, you will also lose any "live" editing ability as well. There may be other methods, such as pattern brushes which may work for your needs.
Although I've used points for the measurements here, you can use whatever system you need.