Mobile app version of vmapp.org
Login or Join
Harper654

: How to get a script to connect all points in Illustrator working? How can I get this script 'to connect all the corner points of a path by straight lines' working? I downloaded a script called

@Harper654

Posted in: #AdobeIllustrator #Automation #IllustratorScripting #Path

How can I get this script 'to connect all the corner points of a path by straight lines' working?

I downloaded a script called 'All Points' from here but it is not working: www.wundes.com/JS4AI/
To explain further: if I have a square, I can just connect the diagonally opposite points to create diagonal lines. This gets very complex when dealing with shapes with a large number of points as exemplified here: js4ai.blogspot.in/2009/05/spoze-you-have-shape-like-this-and-you.html
The script shows an error, after I select a polygon and run it:


Error 8705: Target layer cannot be modified

Line: 195

var shapeGroup = app.activeDocument.groupItems.add();


PS: The script also finds a mention in the answer to this question.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Harper654

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi706

As the error suggests, the layer can't be modified, which means the selected layer is either hidden or locked. Be aware that the active layer is not the same as the layer of the object[s] you have selected. The active layer is the layer that is highlighted in the layers panel.

As you can see here, the object selected is on "Layer 1", the selected layer is "Layer 2". Since that layer is hidden, if you run the script now you get the error "Target layer cannot be modified":



Make sure the layer is visible and the script works as expected:

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme