How to update asset autoKeywords?
kabexef
Posts: 76
Hi,
when I change a category of an asset (whether through the GUI or via script), the autoKeywords are not updated. In the GUI I can do this by opening the metadata editor, make any change (e.g. description) and accepting, but how can I force this in a script.
Thanks for any idea.
Comments
autoKeywords are created automatically, they are not meant to be manually editable. Beyond that, as a general remark on those fields that are updatable:
That was probably a misunderstanding. I don't want to change the autoKeywords, I want them to change themselves when I add userCategories for example.
I tried the following (sorry for the non-compliant formatting)
print("asset.userCategories 1 =", asset.userCategories); // asset has user categories
print("asset.autoKeywords =", asset.autoKeywords); // user categories found in autoKeywords
var ucs = asset.userCategories;
asset.removeFromCategories(ucs, true);
product.pushMetadata();
asset.updateFromMetadata();
print("asset.userCategories 2 =", asset.userCategories); // asset has no user categories
product.update();
product.updateAssets();
product.updateChildren();
product.pushMetadata();
print("asset.autoKeywords =", asset.autoKeywords); // autoKeywords not refreshed; user categories still found in autoKeywords;