Skip to main content
Inspiring
September 4, 2015
Question

changing an existing markers comment

  • September 4, 2015
  • 1 reply
  • 948 views

I feel this must be a simple syntax error on my part but I'm stuck.

I want to edit the comment attribute of an existing marker. the .comment attribute is listed as read/write so I think this should be the correct way to do this.

app.project.activeItem.layers;

layerCollection[2].property("Marker").keyValue(2).comment = "helllo";

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
September 5, 2015

Assuming it's layer 1, which already has 2 existing markers, you could do it like this:

var markerVal = new MarkerValue("hello");

app.project.activeItem.layer(1).property("Marker").setValueAtKey(2, markerVal);

Dan

Known Participant
September 5, 2015

Thanks Dan. I appreciate it.

Is it possible to duration, time, chapter etc. this way?

Known Participant
September 6, 2015

Yes, just set those attributes in the markerVal object before doing the setValueAtKey().

Dan


hmmm. Im able to set all values but time and duration. MarkerValue appears to take only 5 arguments and those don't include a value for time and duration.