How do you index atoms in Materials Studio?

Is there a way to obtain atom indices from witin Materials Studio before they are written to a .pdb file? For example, is there a Perl command to access the index of an object in the Atom class?