Add lines via plugin

• Jul 18, 2017 - 12:38

Dear community,

I'm currently struggling with adding simple black lines via plugin. Already the first step to create an element of type LINE

var line = newElement(Element.LINE);

returns an error: cannot create type 8

Any ideas on how to successfully create a line object and define start and end point of the line?

Maybe it's possible with TEXTLINE? Do I have to assign the object to a note or a segment or the cursor (cursor.add)?

This is not the first element I have troubles to create objects and assign them to the score. Adding a Figured Bass item to the score via plugin creates "something" but this thing has not the properties of a real figured bass inserted with CTRL + G. Tried this as a workaround for simple lines.

Only trying to create lines via plugin. Kind of helpless...

Best regards,

Do you still have an unanswered question? Please log in first to post your question.