Unable to create a line node with circular end

line.strokeCap = "CIRCLE_FILLED"; return an error;

line.connectorStartStrokeCap = "CIRCLE_FILLED";
line.connectorEndStrokeCap = "CIRCLE_FILLED";

And it looks like your “line” variable is not a ConnectorNode.

Sorry I got confused between line and connector.

Actually I would like to create a line node with circular end. How could I achieve this via plugin api. Thanks!

Unfortunately, Figma has not added this type of strokeCap ​​for LineNode and VectorNode to the Plugin API. Therefore, this is currently not possible.

You can see the available strokeCap ​​types on the Figma Developers:

1 Like