Is it possible to change the Room Calculation Point for all families in a project?

I have no idea how to go about opening all selected families, changing the “Room Calculation Point” parameter to “True” then loading it back into a project and Overwrite the existing version and its parameter values.

just guessing here but, if you are interested in getting the room an element is in check this:

you can probably skip setting the Room Calculation Point

Sorry this isn’t what I’m looking, thanks anyway.

Orchid package has a bunch of good family editing nodes, or there are plenty of good python examples on here. It does also appear the room calc point param is exposed based on this post.
https://forums.autodesk.com/t5/revit-api-forum/room-calculation-point-parameter/td-p/3924857

I would first save out the family library (basic Revit, no Dynamo involved) to a new folder. This is a good thing to do periodically as it ensures you have a stable version of all families with all parameters to load into the project. Move any which you don’t want to enable the room calculation point for (ie annotation families) into another folder or delete them.

Then write a Dynamo graph to enable the room calculation point for the active family. This will likely entail some Python. Check the API documentation carefully.

Then use Dynamo for Automation to bulk process all of the graphs with the ‘works for a single family’ graph.

Then load the new families in, overwriting the previous version.

2 Likes

This is far from perfect code but it is a start! Will get you all the Family Instances that have the Room Calculation Point turned off :slight_smile:

import clr
clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument

# Collecting all placed Family Instances
collector = FilteredElementCollector(doc).OfClass(FamilyInstance).ToElements()

# Collecting the Family Type from each Instance
familyTypes = [c.Symbol.Family for c in collector]
# Collecting their Room Calculation Point parameter information
roomCalcPoint = [type.LookupParameter('Room Calculation Point').AsInteger() for type in familyTypes]
# Filtering this list with only Family Types that have the 'Room Calculation Point' turned off
famsRoomCalcOff = [type for type, roomCalc in zip(familyTypes, roomCalcPoint) if roomCalc == 0]

OUT = famsRoomCalcOff
4 Likes

Had a play on my flight back to Toronto - This one will remove the need for List.UniqueItems :slight_smile:

import clr
clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument

# Collecting all placed Family Instances
collector = FilteredElementCollector(doc).OfClass(FamilyInstance).ToElements()

# Collecting the Family Type from each Instance
familyTypes = [c.Symbol.Family for c in collector]
# Collecting their Room Calculation Point parameter information
roomCalcPoint = [type.LookupParameter('Room Calculation Point').AsInteger() for type in familyTypes]
# Filtering this list with only Family Types that have the 'Room Calculation Point' turned off
famsRoomCalcOff = [type for type, roomCalc in zip(familyTypes, roomCalcPoint) if roomCalc == 0]
# Get the Element Id for every family in the filtered list
famId = [fam.Id for fam in famsRoomCalcOff]
# Creating a Dictionary for every pairing we have between Element Id's and Families. Because dictionaries have to have a unique key this gives us the ability too collect 'unique items'. 'Set' doesn't work due too the nature of Element Id's
famDict = {key:value for key, value in zip(famId,famsRoomCalcOff)}

OUT = famDict.values()
3 Likes

Hi guys,

Regarding this post. I have tried to find a way to set a bunch of Familys with “Room calculation Point” on. I can understand that I need to open and close every family document. there must be a way to set this easy with Dynamo?

Anders

1 Like

5 Likes

:grinning:

Hi Anders
Have you got this working?
I am trying to run this script on a 2018 model it does not give any errors but does not acvtivate the room calculation point.

Thanks

1 Like

Same here. I have to run it once to make the room calc point parameter selectable, I select it, rn again and it runs with no errors but none of my families room calc points are turned on.

Has anyone managed to run this routine? I need to change the Room Calculation Point for all families in a project.