Message 1 of 2

Not applicable
05-15-2015
07:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When I do it, then my code looks something like this:
public void Initialize() { Document doc = cad.DocumentManager.MdiActiveDocument; if (null == doc) return; Database db = doc.Database; Editor ed = doc.Editor; using (doc.LockDocument()) { using (Transaction tr = db.TransactionManager.StartTransaction()) { ed.WriteMessage("\nThe \"{0}\" assembly successfully loaded.\n", this.GetType().Assembly.Location); // TODO: Here is my code of working with Database... tr.Commit(); } } }
Assembly can be registered for autoloading (through the registry record or BUNDLE engine). I hadn't problems with such approach, but I remember - Alexander Rivilis wrote he had. He wrote what the Document (or Database) can be initialized not completely at the time of operation of this code. Ok, how can I check initialization of these objects was finished?
Solved! Go to Solution.