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

[CS2][JS] Map tags to styles

New Here ,
Apr 02, 2008 Apr 02, 2008

Copy link to clipboard

Copied

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

Views

546

Translate

Translate

Report

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

Copy link to clipboard

Copied

This and many other things are described in some of Adobe's documentation at http://www.adobe.com/products/indesign/scripting/index.html

Peter

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

The incopy scripting guide pdf doesn't seem to be downloading.
Does anyone have a copy they could post elsewhere?

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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