+ aNew->setThis(aNew);
+ static Events_ID anId = ModelAPI_DocumentCreatedMessage::eventId();
+ std::shared_ptr<ModelAPI_DocumentCreatedMessage> aMessage = std::shared_ptr
+ <ModelAPI_DocumentCreatedMessage>(new ModelAPI_DocumentCreatedMessage(anId, this));
+ aMessage->setDocument(aNew);
+ Events_Loop::loop()->send(aMessage);
+}
+
+//=======================================================================
+bool Model_Application::loadDocument(const std::string theDocName, const int theDocID)
+{
+ static const std::string thePartKind("Part"); // root document is never loaded here
+ std::shared_ptr<Model_Document> aNew(new Model_Document(theDocID, thePartKind));
+ myDocs[theDocID] = aNew;
+
+ bool aRes = true;