Hi Max,
Not sure if this solves your issue, but you can retrieve the first item from the database and sort by the Structure descending, you will then receive a single Component object with the highest numbered Structure attribute:
I wouldn't make an autonumber because this is a number you can't control, an autonumber is automatically generated and you can also get gaps in your sequence .
What I would do is use an integer and put in the number you need.
You can easily retrieve the last object (the one with the highest number). You create a retrieve from database and in it retrieve the "First" object. If you then sort that retrieve descending on the attribute "Structure" then you have the object with the highest number.