How to get a consistent connectivity of Hex-Elements?

I would like to export my mesh with Python. If I have only one volume defined, exporting with the Python interface is no problem. If I have more than 1 volume, the connectivity of the hex elements in the different volumes changes. So the starting point is always different. If the mesh is distorted, the connectivity of the elements in a volume also changes. Is there any way to reorder the node numbering for consistent connectivity?

Hi,
could you please share the script with me, so that i can look into it.