Enforced Z-order?

John Clements
Nov 14, 2010 · 1 min read

I admit I have been confused by the recent discovery that in some AutoDesk DWG files, there is an enforced z-order for drawing and in others there is not.

I have not fully been able to track down the cause for this, whether it is the system variable DRAWORDERCTL or object variable DRAWORDER. I also did not see in AutoCAD LT a way to reset an objects DRAWORDER, if that can even be done.

Personally I don’t care about the draw order as we bring across the objects into our own format and we don’t draw things in an enforced order anyway, we have a particular way in which we handle draw order.

However when using LeadTools’ L_VecPaint() to draw, the draw order is important. Apparently, AutoCAD draw everything in a particular object order, irregardless of layer, with the only way to change this order is the use of BringToFront, SendToBack, etc. LeadTools however draws in layer order, drawing all the objects on a particular layer before moving onto the next layer.

This causes an issue when trying to faithfully reproduce a sketch as it would have been drawn in AutoCAD, as it might not draw the objects in proper order. To “fix” this, they, instead of keeping the layer property’s as they are in the file, they modify them and force all objects onto the ‘0’ layer, this way object order is preserved, if not the data.

To me the data would be more important, however I guess it’s just me.

JnJ Software

Delphi Productivity Software

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store