Defaulting the Document/Database can lead to A LOT of problems eventually.
Calling Tools.AddEntity() multiple times in a row will be slower than doing
everything in a single transaction; and can also create problems with
UNDO/REDO.
Not having to explicitly open a databased object is convenient, but if
you're setting more than one property at once, this technique will be
slower.
Personally, I find the class name "Circles" to be a very poor choice for a
derivation from "Circle".
Does any of this matter to you? It depends on your circumstances. If you
find DOTNETARX useful, there's nothing particularly wrong with using it. At
the same time, there are good reasons for the .NET API being what it is.
Dan
"Mark Pexton" wrote in message
news:4878015@discussion.autodesk.com...
I just ran across several DOTNETARX posts. Based on what's being advertised,
why doesn't Autodesk provide a user-friendly tool like this. I am not a
software developer. When someone creates a tool like this to make my job, as
a programmer, easier all I can say is thanks!
Here's a snippet from a previous post:
Traditonal .net programs is like the following:
Entity ent..;
Database db= Application.DocumentManager.MdiActiveDocument.Database;
DBTransMan tm=db.TransactionManager;
using(Transaction trans=tm.StartTransaction())
{ BlockTable bt=(BlockTable)tm.GetObject(db.BlockTableId,OpenMode.
ForRead,false); BlockTableRecord btr=
(BlockTableRecord)tm.GetObject(bt[BlockTableRecord.ModelSpace],OpenMode.ForW
rite,false);
btr.AppendEntity(ent);
tm.AddNewlyCreatedDBObject(ent,true);
trans.Commit();
}
With DOTNETARX,the codes can be simplified like this:
Entity ent...
Tools.AddEntity(ent);