Remove Parameters from a Revit Family

rhythm
danedu

#1

@erfajo I have attempted to use the DanEDU package in order to remove parameters from multiple families.

I have looked through a few other threads trying to keep up as to the changes that have been made to your package.

This is the script below, all nodes are from the DanEDU package excluding the Document.BackgroundOpen and Document.Close which are from the Rhythm package.

The script executes successfully however running it again produces the screen shot above, where Dynamo pretty much hangs and says “Run Started…”

However closing and restarting Revit allows me to run the script successfully again, but a second attempt yields the same problem.

From my investigation, it appears that the file is not closing properly hence re-running the script again causes the script to hang. I have tested this by replacing the file in the folder with a different one, and running the script again successfully without restarting Revit.

Does anyone have any thoughts on this? Thanks


Remove parameters from families in a directory
Batch Remove all Families Parameters
#2

Could you please upload one family and the .dyn graph?

The first test I would make is trying to remove a parameter in a current open family, for that you only need the two nodes marked in the figure. If that works, then you can try to see if it is the close node that hangs.

update:
when I test removing a parameter named “@Voltage” in a family, it works…


#3

Thanks for the help,

As requested please find attached family and dyn file.

ME_FuelTank.rfa (288 KB)

Modify Family Parameters.dyn (7.8 KB)

I have attempted to remove parameters Width and Height, on separate runs. The second run leads to the program hanging.

I have confirmed that there is nothing wrong with the remove parameter node as per your suggestion, by opening a family and just running that on the script.

Do you have any suggestions on how I should go about testing the Document Close node? Or Can you try the uploaded script on your side.

Thanks


#4

I worked perfectly, BUT with the updated Rhythm package, not the outdated version you use.

…and please remember that the parameter must exist before it can be removed. “@Phase” didnt exist in your uploaded family. I had to add it first, so it could be removed!


#5

Thanks erfajo, so its just an outdated package then.

Sorry about the confusion I just dropped in the dyn file without saving it, hence “@phase” was still left there from when I was trying out that parameter on a previous family file.

Appreciate the help.


#6

I think it is only the outdated Rhythm package that gives you the problem, but please test it. I dont have the old one anymore so I cant be 100% sure.
However, when I added the updated nodes, then it worked.


#7

Will confirm and reply here. Thanks.


#8

So how can we check if a parameter exists in the document first… say we have a list of parameters we want to remove, but not sure they all exist in the family


#9

and i get this warning on the familydocument.deleteparameter; a sub-transaction can only be active inside an open transaction. But i do use the application.opendocumentfile node before that…so i am opening the file…

Arno


#10

@Arno_De_Lange
please start a new post and refer to this instead of adding a new issue


#11