.NET

Reply
Contributor
sdphg
Posts: 25
Registered: ‎05-21-2008
Message 1 of 3 (426 Views)
Accepted Solution

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

426 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.

*Expert Elite*
norman.yuan
Posts: 965
Registered: ‎04-27-2009
Message 2 of 3 (416 Views)

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.

Contributor
sdphg
Posts: 25
Registered: ‎05-21-2008
Message 3 of 3 (368 Views)

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;

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community