How can I find the form a textFrame?

Hey guys,.

so when using "constructor.name", you can get the type of an object. In this case "textFrame. But how do you find if the textFrame is a polygon, ellipse, etc.?

Sorry if this is something basic, but I can't find all the resources for that.

Thank you

Oh. I forgot a single line of code.

Before assigning a new contenType, there are empty text block:

app.selection[0].constructor.name;
var myDup = app.selection[0].duplicate();

//Assign empty string as contents:
myDup.parentStory.texts[0].contents = "";

myDup.contentType = ContentType.GRAPHIC_TYPE;
myDup.getElements()[0].constructor.name;

Uwe

Tags: InDesign

Similar Questions

Maybe you are looking for