I want to insert an existing document to the current document. What I expect is the gemetric model in the inserted document will be displayed and it also will be list in the OCAF tree inn the current document.
I tried the function TDocStd_XLinkTool as indicated in the application framework user's guide:
// open the document in the current application
Handle_TDocStd_Document labDocRef;
CDF_RetrievableStatus RS = m_App->Open(TPath,DocRef);
if(DocRef.IsNull())
return;
And I haven't got what I want. Does anyone know how to implement it?
I appreciate your help very much!
Chris
Discussion
1 archived reply
Posts are displayed in their archived order.
01Commenter-1
Hi Chris!
I had the same problem. I copied the code from TDocStd_XLinkTool::Copy, and filled the TDF_DataSet with labels below 0:1:1, 0:1:2, ... and the TDF_RelocationTable with the labels below 0:1:1, 0:1:2, ... and newly created labels on the target doc. As far as I can tell this works fine.