Revit Dynamo Python Simple Dialog

 import clr

clr.AddReference("System.Windows.Forms") ##https://forum.dynamobim.com/t/reporting-to-user-at-the-end-of-dynamo-player-script/37421/6 from System.Windows.Forms import Form,Label,Button,FormBorderStyle,FormStartPosition def popup(text): form = Form() form.Width = 300 #Width form.Height = 200 ##Height form.Text = "Script Result:" ##Form Title form.FormBorderStyle = FormBorderStyle.FixedDialog ##Remove the maximize box. form.MaximizeBox = False ## Set the MinimizeBox to false to remove the minimize box. form.MinimizeBox = False ## Set the accept button of the form to button1. form.StartPosition = FormStartPosition.CenterScreen label = Label() label.Parent = form label.Text = text label.Width = form.Width - 20 label.Height = form.Height - 20 label.Left=10 label.Top=form.Height-label.Height - 10 form.ShowDialog() Text="".join(IN[0]) popup(Text)

Comments

Popular posts from this blog

Revit area plans adding new types and references (Gross and rentable)

Powerpoint countdown and current time in slides VBA

Revit Python in Visual Studio Revit Stubs 2022 for Python Revit Intellisense