I made a custom textattribute for IDCS5 and everything works fine as long i remain the Indesign CS5 fileformat. I want that my attribute 'survives' a idml roundtrip (i.e. Exporting to idml, open the idml in indesign and save it back to .indd). There is where it goes wrong. My attribute is lost in the roundtripped document.
The docs i found concerning preserving for .idml are all about custom scripting objects. My attribute is not scriptable and can not be accessed by the scripting api.
As i understood, IAttrImportExport is only about exporting to tagged text, right?
I tought it had to do with persistency, but as i found out, an attribute is by default persistent. When i save/close my document and reopen it, the attribute is still there anyway.
So, i'm stuck now. Can anyone point me to the right direction?
Thanks in advance!
You need to make your attribute scriptable for it to round trip throught IDML.
AFAIK in order to save your custom textattribute in inx/idml you need to provide scripting access for it, because that's the way the export/import engine works – in fact, it makes use of scripting and inx/idml files aren't much more than scriping instructions to re-create InDesign document. So, you have to make it scriptable...
Thanks Pawan and Maciej for your replies.
Indeed, i was just examining the Framelabel example. Combined with your answers, i see 'the light' now! ;-)