When creating O-Calc scripts and plugins it is often the case that the developer / user would like to be able to perform operations on a large number of poles in a batch operation, perhaps as an un-attended operation. The O-Calc scripting and plugins API provides a convenient way to allow this to be done while hiding the considerable complexity of managing the multiple calculation threads and processing various pole versions and LoadCases.
In the following simple “hello world” type example is presented a script that opens all of the poles selected and displays the pole number in a message box:
The important point to notice is that there are two basic steps.
The PoleReadyForBatchProcessing event will be fired every time that a pole has been loaded, the correct LoadCase has been selected, and that the pole load calculation process has been successfully completed.