Dynamo Output

Hello

as the title suggests, i have some data that i need to be the output of a script.
after search on the forum, i have only found this script:

import clr

clr.AddReference(“System.Windows.Forms”)
from System.Windows.Forms import Form,Label

def popup(text):
form = Form()
form.Width = 300
form.Height = 300
label = Label()
label.Text = text
label.Width = 300
label.Height = 150
label.Parent = form
form.ShowDialog()

Text=“\n”.join(IN[0])
popup(Text)

but the output is not very presentable, is there any node or package i can use for this purpose?
the output is a series of texts (if that matters)

Are you looking to inform the user something has happened (one time event with no record), or are you looking for an artifact which persists after the graph has executed (a file they could open up a second time?).

Are you running in Dynamo every time, or sometimes in Player?

Is this in a Revit context, Civil 3D context, FormIt context, Advance Steel Context, Sandbox context, or something else?

1 Like

so sorry, seems my question was very broad.

the script is a series of QA/QC checks, after the script runs, it outputs:
Number of Views, Number of Sheets, Number of warnings, …etc.

I’m running dynamo every time, not the player.
and it’s done in Revit.

hope that clarifies it, really appreciate your response.

And you just want to inform the user how many views, sheets, warnings, etc.? Or do you want to be able to go back and reference this data again later?

If the former, you can utilize CTypes, WinForms, a Revit dialog box, or pop open a web page saved to the temp directory which can be formatted any way you might like.

If the later, I recommend storing the data in a meaningful location (ie: in the Revit file, or an external file like a CSV, JSON or other data type) as well as a document (web page, word document, PDF, whatever) which can be opened again later. The benefit of the external file is that you could utilize say PowerBI to display the data and get updates over time.

You might be able to achieve what you want with Gavin’s Crumple package.

He has kindly made it open Source so you can modify the python with the parameters you are trying to display easily.

image

# Made by Gavin Crump
# Free for use
# BIM Guru, www.bimguru.com.au

# Boilerplate text
import clr
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *

# Preparing input from dynamo to revit
title = IN[0]
body  = IN[1]
passt = IN[2]

# Build and show the task dialogue
msg = TaskDialog.Show(title, body,
TaskDialogCommonButtons.Ok|TaskDialogCommonButtons.Cancel,TaskDialogResult.Cancel)

# Check if passing the result
if msg == TaskDialogResult.Ok:
	OUT = passt
else:
	OUT = None