Announcing the new Datavyu v1.4.0 with enhanced features, bug fixes, and a new video player for Windows!

We are in the process of migrating away from this forum—feel free to browse existing help topics. For new support inquiries, please reach out to us via email at [email protected]


I would like to write a script that creates a new cell with an onset of 45 seconds after the onset of a cell in that column.

The column is called "task_start" with the code "start." It currently only has one cell that marks the onset of the task.

I would like to create a new cell in that column with an onset of 45 seconds after the existing cell onset and an offset of 95 seconds after the existing cell onset. I would like the code for this cell to be marked "time2" Is this possible?

Thank you!

asked 30 Jun '17, 13:23

katethorson's gravatar image

accept rate: 0%

Here's a code snippet that should do what you want.

require 'Datavyu_API.rb'

task_column = get_column('task_start')
task_cell = task_column.cells.first()
ncell = task_column.new_cell()
ncell.onset = task_cell.onset + 45000
ncell.offset = task_cell.onset + 95000
ncell.start = 'time2'
permanent link

answered 30 Jun '17, 14:09

Shohan%20Hasan's gravatar image

Shohan Hasan ♦♦
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 30 Jun '17, 13:23

question was seen: 1,492 times

last updated: 30 Jun '17, 14:09

powered by OSQA