Set parameter of batch of families in directory

Hi,

I am trying to change the value of built in parameters such as (Always vertical, Work Plane Based) of a batch of families in a directory.

Following is my graph

2nd attempt:

Getting Error:
**Warning: Element.SetParameterByName operation failed. **
Attempt to modify the model outside of transaction.

How to fix this issue or achieve the goal? Any help will be appreciated. Thank you!

Check this and should get you going in the right direction.

2 Likes

As mentioned via Twitter dm the issue here I think is you’re using nodes which attempt to deal with elements at project level and not documents in background. Orchid might help here, or Python if you’re savvy with it.

1 Like

Don’t want to use python node.

Can you help me find the solution. It should be easy but can’t find the problem

It’s not that easy, if it was then surely my tips would be followable easily ;). Look into Orchid as a starting point, if I find time I’ll come back to this one.

Then chances are you don’t want to find a solution. Your request is fairly complicated and most likely will require some python to achieve.

You may find just the right combo of nodes, but it’s probably going to be messy. As @GavinCrump said, Orchid will be your best bet probably, but that has its own limitations too.

1 Like

@SeanP , I am not too good with Python in dynamo so I try to stick with nodes but anyhelp in python will also be appreciated.

Tried another approach but in this case everything works and it shows the parameter is changing in dynamo but when I open the file it is still the same.

After looking around the Revit API Docs it looks like these parameters are not accessible in the family editor environment via the Revit API (which document background open/close relies on). They can be read at project level but aren’t available as parameters to the family manager class.

I believe these parameters can only be set to a family object at the project level, see below.

1 Like

Thank you for your response. I actually want to do this for a batch of families in a directory. I have created 2 other versions

  1. For 1 famiy - works ok
  2. For familes in project - works ok
  3. For families in directory - Stuck here!

Yes the same experience here :wink: