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?

Dan Ebberts
Community Expert
Community Expert
September 6, 2015

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.


Duration works for me, but yes, you can't change a key's time (sorry, I didn't read your question closely enough). You have to delete the marker and re-create it to change its time.

Dan