Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 06:52:10 +0000



Post From: ASCIL: Find all chart numbers in a Chartbook

[2024-01-05 01:10:06]
User900285 - Posts: 94
Hello,

Sorry for bringing back an old post but I determined that there is something relevant worth bringing up here.

I have determined that sc.GetHighestChartNumberUsedInChartBook() is not a reliable way to obtain the number of charts in a chartbook. What I have seen is that with some chartbooks if a chart is removed, sometimes a chart number can be missing. For example I have a chartbook with 5 charts in it and the highest chart number is #6 and chart #2 is missing.

I have 5 charts total and if I iterated over the number of charts obtained from the sc.GetHighestChartNumberUsedInChartBook() function, it would cause an extra iteration which could cause undefined behavior where an invalid chart number is passed in to another function.

What could solve this is if the chart numbers would automatically adjust themselves whenever a chart is removed from the chartbook.