Copy link to clipboard
Copied
How to create a Mesh Item in illustrator using script?
You cannot create mesh items from a script.
It's in the Javascript Reference, but even if it wasn't there, not everything you can do manually is available in the Scripting API. Other functions are also not available, ie access to Appearance panels among many other functions.
"MeshItem
A gradient mesh art item. You cannot create mesh items from a script. However, you can copy an existing
mesh item with the duplicate method, then use the one of the move methods to place the copy at the
proper location."
Copy link to clipboard
Copied
You cannot create mesh items from a script.
Copy link to clipboard
Copied
Why is it not possible to create a mesh item using a script? Any reason for that?
Copy link to clipboard
Copied
The immediate answer is because the developers never wrote a function to create mesh items. Why that was the case is anyone's guess.
Copy link to clipboard
Copied
It's in the Javascript Reference, but even if it wasn't there, not everything you can do manually is available in the Scripting API. Other functions are also not available, ie access to Appearance panels among many other functions.
"MeshItem
A gradient mesh art item. You cannot create mesh items from a script. However, you can copy an existing
mesh item with the duplicate method, then use the one of the move methods to place the copy at the
proper location."