Answered
Script to apply arrowhead in Stroke (Indesign). Help?
Can someone help me create a script? I'm trying to create a script to create a path and then apply "arrowheads" to it. I can't apply "arrowheads" to a created path, only create the path. I've tried other possibilities, but I can't. Can anyone solve this?
var doc = app.activeDocument;
var page = doc.pages[0];
// Create a line with a stroke
var line = page.graphicLines.add();
line.strokeWeight = 2;
line.strokeColor = doc.swatches.itemByName("Black");
// Set the start and end points of the line (example coordinates)
line.paths[0].entirePath = [[10, 10], [40, 10]];
// Apply a start arrowhead to the line
line.paths[0].startArrowhead = ArrowHead.TRIANGLE_ARROW_HEAD;
// Apply an end arrowhead to the line
line.paths[0].endArrowhead = ArrowHead.TRIANGLE_ARROW_HEAD;
