Skip to main content
Known Participant
August 10, 2011
Question

figure placing in cs2/cs3

  • August 10, 2011
  • 1 reply
  • 1422 views

Hi All,

I have more than 200 images need to place in indesign. Every time i need to place the images manually.

In my indesign i have a tag like <<figure 36>> then followed be the figure caption. My figure name is F0036.eps.

Kinldy help me how to place the figures using script.....

Thanks

Karthik

This topic has been closed for replies.

1 reply

csm_phil
Legend
August 10, 2011

Hi Karthik,

I have one doubt above mentioned your request, you working in xml work flow or word file flow.

thx

csm_phil

M KarthikAuthor
Known Participant
August 10, 2011

i am working on word file flow.....

csm_phil
Legend
August 10, 2011

Hi Karthik M,

Please try the below JS Code, the script will find and change the format after import the figure into the inline figure if you want anchor please apply the anchored object styles. And one morething the script only consider the input format only and eps files only. if you want ai or tifff you can modify the script.

I hope this is you expect.

var myFolder=Folder.selectDialog("Choose a Art folder!");

app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat="(?i)<<figure (\\d+)>>";
app.changeGrepPreferences.changeTo="F00$1.eps";
app.documents.item(0).changeGrep();


app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat="(?i)F00\\d+.eps";
mySearch = app.findGrep(true);
for(a=0;a<mySearch.length;a++){
     try{
          mySearch.characters[0].insertionPoints[0].place(File(myFolder + "/" + mySearch.contents));
          }catch(e)     {}
     }
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat="(?i)F00\\d+.eps";
app.changeGrepPreferences.changeTo="";
app.documents.item(0).changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

thx

csm_phil