There is an option in AutoCAD when saving .dxf's to select objects, which puts them in order. This may help. Look under "tools" in the save dialog.
If your using AutoCAD 2002 or newer, I have a better option for you.
http://www.cnczone.com/forums/showthread.php?t=8226 (AutoCAD 2 G-Code macro)