Using Datashapes to select what worksets get pushed into a central model

I am using Rhythm to create worksets for projects I setup. I am attempting to use data-shapes to create a radio button input to select what type of model I am creating, whether it is for combined or separate MEP model(s). I’m not sure how to connect the various options to the radio buttons, each radio button should have a different set of worksets to generate. I’m sure this is simple, I’d appreciate if someone could nudge me in the right direction. Here is what I have so far.

Right now you are inputting “Discipline Model” as your InputName and your Keys - “InputName” is meant to be the “title” of your radio button inputs so in your case it might be something like “Type of Model”. The keys and values input work the same as a Dictionary. You will need the same amount of Keys as you do Values, but the value item can be a list like so (you will not need to use String Split this way as well):

Let me know if it would be more helpful to understand with seeing the example with nodes rather than the Code Block :slight_smile:

1 Like

Another method I’ve used for this is to save the worksets to a csv or xls file which you can then read natively. Use a Datashapes radio button as indicated to allow users to select the type of model, and then have that fill out the file or sheet name.

2 Likes

I’ve changed my mind from radio buttons to a list.

I’m getting closer, my problem is that no matter what options I choose, all of the worksets in the list are being created.

You want to have your Workset.Create node after the inputs are picked, right now you are having it create them and then picking the input.

3 Likes

Thank you so much!

1 Like

Hate to revive and old thread, but having an issue with similar. The script seems to be running correctly (as per the watch node at the end) but the worksets arn’t being created within the model.

Nevermind, you seem to require a List.Flatten between the watch and Workset.create