Hello
Sometimes it can happen because overlaying elements exists in the DXF file or they are not closed.
In order that the Auto constant Z is able to identify the elements clearly, the DXF file should be cleared up.
Have a nice weekend
Michel Stockmann