This content has been marked as final. Show 6 replies
myChar = myGraphics[myCounter].parent;
Are you sure you need the insertionPoint for this? If so, add this:
[Edit]: I realize that I'm assuming that "myGraphics" refers to anchored/inline page items. If it is actually the graphic in the pageItem, then:
myChar = myGraphics[myCounter].parent.parent;
For adding a HyperlinkTextDestination you need a text or insertion point location. (Or is there another way to link the graphics directly?)
Your way throw's the error of an "unknown method" ...
var myChar = myGraphics[myCounter].parent.;
var myIP = myChar.insertionPoints;
You've not shown enough of your script. What is myGraphics referring to? How did you construct it?
Did you see the edit to my previous message?
I loop through all graphics of the document. (And they are all within a textframe including the caption)
myGraphics = app.activeDocument.allGraphics;
In that case, you need (as I said in the edit) the parent of the parent of the graphic to get to the character that holds the inline/anchored graphic. But that assumes that indeed all the graphics are inline/anchored.
OMG! I'm soooooo blind!!!
... I didn't regognize, that there is a normal graphic without a caption in my document!
Now it work's perfect!!!
Many Thanks, Dave!