.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
DBObject vs. Entity
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
176 Views, 3 Replies
05-31-2012 01:10 AM
I'm really newb in autocad.net. I didn't understand clearly about these type.
in code from Mr. Kean Walmsley:
Transactiontr = doc.TransactionManager.StartTransaction();
using (tr)
{
DBObject obj = tr.GetObject(id, OpenMode.ForWrite);
....
tr.Commit();
}
But I use type Entity also can get the same result. So what is different between them. And how to use them in a good way.
Re: DBObject vs. Entity
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-31-2012 01:21 AM in reply to:
Nk_long
If these both are graphical objects
so there is no difference between them,
~'J'~
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
C6309D9E0751D165D0934D0621DFF27919
Re: DBObject vs. Entity
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-31-2012 01:37 AM in reply to:
Hallex
To quote the ObjectARX docs: "The DBObject class is the base class for all objects that reside in an Database object." The Entity class directly inherits from DBObject. The Transaction.GetObject() method returns a DBObject type and you then cast it to other types. So if your ObjectId references an Entity, you can cast the DBObject to type Entity and then access the Entity members. I recommend you check out the ObjectARX arxmgd.chm file or use Reflector to get a better feel for the AutoCAD .NET inheritance chains.
Re: DBObject vs. Entity
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-31-2012 02:23 AM in reply to:
Artvegas
Thanks, I forgot about ObjectARX docs
~'J'~
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
C6309D9E0751D165D0934D0621DFF27919
