I saw that there was a similar question but my problem is not the same :
This is how I create my graphicLines :
var myArr = [
[x1, y1],
[x2, y2],
...
]
// Get the active document
var doc = app.activeDocument;
// Get item from the page
var page = doc.pages.item(0);
var line = page.graphicLines.add();
line.paths.item(0).entirePath = myArr;
I should have this (the line circled in blue) :
But I get this (the rectangle circled in blue) :
This rectangle appears when I click on the focus, otherwise it is nonexistent.
The rectangle seems to be the size of the line and is well positioned but I did not get the line I wanted. What did I forget ?
Try to add this line at the end of your snippet: