Using the Process Analyst > Process Analyst for Developers > Cicode Programming Reference > The Update Function
The Update Function

The update function is complex since it needs to match an Object View pen item with a real pen object; however, this isn't too difficult because the Object View tree always reflects how many panes and pens are being displayed.

The code achieves this by iterating through each pane and pen object in the Process Analyst while simultaneously keeping a running index count of which pane/pen item it matches up to in the Object View tree.

By using these indexes the code knows which row to update. A row update is achieved using the PutField method.

Note: Implementing your own column is CPU-intensive. Try to keep the amount of code necessary to calculate a row value as efficient as possible and be aware how often the code will be executed. Note also that, for efficiency, the BlockUpdates and UnblockUpdates functions are used to limit the number of updates made to the Object View.