View set UI node for use in Play

Is there a View Set user interface node for use in dynamo play?

Just use data shapes. This allows user interface for dynamo player.

I have datashapes, but it doesn’t seem to include an interface for selecting View Sets

Try this script. This should do what you are after…

The Script:


ViewSheetSetSelector_DataShapes.dyn (14.0 KB)

Userform:

You can now select via checkboxes which ViewSheetSets you want to use. You could alternatively use the DropDownData node to have a dropdown instead if only one is required.

Cheers,
Dan

2 Likes

Thanks - it didn’t work though - user interface doesn’t appear ?

@Phillip_Sheridan

Ok, quickly tested this with the latest Data-Shapes package as I was using an old version. The issue is with the two inputs highlighted below…

They require a value in this build even if they are null. If you plug in null they should run…

@Mostafa_El_Ayoubi, I had a quick look under the hood and updated these two inputs from…

: string = null
to
: var = null

also shown below. This get’s the UI node working nicely. Not sure why it doesn’t like the string = null though. :confused:

On another note, liking the updates. Tres Cool! :wink:

@Phillip_Sheridan, hope this solves your issue. Please mark as resolved if it has.

Cheers,
Dan

@Daniel_Woodcock1 - The input definitions do not need to be changed, in fact they shouldn’t as they check for the correct data type. The issue here is the following (standard Dynamo behaviour):

  • A node gets updated and the new version has more inputs than its previous version
  • You open a graph that already contains an older version of that node with less inputs
  • Dynamo adds the new inputs to the node in your graph but “blocks” the default values of those inputs
    To resolve this simply right-click on the inputs and you will be presented with an option to use the default value for the input.
    Any newly placed instances of the node will immediately use the default values of the new inputs without having to “unblock” the new inputs.
4 Likes

Ah, I didn’t know this as I’ve never run into this issue before (I use the same method as @Mostafa_El_Ayoubi for null inputs in my own packages so was confused why this wasn’t working). Cheers for the explanation @Andreas_Dieckmann. :wink:

Unfortunately, this is indeed a really easy to miss feature in Dynamo. And I don’t think it’s documented anywhere. :frowning:

1 Like

Haha! Yeah, I always assumed it was automatically handled by dynamo. It’s really useful to know though, so thanks for the info. I’ll definitely be keeping an eye out for this when I’m updating/modifying packages. :blush:

Thats great guys - thanks. One last thing though - when I plug that output into the get views from viewset node it returns a null value even whereas the result from the ordinary non UI select viewset node works fine. Any ideas ?

Have you verified that that node can process a list of viewsets?

There’s only one item in the list and it works in a different graph with this node feeding it.

@Phillip_Sheridan, could you post your .dyn file so we can have a look?

Sorry to be picky, but in your first screenshot you are feeding a list with a single item into the node, whereas in your second screenshot you are feeding in a singleton. With Pyton-based nodes, this can make a huge difference. So again, can you verify that the node accepts a list of viewsets as its input?

Andreas - Yes I know - the second one is one I was comparing it with, that works but doesn’t do inputs from the User Interface nodes. It appears that the “get views from view set node” doesn’t take lists, but I don’t know how to verify that ? Also I don’t know how to convert a list with a single item to just a single ‘non list’ item.

BS 1192 Batch Plot Rename With UI VIEWSET 4.dyn (40.8 KB)

The aim of the graph is to rename a batch of pdfs that have just been printed. Ideally I wouldn’t bother with the user input and just re-use the viewset that had just been used to print the batch.

1 Like

Yes, my suspicion was that it doesn’t work with lists. You could check that by looking at the Python code in the node. Since your passing data from a ListView, you would potentially have several view sets selected, so you need to teach that node to accept lists. You can either do that by using List.Map or by setting the list level of the input to @L1 (I think).
Converting a list with a single item can be done using List.FirstItem btw.

Andreas/Daniel
Brilliant thanks for all your help - the List.FirstItem node fixed the last problem.

1 Like

I’d mark this topic as resoved if I could find the button to do this !

1 Like

hit the … button below the post with the solution to reveal more options and then use the checkbox :slight_smile:

1 Like