.NET

.NET

Reply
Active Contributor
28 Posts
0 Kudos
Registered: ‎05-21-2008
Post 1 of 3
Accepted Solution

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

457 Views, 2 Replies
01-24-2011 05:44 AM

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

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

 

You get to DrawOrderTable via WorkingDatabase.DrawOrderTableId.

*Expert Elite*
1,087 Posts
217 Kudos
Registered: ‎04-27-2009
Post 2 of 3

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

01-24-2011 06:33 AM 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.

Active Contributor
28 Posts
0 Kudos
Registered: ‎05-21-2008
Post 3 of 3

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

01-26-2011 02:16 AM 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;

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!