Look up Autodesk.AutoCAD.DatabaseServices.DrawTable class, which have methods: MoveAbove()/MoveBelow()/MoveToTop()/MoveToBottom()
You get to DrawOrderTable via WorkingDatabase.DrawOrderTableId.
thank you norman, your suggestion is very useful.
I make some change to get the DrawOrderTable, because I can't get the DrawOrderTableId from the WorkingDatabase, my code is below:
BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable; BlockTableRecord btr = tr.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead) as BlockTableRecord; DBDictionary dbo = tr.GetObject(btr.ExtensionDictionary, OpenMode.ForRead) as DBDictionary; DrawOrderTable dot = tr.GetObject((ObjectId)dbo["ACAD_SORTENTS"] , OpenMode.ForWrite) as DrawOrderTable;
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register