Unable to add multiple SP to multiple families



I’ve been trying to add multiple shared parameters into multiple families and have been unable to incorporate the DanEDU nodes I found. I have attached an image showing that I’m not even able to find the test families using the node, but when I use the “Directory.Contents+” node I can. I’m assuming not being able to use his initial node is causing problems farther down the script because even with the Directory.Contents node it still isn’t Adding the parameters from the SP file.
BulkUpgrade-sharedParameter.dyn (20.5 KB)


there is a difference between


use the latter


Thank you for replying so soon, but I still was unable to get it to work. I tried changing the text and it didn’t seem to have any effect. I have made sure that the files are not “read only” as well. Why is the other node able to find the families but your node is not?


Try unistalling DanEdu package and reinstall it back again.


Thank you Kulkul for that recommendation but it did not work either… I did notice this warning I get when I start up Dynamo, could it be impacting his nodes? Also, I only have Dynamo version 1.3.2 installed


Uninstall all the custom packages and install first DanEdu package and then RHYTHM.


So I removed everything and then reinstalled the two packages and now I’m receiving some feedback from the node. I also no longer have the “System.IO.FileLoadException” error. Also, I probably should have mentioned this earlier but I’m using Revit 2016


I dont have Revit 2016, and in my test using Revit 2018 I can add shared parameters. I am afraid I cannot assist you with better advices than those you have got.

Just one hint… try to rebuild you graph from scratch. Not that this should have any influence but I have stumbled upon this problem earlier and that solved it.


Gave it a shot but it did not work. I’ll let you know if it works when I upgrade to Revit 2018 in the coming weeks, thanks!


@anelson It works for me in Revit 2016 :slight_smile:


I guess that confirms that it has something to do with my settings… Thank you for checking on that!


I’m trying to run your code line by line from the console but I seem to be running into some issues. Shouldn’t when I run this code have some lines that return “found” instead of always being “not found” once it finds your assemblies? At first I thought maybe the IronPython console didn’t have permission due to our security but now I’m wondering if it is not allowing it to return information?


@erfajo I just tested the node as well and it appears that introducing the Python Script Reader|DanEDU node may be the culprit somehow… :thinking:


hi @awilliams
You have an old DanEDU package, please reinstall it?

I had some trouble with two or three builds. I had moved the py content to a root folder in the package (lib), but that was not allowed. When I did that the content was moved to the “extra” folder without any warning. That totally destroyed the “Python Script Reader” node, and I tried as fast as I could to rebuild… unfortunately it ain’t possible to remove builds that are failing, everything is stored like forever on dynamo package web service… you cant do anything. that is really shitty, but that is how we all are restricted. I am really considering to move my package outside the site, because of those odd and meaningless restrictions.

Please check if your line 13 is like mine, since line 13 should not give an error like you get it!?

from System.IO import Directory, File, FileAttributes, Path, SearchOption

…and please verify that the file “DanEDUicon.dll” exist in
[user] \AppData\Roaming\Dynamo\Content\packages\DanEDU Dynamo\bin


Seems to still not be returning anything. What do you have your permissions set as? Allow all, including special permissions?


why do you have a yellow background? that normally indicates that you are working inside a custom node. If that is the case, then it wont work. Please work inside a normal workspace.


I reinstalled the package to the most current version - sorry about that. I still get the same error regarding line 13 as well. The “DanEDUicon.dll” file does exist in that location. Its strange to me that the exact script works when read from file with OOTB nodes because nothing is different about line 13 :thinking:


Amy, did you also remove the nodes, close/open dyn file again, and put them in again?

Then this is very strange… reading the path to the binary file is a must, other than that is it the same code as the one that has been working in earlier packages.

I have in the latest packages used a method where I preloaded the path in the top of the python code, but that has given me the problem that the error message (lines) was out of sync. So I have re-coded that part and that will be updated for next update. That should however not have any influence on the functions as such. My own unit-tests didn’t fail with the package available online now, and it doesn’t fail with the coming version.

I think the problem must be something with the restriction that any folder has to be inside one of the three accepted folders in the root of a package or more likely that the binary file isn’t loaded properly.

Can you get the location for the binary file written as output?

binaryPath.dyn (2.2 KB)


@erfajo I wasn’t sure if I removed, closed, opened and replaced in that order so I just tried and have the same results. I ran the binaryPath script and these are my results:

[0] C:\Program files (x86)\IronPython 2.7\Lib
[1] C:\Users\AWilliams\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\DanEDU Dynamo\extra\lib
[2] .

It seems as though the script is changed somehow when output from the Python Script Reader node, because the script works using File.ReadFromFile in place of that node. And when I copy and paste the output of that node and try running it I get the same error about line 13. But they appear to be the same from what I can tell. :face_with_raised_eyebrow:

EDIT: Ha I was only looking at line 13, d’oh. The differences are lines 0-3 where the paths are imported which are the same paths above, I understand the relation to the binary file better now. I don’t understand why that causes it to fail though.


Thanks Amy,

So I can be sure that the binary file is read. I have only made that “icon” file for the purpose of running a binary file so I could get the path to my package.
In the next version have I changed it so the preloaded path goes into the individual files with the code revealed in the former post. So those nine lines of code is in the files where it is needed. Doing that means that the error message will be correct according to lines (yes you need to withdraw four lines in the error message to find the proper line of error at the moment).

The movement towards py files outside the dynamo node is done because the built-in editor is insufficient. I use an external IDE for coding (I use Visual studio code), and for giving me a real OOP environment. At the moment is it only Clean, Replace and some other basic stuff turned into OOP. Nodes that need e.g. cleaning or flatten recursively find those definitions in a “util” module in the lib folder.
The family documents are the same code as it has been since the first version more or less.

The error in line 13 is a System error, meaning your dotNet environment. If that fails many other things should also fail. Loading those modules has always been the same since the birth of the node, that is the core of the node in Directory.ContentsAll node.

Since the node works for @kulkul (also in Revit 2016) am I confused. I know that both of you know what is going on, so where is the needle in the haystack?

I really can’t understand why that doesn’t work.