Hi, nice to see you on my page. If you are looking for tools that will help you in the daily work of an architect, engineer or designer, you have come to the right place. Below are the latest entries. If you are looking for something specific, you can do so using the search engine or post categories. If you want to know more about me, please visit the "about me" tab. Have you used my solutions? You can return the favour by buy me a virtual coffee using the "Buy me a coffe" button
Hi, nice to see you on my page. If you are looking for tools that will help you in the daily work of an architect, engineer or designer, you have come to the right place. Below are the latest entries. If you are looking for something specific, you can do so using the search engine or post categories. If you want to know more about me, please visit the "about me" tab. Have you used my solutions? You can return the favour by buy me a virtual coffee using the "Buy me a coffe" button
Thanks to this function, the selection of diffusers from my addin will no longer be a painful process. You can adjust the program to your needs and preferences. You can see more in my video linked below.
The program allows you to set your own preferences for the selection of diffusers in Revit. Based on your settings, you can then place items directly into the model. When will you use it?
You select ventilation devices such as diffusers
Instruction how to install my extension you can find here.
How program work
I describe the program in more detail in my video. Here I will only post basic information about the functions included in the calculator.
Air terminal calculator settings
Using this function, you can add or remove a preference for the selection of a given air terminal. The program contains separate preferences for the supply and return systems. A detailed description of entering your own preferences can be found in the video below.
Air terminal calculator (supply lub return)
When we enter our own preferences, we will be able to fully use the calculator. Just select the devices you are interested in and enter the air flow. The program will return suggested devices based on our settings.
Film with program use
Source code – Revit air calculator
Below is the code for one of the functions (Air terminal calculator(supply)). For more please visit mine GitHub, where new versions of the overlay will appear on a regular basis.
Python
Copyright(C)2023 Paweł Kińczyk## Importsfrom Autodesk.Revit.UI.Selection import*from Autodesk.Revit.DB import*from pyrevit import forms, scriptfrom rpw import revitimport jsonimport osdoc = revit.docuidoc = revit.uidocclassCustomISelectionFilter(ISelectionFilter):def__init__(self,nom_categorie):self.nom_categorie = nom_categoriedefAllowElement(self,e):if e.Category.Name inself.nom_categorie:# if self.nom_categorie.Contains(e.Category.Name):# if e.Category.Name == self.nom_categorie:returnTrueelse:returnFalsedefAllowReference(self,ref,point):returnTruedefpick_objects(title="Pick",filter=""):with forms.WarningBar(title=title):return uidoc.Selection.PickObjects(ObjectType.Element,CustomISelectionFilter(filter))defopen_json(name_of_file="",open_method="r"):withopen(name_of_file, open_method)as file: data = json.load(file)return data# Pick air terminaltry: air_terminal =pick_objects(title="Pick supply air terminal",filter="Air Terminals")except: forms.alert(title="Program Error",msg="You didn't pick any air terminal",exitscript=True)# Write air flowtry: air_flow = forms.ask_for_string(prompt="Write air supply",title="Air terminal air flow") air_flow =int(air_flow)except: forms.alert(title="Program Error",msg="You didn't write anything",exitscript=True)# Get air terminal sizesos.chdir(os.path.dirname(os.path.abspath(__file__)))try: dqj_list =open_json("air_terminals_supply_settings.json","r")except: forms.alert(title="Program Error",msg="Didn't find settings",exitscript=True)# Search for prefer familycorrect_dqj =[]for dqj in dqj_list: dqj_min =int(dqj[0][0:4:]) dqj_max =int(dqj[0][5:9:])if air_flow > dqj_min and air_flow < dqj_max: air_flow_avaible =("{}-{}".format(dqj_min, dqj_max)) new_dqj =tuple([air_flow_avaible])+tuple(dqj[1]) correct_dqj.append(new_dqj)try: selected_dqj = forms.SelectFromList.show( correct_dqj,title="Select air terminal which you want to pick",multiselect=False,button_name='Select DQJ',width=800) selected_dqj_size = selected_dqj[1]except: forms.alert(title="Program Error",msg="You didn't pick any type",exitscript=True)transaction =Transaction(doc,'Air terminal calculator - PYLAB')transaction.Start()# Change to new typetry:for element in air_terminal: element = doc.GetElement(element)ifisinstance(element, FamilyInstance): family_instance = elementelse: family_instance =None types = family_instance.Symbol.GetSimilarTypes()for i in types:if selected_dqj_size in Element.Name.GetValue(doc.GetElement(i)): element.ChangeTypeId(i)exceptExceptionas e: forms.alert(title="Program Error",msg=e,exitscript=True)transaction.Commit()
Please report any irregularities in the operation of the program that occur during use on my social accounts or account GitHub.