Turn off all calculations

Hi there, I would like to turn off all systems calculations in a Revit project. We use other software to make our calculations and this simply gives lots of unnecessary warnings.

I was thinking an approach of getting all elements of a category and try to change the parameter but that will result on changing the system name. I cannot find a way of reaching the Calculations parameter and changing the name from anything to None.

Please advise

Kind regards

Hi @Dinos.Ipiotis
You have to collect all mechanical system type for ducts and/or plumbing system type for piping and use Set parameter value by name from OOTB nodes.
Cheers

Hi @paris,

Thank you very much for your reply! Are you aware of the node that collects system type? I can find the get category which is the duct systems but cannot find a node to collect system type

Kind regards

You can collect the system types with the Element Types node.
You can access the System Type of an element with a GetParameter node or the Get SystemType Properties node.

The MEPover package has a lot of efficient nodes for working with MEP elements.

1 Like

Hi @Dinos.Ipiotis
There are a lot of custom node by you can
try OOTB node “Element Types” and after “All Elements of Type” to get all mechanical and plumbing system type available in the project (under family into Project browser).
Cheers

Or use Genius Loci package from @Alban_de_Chasteigner

If you want to get all system type used in the project you can use Category node from OOTB nodes and after gets parameter value by name with type.
Cheer

Good morning everybody and thank you for your help in this!

I am trying to get Parameter Value By Name but I receive the following

Hi Dinos,
Bypass the e.Name code block with a wire directly from All elements of Type to element in the Element.GetParameterValueByName node

Hi @Marcel_Rijsmus and thank you for your reply ! I tried this already and the return I get is just values of 0 and 1. I would like to turn all Calculations to None. I presume that I should change all these values to 0 to reflect None, not sure though…

Kind regards

Yes, o = no and 1 = yes.
You can also try this node
image

Hi @Dinos.Ipiotis

here you go

Hi @paris,

Isn’t this going to change the System Name? I am trying to reach the Calculations parameter within the system and change it to None (for example some of them have the Calculations set to Flow Only)

@Marcel_Rijsmus I presume this is in the Springs package. Even though I downloaded it I cannot find it. Can you provide the location please?

Thank you again guys for your support!

Kind regards

Hi Dinos, in Dynamo 2.5 you can find it here.

Hello

a Python solution by setting the CalculationLevel property

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import * 
from Autodesk.Revit.DB.Mechanical import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc = uiapp.ActiveUIDocument

collSystemTyp = FilteredElementCollector(doc).OfClass(MEPSystemType).ToElements()

TransactionManager.Instance.EnsureInTransaction(doc)
for systype in collSystemTyp:
	systype.CalculationLevel = SystemCalculationLevel.None
TransactionManager.Instance.TransactionTaskDone()


OUT = collSystemTyp
1 Like

Hi @Marcel_Rijsmus, ok will hav a look as I have 2.0 in Revit 2019 so will need to upgrade it.

@c.poupin I will have a look into that, I do not have any previous experience with Python though…

Hi @c.poupin
nice, well done

1 Like

Hi @Marcel_Rijsmus unfortunately 2.0.3 does not have this node and @c.poupin unfortunately I have zero experience on how to handle Python scripts therefore even though it seems the solution I still cannot use it…

I still do not understand why I get these 0 and 1 results when I connect the All Elements of Type to get the parameters…

Hi @Dinos.Ipiotis
O is equivalent to None and so on…
Use Get node to read the system and Set node with number for set your system type…
Cheers

Hi @paris

I am not intending on changing the system type. Within the system properties lies the Calculations parameter. I want to change the values of the calculations parameter from Flow Only to None

So I am accessing the Element Type, then grabbing all elements of Type. If I access the parameter with the codeblock e.Name at least I can see my Piping Systems. I cannot find the node to get the Parameters within the Piping Systems to choose the calculations and replace the whatever string with “None”. This would eliminate calculations on all systems automatically without me having to right click each system and choose None in the Calculations parameter.

 -1 -> All
  0 -> None
  1 -> Flow Only
  4 -> Performance

Many Revit properties using built-in selections use integer values rather than strings. You just need to use SetParameterValue to set the all the systems to 0.