Statistics Data Example#

Download the StatisticsExample.slmd for this example.

Code Snippet: Statistics Data#
from Slide2Scripting.Slide2Interpreter import Slide2Interpreter

import os, inspect

current_dir = os.path.dirname(os.path.abspath(inspect.getfile(lambda: None)))
Slide2Interpreter.startApplication(60075)

slide2_interpreter = Slide2Interpreter(60075)
model = slide2_interpreter.openFile(rf"{current_dir}\example_models\StatisticsExample.slmd")

stats = model.getStatisticsData()
variables = stats.listStatisticsVariables()
print(len(variables))

model.close(saveChanges=False)
slide2_interpreter.closeApplication()

Output#

4