I have been asked by someone in the office to produce a script that would allow him to add a number of parameters (from a shared parameter .txt file) to a Revit family in one go (I believe he is updating our Revit Family Library, so will have a lot to do).
I have seen similar posts but they all seem to be adding the shared parameters into a project and not a family.
I am still relatively new to Dynamo so I apologise in advance if I am not up to scratch.
If anyone could point me in the correct direction or shed any light on the topic it would be much appreciated.
I have run the graph and it seems to be encountering a problem. the add.shared parameter node has given me a warning saying that there is a problem with line 33 in the code.
Is there an obvious reason why this is happening? What is that line referring to?
I apologise once again at my lack of Dynamo / Coding knowledge.
Thank you ! it all turned into a blur up until that last post.
I have managed to get it to work (with your help ) when adding a single parameter but unfortunately it still doesnāt want to work when adding more than one.
Obviously just by doing it one parameter at a time will save a large amount of time but if I can fix in to get them working in one process then that would be great.
disclaimer: New to dynamo and probably the worst thing to tackle but duty calls!
I have been trying to follow this dynamo code for the last week and have been unable to get it remotely working. I am on RVT 2017 with dynamo. 1.3.0. I have tried using dynamo by it self, with a family open, with a project open, with a project and family open, or a new family from a template saved in a different location and have been completely stumped.
I am unable to even get it to recognize a folder for some odd reason past the first node.
is this something that need to opened and closed multiple times? as if the nodes need to be switched in a specific order?
I am unable to upload any files other then the screen cap due to being a new user.
The .dyn I am using Adding Shared Parameters to a family (23.2 KB) BulkUpgrade-sharedparameter.dyn
The folder I have the 2 families in (Family1.rfa and Family2.rfa) is called āfami testā and is located on the desktop. The .dyn is being run from the desktop (have tried in MyDocuments, Downloads, even off a server, and no luck)
Is there a specific order that this needs to run in? am completely lost at this point but not giving up that fast as I have over 500 families to add these parameters to! this is an old smaller .txt shared parameter file am testing with. The current one is about 3 times as large.
Iāve been having zero luck with any of the Directory.Contents nodes lately (OOTB and custom). Has something changed?
I was able to get Python to find files for me though:
from System.IO import Directory, SearchOption
dir = IN[0]
searchstring = IN[1]
foundfiles = []
if Directory.Exists(dir):
dirfiles = Directory.GetFiles(dir, ".", SearchOption.AllDirectories)
for file in dirfiles:
if searchstring not in file:
continue
else:
foundfiles.append(file)
OUT = foundfiles
else:
OUT = "Directory does not exist."
Can you tell me what I am doing wrong please? I get Run completed with warnings "One or more of the input types are not matching. Couldnāt find a version of CloseDocument that takes arguments of type (string.bool)