You cannot access anything about another object. The only way objects can share information is via GDL globals or file I/O.
Add-ons (plug-ins) can access everything, but are only created by experienced programmers.
Will the Element ID Manager not do what you want - to renumber your objects?
One of the forum moderators • AC 25 USA and earlier • MacOS 11.6.6, iMac Pro