Skip to main content
Known Participant
August 23, 2022
Question

After update, Illustrator send error message on command: app.activeDocument.textFrames.everyItem.rem

  • August 23, 2022
  • 2 replies
  • 164 views

Thank you for your time and effort in looking at this post!

I have two scripts that have worked well until the last update.  I am now getting an error in running the command

app.activeDocument.textFrames.everyItem.remove();

The error I now get is number 1302: No such element on line that is shown above.There is little on the Web regarding this error.

Have no idea of what is wrong but relate it to the last update.  Is there an access to the exact nature of updates?

Thank you for your help

This topic has been closed for replies.

2 replies

Charu Rajput
Community Expert
Community Expert
August 23, 2022

@EyeballDoc ,

In Illustrator, there is no property everyItem(). This exists in Indesign. To remove all textframes in Illustartor you should use

app.activeDocument.textFrames.removeAll();

 

Best regards
femkeblanco
Legend
August 23, 2022

The error is telling you that there are no objects (presumably textFrames) to remove.  Why that is the case is beyond the usefulness of the error message.  Having said that, the above statement has a very unusual syntax with "everyItem" in the middle.  Can you say what "everyItem" is?