First time Dynamo user and poster. I love that there is a building coder community out there that I was completely unaware of until recently.
I’m trying to finish a Python script that will batch remove/delete parameters from a family at the project view. This is based on this @awilliams useful post here where she creates new family types from the project view.
The Orchid Parameter.Delete node will delete parameters from the project view but will crash if passed a Built-In Parameter. I wanted to create a node that will delete a list of parameters from a family document but will also catch and pass over any Built-In Parameters that will throw an error.
My attempt at a script here accepts the family document and parameter list inputs, but ultimately no parameters are deleted. The error log message populates in the output, so I know at least the program entered the Transaction loops.
TLDR, my main questions are:
• Am I correct in assuming that this method should remove parameters? (doc.FamilyManager.RemoveParameter§)
When I isolate this I get a Type Error:’ expected FamilyParameter, got Parameter’
Looking at the RevitAPI, this seems like the only method that will remove a parameter. The Orchid Parameter.Delete Node could handle deleting parameters collected from nodes, so I would think the node somehow casts the parameter objects to familyparameter objects that the RemoveParameter method will accept.
• Am I going about this in the wrong way? Should I focus on just trying to filter out the Built-In parameters before passing it to the Parameter.Delete node?
On previous attempts I found that using the Parameter.GetbuiltInParameterName node with a BoolMask did not catch all the built-in parameters in my test families.
Any tips appreciated thank you!