Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


get list of tag and mapping names

Explorer ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

hI all 

i am trying to create one script to get all list of tags and their mapping style names

any suggestion 

 

 

Thanks in advance

Anupam

TOPICS
Scripting, Server developers

Views

48

Likes

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

correct answers 1 Correct answer

Enthusiast , Jul 10, 2021 Jul 10, 2021
Hi Anupam, is this sort of what you mean?var xmlMaps = app.activeDocument.xmlImportMaps; for (var i = 0; i < xmlMaps.length; i++) { var m = xmlMaps.item(i); if (m.isValid) { $.writeln(m.markupTag.name +': ' + m.mappedStyle.name); } }

Likes

Translate

Translate
Enthusiast ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

Hi Anupam, is this sort of what you mean?

var xmlMaps = app.activeDocument.xmlImportMaps;

for (var i = 0; i < xmlMaps.length; i++) {
    var m = xmlMaps.item(i);
    if (m.isValid) {
        $.writeln(m.markupTag.name +': ' + m.mappedStyle.name);
    }
}

Likes

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 11, 2021 Jul 11, 2021

Copy link to clipboard

Copied

LATEST

Hi @m1b 

script is ok for desktop version Please use insted of  app.activeDocument use app.documents[0]

for server version I am working on indesign server 2019...

var xmlMaps = app.documents[0].xmlImportMaps;

for (var i = 0; i < xmlMaps.length; i++) {
var m = xmlMaps.item(i);
if (m.isValid) {
$.writeln(m.markupTag.name +': ' + m.mappedStyle.name);
}
}

Likes

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