.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to bring an entity to front, just like the commond "DR" do?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
sdphg
790 Views, 2 Replies

How to bring an entity to front, just like the commond "DR" do?

I want to bring an entity to front using .net, just like the command "DR",any suggestions? THX.

2 REPLIES 2
Message 2 of 3
norman.yuan
in reply to: sdphg

Look up Autodesk.AutoCAD.DatabaseServices.DrawTable class, which have methods: MoveAbove()/MoveBelow()/MoveToTop()/MoveToBottom().

 

You get to DrawOrderTable via WorkingDatabase.DrawOrderTableId.

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 3
sdphg
in reply to: norman.yuan

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;

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost