Hey everyone!!
Have any of you experienced the same no output when printing with output.print_table. I have tried also the example from the pyrevit documentation and the output window is empty or sometimes not even appearing. I have tried in Revit 2025 and 2026. The pyrevit version is 6.5.3.
This is the example I used:
data = [['row1', 'data', 'data', 80 ],['row2', 'data', 'data', 45 ],]
console.print_table(
table_data=data,
title="Example Table",
columns=["Row Name", "Column 1", "Column 2", "Percentage"],
formats=['', '', '', '{}%'],
last_line_style='color:red;'
)
Is it a bug or I am missing something?
from pyrevit import script
data = [['row1', 'data', 'data', 80], ['row2', 'data', 'data', 45], ]
console = script.get_output()
console.print_table(
table_data=data,
title="Example Table",
columns=["Row Name", "Column 1", "Column 2", "Percentage"],
formats=['', '', '', '{}%'],
last_line_style='color:red;'
)
Assuming that console=script.get_output(), it should work.
Output -
I have noticed that if the script is running with CPython, the .print_table() has no output. Only after removing the #! python3 line the script works. Do you know why it is behaving like this? Is there something I am missing? I would like the script to run on CPython.