Index

C/C++ Functions

pdObjGetLast

DT_SLONG pdObjGetLast(DT_PDDOC power_doc)

Short Description: Get last PowerDoc object in document

The pdObjGetLast function returns the index of the last PowerDoc object in a Power Engine document.

Parameters

ParameterDescription

power_doc

Handle of the associated Power Engine document.

Return Value

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.

Comments

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.

Related Functions

pdObjAdd, pdObjDel

 

Index