Logout Developer Knowledgebase Search Adobe Partners Main Adobe Solution Partner Finder Adobe Solution Partner Program Support Developer Knowledgebase Adobe Solution Partner Program Products & Technology Adobe
Developer Knowledgebase

Knowledgebase HomeInCopy KB

Overview
Software Development Kits
Developer Knowledgebase
Support
Legal Notices
Feedback
Adobe Solution Partner Program
Join
Find a Solution Partner

Product
InCopy
 
Version
2.0
 
Last Edited
18-Jun-2003
 
Document
52500

How To: How to access keyword metadata in InCopy from a plug-in

Issue
When using the GetKeywords() method on the IAdobeCoreMetaData interface to return the keywords in an InCopy document, I get an empty list back. InCopy displays these keywords fine in the UI, therefore, there must be some way to do it.

Solution

The way to do this is to get a text model for the InCopy document using the following code:

InterfacePtr<IPMUnknown> iUnknown(Utils<IInCopyWorkFlowUtils>()->QuerySelectedTextMetaDataBoss());

You will see from the IInCopyWorkFlowUtils.h file that the above method returns a text model interface as default even if there is no text selection.

From here you can simply call the following code to get the IAdobeCoreMetaData interface

InterfacePtr<IAdobeCoreMetaData> mMetaData(iUnknown, IAdobeCoreMetaData::kDefaultIID);

The next step is to call the GetKeywords() method on the IAdobeCoreMetaData interface to return the keywords for the InCopy document:

K2Vector<PMString> mKeywords = mMetaData->GetKeywords()

back to top
Was this Knowledgebase document helpful? Yes  No
The articles in this knowledgebase are intended for use by software programmers currently using an Adobe SDK to extend or customize an Adobe product. These articles may be highly technical in nature.
If you have questions about an Adobe Product that are not related to development or an SDK product please visit: http://adobe.com/support/main.html
Copyright © Adobe Systems Incorporated. All rights reserved.
Terms of Use
Online Privacy Policy