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

[CS2][JS] Map tags to styles

New Here ,
Apr 02, 2008 Apr 02, 2008
Hi

I would like to map styles to tags and map tags to styles using a predefined file....

I've tried using ...

var thepath="/Volumes/test/Mapping.indd";
var myImportfile=new File(thepath);

app.activeDocument.xmlImportMaps.add(myImportfile);
app.activeDocument.xmlExportMaps.add(myImportfile);

... but it raises an error... missing parameter...

Does anyone have an idea?

Thanx

Tim
TOPICS
Scripting
618
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 ,
Apr 02, 2008 Apr 02, 2008
This and many other things are described in some of Adobe's documentation at http://www.adobe.com/products/indesign/scripting/index.html

Peter
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
New Here ,
Apr 02, 2008 Apr 02, 2008
Hi Peter,

Thanks for the info...

In the syntax reference I found the missing property ... reading the reference I realized that maybee I'm using the wrong object or methode... But I've searched almost an hour for the correct object and methode and I didn't find anyone that can be used to load the Tags To Styles mapping from an other indesign file...

Do you have an idea ?

Thanx

Tim
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 ,
Apr 02, 2008 Apr 02, 2008
I'm not particularly good at this sort of thing, but the reference says that xmlImportMaps.add() takes two parameters, a markup tag and the mapped style. Take a look at p. 114 of this document:

http://www.adobe.com/products/incopy/scripting/pdfs/InCopy_CS3_Scripting_Guide_JS.pdf

which is for CS3, but what you want to do has not changed much I don't think.

Peter
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
New Here ,
Jul 22, 2008 Jul 22, 2008
The incopy scripting guide pdf doesn't seem to be downloading.
Does anyone have a copy they could post elsewhere?
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 22, 2008 Jul 22, 2008
LATEST
Hi Eric,

I just checked the link, and it's working fine. Try again?

Also, I'd missed this thread earlier--what Tim is asking about (loading a tag to style mapping from a file) can't be done directly in the user interface (as far as I can tell), so it can't be done directly from scripting. Instead, you'd have to open the file containing the tag to style mapping, then transfer the mapping one import/export map at a time to the target file.

Thanks,

Ole
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