DXF Order

How do you export a dxf file with the entities in a certain order? They appear to be in the order they were created.

Displayorder does not change the dxf order.