# OkPy - Output Text Window

**URL:** <https://forum.orkestra.online/t/okpy-output-text-window/83>\
**Category:** OkPy\
**Created:** [August 24, 2023, 8:49pm UTC](https://forum.orkestra.online/t/okpy-output-text-window/83 "2023-08-24T20:49:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jblanchard](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@jblanchard](https://forum.orkestra.online/u/jblanchard)\
**Post date:** [August 24, 2023, 8:49pm UTC](https://forum.orkestra.online/t/okpy-output-text-window/83/1 "2023-08-24T20:49:37Z")

</div>

Hi there! I’m running a version of the pyRevit tool to find all revision tags of a selected revision and its standard output is a text window. I’m seeing no way currently to display the printed output of the script being run like there is when running a Dynamo script via Orkestra. Is there a feature I can enable or something I’m missing with OkPy’s current user interface to allow for visibility of the output window without downloading some external libraries or programs?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![m.elayoubi](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.orkestra.online/m.elayoubi/32/12_2.png) [@m.elayoubi](https://forum.orkestra.online/u/m.elayoubi)\
**Post date:** [August 24, 2023, 9:20pm UTC](https://forum.orkestra.online/t/okpy-output-text-window/83/2 "2023-08-24T21:20:26Z")

</div>

Hey there @jblanchard !  
Do you need a specific interaction with the output ? Or do yu just want to visualize the list ?

---

<div class="post-metadata">

**Author:** ![jblanchard](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@jblanchard](https://forum.orkestra.online/u/jblanchard)\
**Post date:** [August 25, 2023, 1:11pm UTC](https://forum.orkestra.online/t/okpy-output-text-window/83/3 "2023-08-25T13:11:11Z")

</div>

Hi @m.elayoubi, my first thought is to display a pop-up window with the output but even just visualizing the printed output in the same way as is possible when running Dynamo Orkestra scripts would reach the same end goal. No need to interact with the output as of yet but let me know if you think it would be desirable to do so!

---

<div class="post-metadata">

**Author:** ![m.elayoubi](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.orkestra.online/m.elayoubi/32/12_2.png) [@m.elayoubi](https://forum.orkestra.online/u/m.elayoubi)\
**Post date:** [August 25, 2023, 1:38pm UTC](https://forum.orkestra.online/t/okpy-output-text-window/83/4 "2023-08-25T13:38:21Z")

</div>

Alright then! There’s a way to do so using Revit’s TaskDialog. Here’s a very basic example showing it in action:

[https://europe1.discourse-cdn.com/flex017/uploads/orkestraonline/original/1X/859124eedc04b46b27c926343d92007708930264.mp4](https://europe1.discourse-cdn.com/flex017/uploads/orkestraonline/original/1X/859124eedc04b46b27c926343d92007708930264.mp4)

This is the code running behind:

```auto
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import TaskDialog

#The current uidoc, doc, uiapp, and app are stored in the following variables
doc = __currentdoc__
app = __app__
uidoc = __uidoc__
uiapp = __uiapp__

#The inputs are stored in the __inputs__ dictionray
#The key for each input can be set through the UI

inputs = __inputs__

#Showing dialog with title and content
TaskDialog.Show("My OkPy Tool", str(len(inputs["selection"])) + " Elements Selected!")

```

The TaskDialog class also offers more customization with the settings of buttons and associated commands : [ApiDocs.co](https://apidocs.co/apps/revit/2023/14095041-907b-835f-a853-8a88895a9339.htm)

We’re working on more advanced outputs that let you click on elements to view them in Revit etc. , but that’s not available yet.

---

<div class="post-metadata">

**Author:** ![jblanchard](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@jblanchard](https://forum.orkestra.online/u/jblanchard)\
**Post date:** [August 25, 2023, 1:39pm UTC](https://forum.orkestra.online/t/okpy-output-text-window/83/5 "2023-08-25T13:39:33Z")

</div>

Got it! That’s a huge help, thank you so much!

---

<div class="post-metadata">

**Author:** ![m.elayoubi](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.orkestra.online/m.elayoubi/32/12_2.png) [@m.elayoubi](https://forum.orkestra.online/u/m.elayoubi)\
**Post date:** [August 25, 2023, 1:40pm UTC](https://forum.orkestra.online/t/okpy-output-text-window/83/6 "2023-08-25T13:40:45Z")

</div>

Awesome ! Sure thing @jblanchard ! 😁
