This question came in from Limin as a comment in this previous post: Is there .Net interface for autocad command "DrawOrder"? For example: after solid-hatch a polyline, need to reorder polyline and hatch, how to make it happen using .NET? I've put together some C# code to demonstrate how to do this: using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Runtime; namespace HatchDrawOrder { public class Commands { [CommandMethod("HDO")] static public void HatchDrawOrder() { Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed = doc.Editor; // Ask the user to select a hatch boundary PromptEntityOptions opt = new PromptEntityOptions( "\nSelect boundary: " );... Read more →