Skip to main content
Inspiring
December 8, 2012
Answered

Anoyone know how to use Reflection?

  • December 8, 2012
  • 1 reply
  • 861 views

I'd like to export certain properties from an ai-document to XML. The XML will be post-processed using XSLT. Secretly, I'm hoping that I can invoke the Reflection-system (as mentioned brifely, I might add) in the ExtendedScript Toolkit CS6 Core JavaScript Classes.


Do anyone know how to get reflection working for JavaScript objects (both built-in and the ones I've created in code my self)? Are there any guides that are relevant in my case? (Try googling "illustrator script reflection" and you get a bunch of flip object scripts ...)

This topic has been closed for replies.
Correct answer JoarBolstad

Found it. Had to alter my google query ... (Try "extendscript reflection", and you'll see what I mean.)

For reference, try the following:

var xmlSource = myCustomObject.reflect.toXML();

alert ( xmlSource );

1 reply

JoarBolstadAuthorCorrect answer
Inspiring
December 8, 2012

Found it. Had to alter my google query ... (Try "extendscript reflection", and you'll see what I mean.)

For reference, try the following:

var xmlSource = myCustomObject.reflect.toXML();

alert ( xmlSource );