I've been trying to use LrKeyword.getAttributes() to get the keyword flags as detailed in the SDK, but the only value returned is "includeOnExport". There also seems to be no way to get the values for "Export Containing Keywords" and "Export Synonyms". This is in LR3.6 . Can anyone confirm?
Yes, others have observed the same symptoms. In general, the SDK LrKeyword API is incomplete:
- You can't get Export Containing Keywords and Export Synonyms.
- You can't set those attributes for new or existing keywords.
- You can't change the name, parent, or children of a keyword.
Many users have complained about the limited ability in LR 3 (and now 4) to manage large keyword hiearchies, and a couple of plugin authors have observed that the incomplete API makes it impossible for a plugin to fill in that missing functionality.
The SDK hasn't received much attention from Adobe since LR 3.0. The LR 4 beta doesn't seem to have many SDK changes, but there's no documentation for it yet, and it could well change before the final release (one can always hope).
In LR 5, keyword:getAttributes() correctly returns "keywordName", "includeOnExport", and "synonyms".
keyword:setAttributes() is able to set those attributes as well.
Unfortunately, you're still not able to get or set "exportContainingKeywords" or "exportSynonyms".