0
Explorer
,
/t5/framemaker-discussions/get-the-parent-textframe-of-a-marker-using-extendscript-unstructured/td-p/13111127
Aug 02, 2022
Aug 02, 2022
Copy link to clipboard
Copied
Hi,
I am a newbie in ExtendScript. In my document, I have a couple of TextFrames which contain hyperText markers. Using ExtendScript I can get all the HyperText markers. Now I want to get the parent of each marker via script. But I couldn't find anything in the documentation.
Any help or suggestion would be appreciated.
Sanam
TOPICS
Scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Expert
,
Aug 03, 2022
Aug 03, 2022
A marker will have a TextLoc property and you can use this to get the parent TextFrame. Something like this:
var textFrame;
// Assuming marker is your Marker object and doc is your Doc object.
textFrame = getTextFrame (marker.TextLoc, doc);
function getTextFrame (textLoc, doc) {
var prop, textFrame;
// Get the text frame from the text location.
prop = doc.GetTextPropVal (textLoc, Constants.FP_InTextFrame);
if ((prop.propIdent.num) && (prop.propVal.obj)) {
textFrame = prop.propVal.
...
Community Expert
,
/t5/framemaker-discussions/get-the-parent-textframe-of-a-marker-using-extendscript-unstructured/m-p/13111772#M75819
Aug 03, 2022
Aug 03, 2022
Copy link to clipboard
Copied
A marker will have a TextLoc property and you can use this to get the parent TextFrame. Something like this:
var textFrame;
// Assuming marker is your Marker object and doc is your Doc object.
textFrame = getTextFrame (marker.TextLoc, doc);
function getTextFrame (textLoc, doc) {
var prop, textFrame;
// Get the text frame from the text location.
prop = doc.GetTextPropVal (textLoc, Constants.FP_InTextFrame);
if ((prop.propIdent.num) && (prop.propVal.obj)) {
textFrame = prop.propVal.obj;
return textFrame;
}
}
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
sanam.deh
AUTHOR
Explorer
,
LATEST
/t5/framemaker-discussions/get-the-parent-textframe-of-a-marker-using-extendscript-unstructured/m-p/13113893#M75830
Aug 04, 2022
Aug 04, 2022
Copy link to clipboard
Copied
@frameexpert thank you for your help.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

