Reply To: Creating plugin using sample sdk

#1247428

Can anyone guide me with getting the document name using C++ and I have the attached the code please guide me if it goes wrong.

IDocument* document = Utils<ILayoutUIUtils>()->GetFrontDocument();
if (document == nil)
{
CAlert::InformationAlert(“no document opened”);
break;
}
else
{
IDocument* docname = Utils<ILayoutUIUtils>()->GetFrontDocument();
// doc = document->GetDocument();
docname = doc->GetDocumentName();
CAlert::InformationAlert(“Document opened );
}

P.S: In this I have used “IDocument.h” header file but it shows an error listed below

1>..\..\..ourcedksamples\CustomHttpLinkUI\CustomHttpLinkUIObserver.cpp(178): error C2039: ‘GetDocument’: is not a member of ‘IDocument’
1>C:\Users\user\Desktopdk 2020dk 2020\plugin_sdk_15.0.0.155 old\pluginource\public\interfacesrchitecture\IDocument.h(37): note: see declaration of ‘IDocument’
1>..\..\..ourcedksamples\CustomHttpLinkUI\CustomHttpLinkUIObserver.cpp(180): error C2001: newline in constant
1>..\..\..ourcedksamples\CustomHttpLinkUI\CustomHttpLinkUIObserver.cpp(181): error C2059: syntax error: ‘}’

This article was last modified on May 4, 2020

Comments (0)

Loading comments...