Copy link to clipboard
Copied
UIDRef docUIDRef =GetDocumentUIDRef(widget); // Result: fDB=0x05ccc310, fID=1
InterfacePtr<IDocument> document(docUIDRef, UseDefaultIID());
Occur error:
__vfptr = CXX0030: Error: expression cannot be evaluated
But i open file from sdk, it is ok.
IDFile fSysFile;
FileUtils::PMStringToIDFile("D:\\test.indd", fSysFile);
SDKLayoutHelper layoutHelper;
UIDRef docUIDRef =layoutHelper.OpenDocument(fSysFile);
InterfacePtr<IDocument> document(docUIDRef, UseDefaultIID());
How get active Document?
Thanks
You could use the ILayoutUIUtils to get a reference to the active document. The code would be like below
iDocument *iDoc = Utils<ILayoutUIUtils>()->GetFrontDocument();
-Manan
Copy link to clipboard
Copied
You could use the ILayoutUIUtils to get a reference to the active document. The code would be like below
iDocument *iDoc = Utils<ILayoutUIUtils>()->GetFrontDocument();
-Manan
Find more inspiration, events, and resources on the new Adobe Community
Explore Now