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. 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:
add shared parameters to multiple families (without opening them)
apply a formula for those parameters
save those families and load them back in the project
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.
If anyone has an idea on what’s going wrong, I’ll be infinitly gratefull
Bonus question, which node can I use to load the families back in the project?
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
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
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: