Adding shared parameters and apply formulas to multiple families

Hello everybody,

I’m new with dynamo and I would greatly appreciate some help to get my first script running properply. I’m aware there are a few similar topics and I have already red most of them without any clue on what’s going wrong here. :sweat_smile: I tried to use Orchid nodes which look very usefull for what I’m trying to achieve.

The idea is to create a simple script allowing me to:

I did a first test using two door families (fam1, fam2). The script creates two parameters, and should place a formula for one of them. For now it executes properly (no error message) but only creates and saves the parameters. It set the formula into the first family but not into the second one. I guess there is something wrong my logic. :face_with_raised_eyebrow:

Result fam1: ok

Result fam2: nok

If anyone has an idea on what’s going wrong, I’ll be infinitly gratefull :slight_smile:
Bonus question, which node can I use to load the families back in the project?

Thank you,
Weli

Btw, I’m using:
-Revit 2019
-Dynamo 2.0.4
-Orchid node 201.4

add_shared_parameter_to_multiple_families.dyn (30.1 KB)

I’ve not taken a proper look at your script yet, but from the sound of it I think you have a laving issue. The node that sets the formula is probably only taking the first item into account and leaving the rest. Try setting that node’s lacing to longest (meaning it will apply the function of the node to every item in the list of the input node).

Also some tips for posting on the forum.
When you post a picture of your script, use the Export workspace as image feature under File. this will export your whole workspace as an image (even if it’s outside of what you can currently see) so you don’t have to worry about making multiple screenshots. Just don’t forget to zoom in so your nodes are readable :wink:
Also it’s generaly a good idea to run your script and show pictures of any error you might get and fold out the data of each node (with the box that becomes visible below a node when you hover over it). This will make it easier for other to see what’s actually going on in your script.

I hope to hear from you if this doesn’t solve the problem :slightly_smiling_face:

2 Likes

I tried to set the formula.setnode on longest and received 2 errors. Then I tried to set the document.close on longest as well and it worked perfectly!

I added some nodes to load back the families in the project and to delete the back-up files. Here’s the result in case someone need to do the same:

Thank you for your usefull answer and tips @d.kuurman !
Weli

2 Likes

Hi there! Could you post a more detailed picture of the second half of your updated script? It would be very much appreciated!

Here it is:


add_shared_parameter_to_multiple_families.dyn (48.0 KB)

1 Like

Super, thanks a ton!

Im facing a pblm .Do we require any packages.PFA

Welcome,

You need to download the package from Orchid

KG Jan Willem

Orchid alone dosent have all the nodes…Could u plz tell me all the packages so i can install

I dont know for sure but I quess this package:

  • Archilab for parameter Types
    -Orchid for the most of the nodes

I don’t know from which package DataStream,Await is but you can use passthrough from ClockWork