Display list in Dialogbox


#1

Anyone has tried showing a list(as dialog box) in UI? I am trying to make a UI which will display a list to user in the form of dialog box and ask user if they want to proceed with the script or cancel?


#2

Have you searched the forum? Similar topics have been discussed before.

I think you will find this one the most helpful.


#3

Yes, I did. I found very useful information to display text/strings. But I am trying to display list/array which has some strings and some numbers.


#4

right now I am using Datashape TextNode input node to display output like below snip. But I think there would be a smarter way. Because I have to convert each object into string and then join the strings to make it work.

image


#5

String.join with a return as the separating character is how I have done displays like this before.


#6

that’s how I’m joining the strings, but I am curious to know if there is a different node to display list/array other than TextNote.


#7

Either displaying 1 list or a popup for every item in the list is the only two methods I know of. And a popup for each is very painful as a user experience.

I would use either winforms, ctypes, or the Revit UI to throw the popup instead of the UI++ nodes. Search the forum for “calling ctypes” and there is a good post I created there.