Skip to main content
tardigrade01
Inspiring
July 28, 2015
Answered

convert point text to paragraph text?

  • July 28, 2015
  • 5 replies
  • 3675 views

Is there a way to convert point text to paragraph text via ExtendScript? I've found nothing. I can't even find an app.executeCommand way to access the contextual menu that allows you to do this by right-clicking the pointtext box on the stage with the type tool (as show in the pic). Any help would be appreciated!

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Mathias Moehl

Hmm, since the pointText and boxText properties of a text document are read-only, I guess there is no easy way to do it

Have you tried to create a new new textlayer with LayerCollection.addBoxText() and to copy all properties of your original layer to it?

5 replies

tardigrade01
Inspiring
July 28, 2015

I had not tried that, but great idea. I will give that a shot. Thanks!

tardigrade01
Inspiring
July 28, 2015

I have drilled down from my compositions to my layers and am trying to detect if each one is a) a text document and b ) pointText, but am getting "null is not an object". Am I drilling down to the pointText property the wrong way?

var proj = app.project;

var compList = [];

for (var i = 1; i <= proj.numItems; i++){

  if (proj.item(i) instanceof CompItem){

  compList.push(proj.item(i));

  }

}

for (var j = 0; j < compList.length; j++){

  for (var k = 1; k <= compList.numLayers; k++){

  if(compList.layer(k).property("Source Text").value.pointText == true){

  alert(compList.layer(k).name);

  }

  }

}

Dan Ebberts
Community Expert
Community Expert
July 28, 2015

You probably need to defend against non-text layers:

  if(compList.layer(k) instanceof TextLayer){

    if(compList.layer(k).property("Source Text").value.pointText == true){

      alert(compList.layer(k).name);

    }

  }

Dan

Mathias Moehl
Community Expert
Mathias MoehlCommunity ExpertCorrect answer
Community Expert
July 28, 2015

Hmm, since the pointText and boxText properties of a text document are read-only, I guess there is no easy way to do it

Have you tried to create a new new textlayer with LayerCollection.addBoxText() and to copy all properties of your original layer to it?

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects