Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

getParamForDisplayName("Source Text") and getValue() and setValue() are not working in component obj

New Here ,
May 29, 2023 May 29, 2023

I have three diffucility in my code.


Firstly

 

textObjComponent.properties.getParamForDisplayName("Source Text")

 

 is returns "Failed to retrieve variables. Details: Error processing request: XML error in line 1

- Not well-formed (invalid token)"
 
Secondly my text component has a "Customer Name" text but this code

 

textObjComponents[4].properties.getParamForDisplayName("Source Text").getValue()

 returns "Ũ" I dont know what is this.

 

 
Thirdly
When I run this code 

 

textObjComponents[4].properties.getParamForDisplayName("Source Text").setValue("aaa")​

 

in Premiere Pro component instanceName and display text is gone and I can not understand what is the problem.
 
my full code is this:
 
 

 

var projectPath="my_path";
if (app.isDocument(projectPath)) {

    app.openDocument(projectPath);
    var project = app.project;
    var tracks=app.project.activeSequence.videoTracks;

    var textObj=null;
    breakFlag=false;

    for (var i=0, len=tracks.length; i < len ; i++) {
     
      clips=tracks[i].clips;
     
      for (var j=0, len=clips.length; j < len ; j++) {
        var clipObjectName=clips[j].name;
        if(clipObjectName=="texts"){
          textObj=clips[j];
          breakFlag=true;
          break;
        }
      }
      if(breakFlag){
        break
      }
     
    };
   
    textObjComponents=textObj.components;
    for (var i=0, len=textObjComponents.length; i < len ; i++) {

        textObjComponent=textObjComponents[i];
        if (textObjComponent.displayName=="Text"){
          3+5;
        }
    }
} else {
  alert(projectPath+" This document cant open.");
}

 

 
TOPICS
Editing , Effects and Titles , Error or problem
289
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 29, 2023 May 29, 2023
LATEST

error.png

it is debugging screenshot.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines