Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

Importing graphic into graphics frame on a Reference page

$
0
0

Hello All,

Need to import a graphic (by copy) into a graphics frame located on a Reference page of the document. The objective is to have a number for each chapter on the First Master Page. This is done by using 'Frame Above Pgf' of the Paragraph Tag. This works fine manually, as shown below. I would like to have a generic chapter FM file where I can change the chapter number according to the value of <$chapnum>.

Is there a way to import the graphic (number) into the graphics frame? I see Import, but it requires a TextLoc that I don't have.

Any help is greatly appreciated.

 

 

#target framemaker


var oDoc, oPage, oFrame, oGfx;


var oDoc = app.ActiveDoc;


if (oDoc.ObjectValid()){
    //    oPage = oDoc.FirstRefPageInDoc;    while (oPage.ObjectValid()) {        alert(oPage.Name);        oFrame = oPage.PageFrame;        if(oPage.Name == 'Reference Page 2'){            oGfx = oFrame.FirstGraphicInFrame;            if(oGfx.ObjectValid()){                while (oGfx.ObjectValid()){                    if (oGfx.constructor.name == 'UnanchoredFrame'){                    alert(oGfx.Name);                    }                oGfx = oGfx.NextGraphicInFrame;                }           }        }        oPage = oPage.PageNext;    }
}

Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>