Skip to main content
Inspiring
January 5, 2011
Question

Is there a way so save my own data about an object in the AI file?

  • January 5, 2011
  • 1 reply
  • 1609 views

I'd like some additional information saved with the objects my script will be creating/working on, so that when the script is ran again it can use that data.  Is this possible with scripting or is that more a SDK thing?

This topic has been closed for replies.

1 reply

Inspiring
January 6, 2011

You can store lots of information in each object's Note. I treat it similar to InDesign's Label property.

(After checking) Unfortunately, Illy's Document has no Note attached, so you need to have at least a single real object to put your info in.

It's about time InDesign's and Illustrator's scripting abilities get merged. I sorely miss little things such as a proper "exit" function, as well as the big stuff like "everyItem" and the other "xxItem" functions". Illy's entire object model is in dire need of an overhaul ... every single object resolves to something called "Object" -- no further information is given. With InDesign's object model, on the other hand, you can follow the entire tree up to Document and at the very end Application, and immediately see the inheritance tree for every single object.

jsavage77Author
Inspiring
January 6, 2011

Was going to go the note route, but then found tags in the reference. I can have multiple tags per object instead of trying to cram everything into a single string.

Inspiring
January 6, 2011

Very good! Yes, tags seem to be Illustrator's 'label'; and you can add them to a Document, too.

I used Notes because you can see their contents immediately in the interface, but now that you mention it: if all works as it supposed to, I might as well replace them with tags.