'How to draw a graphicLines in InDesign using CEP / ExtendScript?
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 ?
Solution 1:[1]
Try to add this line at the end of your snippet:
line.strokeWeight = 1;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source | 
|---|---|
| Solution 1 | 


