Quantcast
Channel: Apache OpenOffice Community Forum
Viewing all articles
Browse latest Browse all 1281

Macros and UNO API • Re: Error trying to call a Python function in a script from LO Portable Calc Basic

$
0
0
Thank you ms777, that statement was before I had translated everything from VBA to LO Basic, now that I have it does get faster with fewer points. Also, before the translation each update took a few seconds, now it isn't nearly as bad, if I got to a point where it was as fast with all 169 points as it is now reducing the points to 11, I'd be more than happy.

ChatGPT did suggest switching recalculation, but it didn't help. I have also replaced cell by cell access with array access where possible, there are still a handful of individual cells that I read once per update, within the calculation loop there are no additional accesses to the spreadsheet and at the end of the calculations I just write one big array to the range that contains all the plot data.

I wasn't aware of APSO, does it make it easier to access the Python functions from the Basic code?

Please see attached the last version of the calc file before I started trying the Python thing. For testing, I reduced the number of points to 63. The full update happens when you change any of the component values on the left. Note that just above the graph there are three buttons that only update one of the traces and that goes much faster, even though there's also access to individual cells just before the calculation. Again, if I could get the full update to be as fast as that one, I'd be more than happy.

Many thanks for your help!

Cheers,

Cabirio
Tone Control Modeller vLO-6Beta.ods

Statistics: Posted by Cabirio — Sat Dec 21, 2024 10:23 am



Viewing all articles
Browse latest Browse all 1281

Trending Articles