do you like to add something like comments?
See into methods insertLabel( keyString , valueString ) and extractLabel( keyString ) that returns valueString.
Note: There is a limit of the amount of data that can go into a value string.
InDesign will not throw an error if you exceed the limit with insertLabel().
Thank for your reply and thanks for sharing links. I guess these functions work on selected item.
I want to add some information on document level. Like property of that document; which need not to be visible on page itself.
petern55563219 wrote… I guess these functions work on selected item.
Methods insertLabel() and extractLabel() are available on object document as well.
Even on object app. If used with object document the information will also travel on with IDML export.
And the two methods are with a lot of other objects as well. Simply check DOM documentation:
you cannot. Not on object document. For that you'd have to export to IDML and check the interior XML file designmap.XML of the package.
<Properties> <Label> <KeyValuePair Value="2" Key="kAdobeDPS_Version"/> <KeyValuePair Value="XXXX" Key="YYYY"/> </Label> </Properties>
Where I inserted a value "XXXX" with a key "YYYY".
Key "kAdobeDPS_Version" is set by app every time you add a document.
If you want to add visible key-value pairs you have to insert them with a special key and that is "Label".
On selectable objects you can see the value with InDesign's ScriptLabel functionality.
"Label" is also working as property of an object like:
rectangle.label = "ValueString";
would return "ValueString".