The ObjGetLast function returns the index of the last PowerDoc object in a Power Engine document.
Parameter | Description |
---|
The index of the last PowerDoc object in the document. Thus, if there are no PowerDoc objects in the document the function will return -1.
In Power Engine API, each PowerDoc object has a unique index. The index of a PowerDoc object simply represents its position (or location) in the Object Allocation Array. When a new PowerDoc object is added to the document, the engine will always append it to the end of this array. Similarly, when a PowerDoc object is deleted, the engine will always remove it from this array and move all subsequent PowerDoc objects down (toward the beginning of the array) by one position.