Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adding Tags to document

Explorer ,
Jul 01, 2019 Jul 01, 2019

Hello,

I try to add tags to my active document but I receive an error message :

"Cannot apply a tag to a document"

Does anybody success to add tags to a document ?

Thanks

TOPICS
Scripting
2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 01, 2019 Jul 01, 2019

kopaacabana  wrote

Does anybody success to add tags to a document ?

Thanks

no, you can only add tags to objects. You might want to try using XMP to add metadata to the document instead.

from the Reference

Tag

A label associated with a specific piece of artwork. Tags allows you to assign an unlimited number of

key-value pairs to any page item in a document.

Translate
Adobe
Contributor ,
Jul 01, 2019 Jul 01, 2019

Hey, can you show us your code ?

Here is some documentation for tags, maybe it will help.

Tags — Illustrator Scripting Guide 0.0.1 documentation

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 01, 2019 Jul 01, 2019

kopaacabana  wrote

Does anybody success to add tags to a document ?

Thanks

no, you can only add tags to objects. You might want to try using XMP to add metadata to the document instead.

from the Reference

Tag

A label associated with a specific piece of artwork. Tags allows you to assign an unlimited number of

key-value pairs to any page item in a document.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 01, 2019 Jul 01, 2019

Thanks for your response.

When I visit this doc reference : Adobe Illustrator CS6 Type Library JS: Document, class Document have tags as propreties, so why can't we add/use tags on document, it's very strange !!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 02, 2019 Jul 02, 2019
LATEST

yeah, it's a little confusing. The tags are added to objects, but they're also stored in the document. So if you have Object 1 with 1 tag and object 2 with 3 tags, in total the document will report having 4 tags. But tags are attached to objects not to the document itself.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 01, 2019 Jul 01, 2019

In this case, You can use XMP Meta Data as CarlosCanto say.

You can reference below.

Extend_Script_experimentals/XMPtool.jsx at master · ten-A/Extend_Script_experimentals · GitHub

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines