Copy link to clipboard
Copied
Hi.
I can get a graphicFrameUID. "app.selection[0].id"
But I want to get the storyUID.
Get as a "[app.activeDocument.stories.item(i).id] // [write mode : app.selection[0].parent.id]" but I want the storyUID of the selected textFrame.
Is there any way?
Thanks.
A TextFrame does not 'own' a story, it's more the other way around. You are probably looking for a textframe's parentStory: app.selection[0].parentStory.id (when the selection is a textframe).
Which, obviously, means that for one continuously threaded story, all of its textframes will have the same story id. Whether or not that is a problem depends on what you need it for.
Copy link to clipboard
Copied
A TextFrame does not 'own' a story, it's more the other way around. You are probably looking for a textframe's parentStory: app.selection[0].parentStory.id (when the selection is a textframe).
Which, obviously, means that for one continuously threaded story, all of its textframes will have the same story id. Whether or not that is a problem depends on what you need it for.
Copy link to clipboard
Copied
What is that panel? Is that an SDK thing?
Copy link to clipboard
Copied
looks like TreeView plug-in...
Copy link to clipboard
Copied
Never heard of it.
Copy link to clipboard
Copied
Looks like a mangled version of the SnippetRunner plugin from the SDK.
P.
Copy link to clipboard
Copied
app.selection[0].parentStory.idmlComponentName
Copy link to clipboard
Copied
I often get hold of the story by accessing the lines within the text frame.
...
if ( theLine.parent.constructor.name == "Story" )
...
P.
Copy link to clipboard
Copied
I did not know about constructors, and was about to use idmlComponent name and search in order to determine if a page was a master spread. Thanks for this!
Copy link to clipboard
Copied
This panel is SnippetRunner of the SDK sample.
Thanks all.