Dimensions window of Print?

How can i set the dimensions of the window Print?

total_length = total_length + int(length) # forgot to convert to int earlier

print("Cable Tray {}: Length = {} mm".format(id,length))

print(“Total length for Cable Trays : {} mm”.format(total_length))

  1. first get the output window
from pyrevit import script
output = script.get_output()
  1. then set its width or height with set_height(height) or set_width(width)
    pyrevit.output — pyRevit 4.8.8 documentation

if i point out this value, I get an error.

from pyrevit import revit, DB
from pyrevit import script

output = script.get_output()

doc = revit.doc

Syntax is

set_height() needs to be called from somewhere. In this instance, it needs to be called from the output you grabbed

I suggest you look in pyrevit documentation https://pyrevit.readthedocs.io/en/latest/pyrevit/ or do a search for set.height( thanks to notepad++, and you will find some examples on how to use it