Create view sets with Data Shapes

Hello everybody! So I have managed to create a script that exports selected sheets where I use the Data Shapes nodes to create a nice UI for the selection. It works perfectly.

I would like to improve the script by making it possible to be able to choose a view set from the UI as well. I know how to create a view set separately but I don’t know how to combine in it with the script for the UI.

With other words, this is how I would like the UI to look like (if possible).

If I don’t choose a view set, it should pick the ones I have selected above as the output.
If I pick a view set, it should select the views in that set as the output instead of the output from the list above (which is empty). You with me? :slight_smile: It’s the same concepts as when you are printing inside Revit; choose view set or select the views manually :slight_smile:

All advice is appreciated! :smiley:

Update:

So I managed to solve the part that lets me select a view set in the UI:

I’m stuck with the part that chooses the output.
If I select views from the list, it should take that as the output.
If I instead choose to select a view set and leave the list above empty, it should take the views from that view set as the output.

So I’m guessing that I need to create an if condition that checks if the list of selected views is empty.
If it’s empty → Select the views from the view set as the output
If it’s not empty → Select that list of views as the ouput.

I tried two different nodes that returns the views from the view set and I can’t figure out how to make it work. One of them can’t read a string and the other one just returns “null” :frowning:

I would be really grateful I someone could help me out with this

Hi @didekalsan !

Try using the node ViewSheetSet By Name before “Get Views from View Set”. I also recommend using the ScopeIf node from Clockwork instead of the if node that you are using.

1 Like

It works! Thank you for the help

Hi didekalsan,

While trying to create something very similiar to what your have done,
I found this old post of yours.
(I was only thinking to make an option to publish by View Set though)

could you please share what is in the “View Sheet Sets” (IN[0] + - OUT) Node?

It would be greatly appreciated!