Please add id support for each page element as we have in Indesign
What I think when we do scripting for elements, we should have a unique id for each element. So it will be easy for developer to access the element using it instead of its name
6
votes
In CC2020, the 'uuid' string key ('unique object identifier') was added into Ai DOM. It is readable and can be used to retrieve a specific object in a script using the getPageItemFromUuid() method.
You can read more in this short article.