-2

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: http://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: http://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.

  • Possible duplicate of Connecting dots on Illustrator – Luciano Aug 2 '16 at 13:53
  • @Luciano It is a build of that question as that script is now showing error, maybe someone knows how to fix that error. Let me know id I need to edit my question more. – Amit Saxena Aug 2 '16 at 16:22
  • 1
    You're asking tech support about a script already posted in an answer to another question. Have you tried contacting the script author or the answerer on the other question? Did you explain what is not working? – Luciano Aug 3 '16 at 8:17
  • @Luciano Yes, I have contacted the author, no response yet. Good point, I will post what is not working here too. – Amit Saxena Aug 3 '16 at 16:47
2

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":

Active layer hidden

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

Active layer visible

|improve this answer|||||
  • Ah that worked. Thanks a lot! I am surprised I missed that :) – Amit Saxena Aug 4 '16 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.