Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find and replace script fails when object has been renamed #4

Open
Retroker opened this issue Aug 23, 2021 · 2 comments
Open

Find and replace script fails when object has been renamed #4

Retroker opened this issue Aug 23, 2021 · 2 comments

Comments

@Retroker
Copy link

Suppose I am trying to replace some objects by an ellipse.

findAndReplaceGraphic_centered returns an error when one of the selected objects have been renamed somehow.

If we select two objects like <Ellipse> and <Path> everything goes well.

However, if one of them has a name, like <Ellipse> and FooBar, the script returns the following error:

Error 25: Expected: ].
Line: 1
-> subArray1["object"]=[PathItem FooBar]
@nvkelso
Copy link
Owner

nvkelso commented Aug 24, 2021

I haven't used these script in my daily practice in quite some time. To work around it can you adjust your object names?

@Retroker
Copy link
Author

Yes, if we just delete the object names leaving it blank Illustrator rename the object with default names and everything starts working again.

I think someone can be saved by this thread though... because it took me a while to figure out what was causing the error.

The problems with deleting names are, of course, having to do it manually (very annoying) and not being able to use names to organize your work (I personally have this practice of naming too many objects to make it easier for me to access Layers panel).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants