Тёмный

Adding parameters to Revit families using pyRevit! 

Aussie BIM Guru
Подписаться 48 тыс.
Просмотров 5 тыс.
50% 1

Beast of a workflow today in pyRevit, adding shared parameters in bulk via Excel with all sorts of error handling. Ultimately the best version of this tool I've ever made!
I hope you enjoy the session and learn something new! Feel free to comment any feedback/questions below, or follow my channel if you enjoyed this.
0:00 Intro
2:50 Setup and excel file
7:45 Custom Excel import library
10:30 Script begins
12:16 Get shared parameters
14:17 Text to parameter def
19:45 Get BIPGs
22:28 Text to BIPG
24:37 Add parameters to family (single, test)
37:58 Testing single family
38:35 Get data from Excel instead
47:02 Get family document file paths
51:30 Open/close family documents
55:24 Final process across family documents
1:04:15 Testing multi family
1:08:37 Outro
Learn more about pyRevit at:
www.notion.so/pyRevit-bd907d6...
Software used;
Autodesk Revit 2020: www.autodesk.com/products/rev...
pyRevit: github.com/eirannejad/pyRevit
Notepad ++: notepad-plus-plus.org/downloads/
DaVinci Resolve: www.blackmagicdesign.com/au/p...
OBS: obsproject.com/
Hardware used;
Webcam: support.logitech.com/en_us/pr...
Laptop: www.msi.com/Workstation/WT75-...
Microphone: www.bluemic.com/en-au/product...
#revit #pyrevit #python

Опубликовано:

 

2 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 40   
@piotrchoromanski395
@piotrchoromanski395 6 месяцев назад
Excellent presentation. Learning from you is a real pleasure.
@AussieBIMGuru
@AussieBIMGuru 6 месяцев назад
Thanks, and glad to hear 😀
@JavierOropeza08
@JavierOropeza08 7 месяцев назад
You indeed are the guru, thanks for this. I hope to one day actually watch this because I am ready to implement something like this.
@AussieBIMGuru
@AussieBIMGuru 7 месяцев назад
You're welcome!
@abhishekshinde5378
@abhishekshinde5378 4 месяца назад
This is a very detailed explanation! Appreciate this a lot for sharing with the world
@AussieBIMGuru
@AussieBIMGuru 4 месяца назад
Glad it was helpful!
@abhishekshinde5378
@abhishekshinde5378 4 дня назад
@@AussieBIMGuru I tried running the script, it is reporting Missing Parameters in SP file. I used your github code and tested in 2024. Is SP file need to be defined before running this script? Am I missing something?
@abhishekshinde5378
@abhishekshinde5378 4 дня назад
I was able to resolve this issue by creating an SP File. However, I have Data Validation with Items as a List in my formulas. Revit is not reading it in the formulas. How can I integrate Data Validation(Value List) from Excel to be read inside the Revit Shared Parameters?
@AussieBIMGuru
@AussieBIMGuru 4 дня назад
Excel generally wont pass on its formulae to revit, but i know some builds this can happen in if using openxml nodes. The only way to get around is copy the values over themselves as values I believe. Might be best asked via the forums to get in depth help. One last idea is make sure your formulae are encapsulated by double apostrophes if they are a text value in revit.
@ibrahimantonios
@ibrahimantonios Год назад
Bingo ! Thanks a lot dear
@AussieBIMGuru
@AussieBIMGuru Год назад
Youre welcome!
@debaron270602
@debaron270602 Год назад
Thank you for your work! Is there a way to rename shared parameters (the ones that have similar GUID) using pyrevit?
@AussieBIMGuru
@AussieBIMGuru Год назад
Not technically. I have a video in dynamo where I show how to replace a shared parameter however in families. Generally it is best to avoid renaming parameters unless you give them a new guid as they wont play well together in a project and wont be able to coexist in families in old/new form.
@Jul10CAd
@Jul10CAd Год назад
Thank you very much, I have something in my mind from some time, is it possible to turn on/off, make current, change elements between worksets?, I´ve been looking in pyrevit but can't find something, maybe you could help me in the right direction, thanks in advance.
@AussieBIMGuru
@AussieBIMGuru Год назад
Yes you can do most of this using the WorksetTable class (create, rename, turn on/off worksets). You can set an elements workset using the builtinparameter ELEM_PARTITION_PARAM, then set that to the Id of the desired workset, see reference here: forums.autodesk.com/t5/revit-api-forum/set-element-workset/td-p/7706868
@facelessone86
@facelessone86 11 месяцев назад
Wondering how you would set the parameter formula to 0=0 or 0=1 for Yes/No parameters.
@facelessone86
@facelessone86 11 месяцев назад
I made the dummy list a string a string like "0 = 1" and it worked. I'm guessing things we get from excel may need to be turned into strings in some cases.
@AussieBIMGuru
@AussieBIMGuru 11 месяцев назад
@@facelessone86 yesno values are typically set as Booleans in python but are defined as conditions in revit. So if you fed the formula of 1=1 it would lock it to always true in revit.
@facelessone86
@facelessone86 11 месяцев назад
If you wanted to put a default value when a formula is not provided but wanted it to be blank would you set it to (....,famForm = "")?
@facelessone86
@facelessone86 11 месяцев назад
NVM, I think watching this if you give it nothing it would be fine.
@AussieBIMGuru
@AussieBIMGuru 11 месяцев назад
@@facelessone86 indeed you can leave out default value to get blank. It is an optional argument which has a default value of "" in the form method.
@mariebretaudeau2222
@mariebretaudeau2222 2 месяца назад
Hi! First, thanks for sharing. I don't find the file on GitHub, do you know why? Or did you delete it? :) Thanks again
@AussieBIMGuru
@AussieBIMGuru 2 месяца назад
Youll find my pyrevit tools here: github.com/aussieBIMguru/pyrevit
@rik0904
@rik0904 Год назад
for all of you who want to do it in 2024.BuiltInParameterGroup is now a class ForgeTypeId you can find list of them in GroupTypeId class.
@rik0904
@rik0904 Год назад
I what to put a link to 'changes of revit api' but yt don't like me so no link
@AussieBIMGuru
@AussieBIMGuru Год назад
Thanks! Yes its a pretty big change to the workflow/class.
@rik0904
@rik0904 Год назад
@@AussieBIMGuru about shared parameterfile there is a new column caled HIDEWHENNOVALUE(or maybe i just missed it some how for all this years), but it don't seems to do much form me. Did you experiment with it ?
@AussieBIMGuru
@AussieBIMGuru Год назад
@@rik0904 i havent used it before but i believe it hides the parameter at project level if inpopulated in an element. I generally avoid hidden parameters as they confuse users.
@rik0904
@rik0904 Год назад
@@AussieBIMGuru toughy that to but all parameters still appear so Im confuse about it.
@facelessone86
@facelessone86 11 месяцев назад
I've gotten to the point where we print(dat) around 41 min and when I run the script Revit just hangs.
@facelessone86
@facelessone86 11 месяцев назад
NVM, just noticed that the file path had a "." when it should of had a "\". I think I missed it because I placed the file in the scripts folder structure and there are already a bunch of periods in there. Sorry for posting so much, just trying understand all of this as I go.
@AussieBIMGuru
@AussieBIMGuru 11 месяцев назад
@@facelessone86 not a problem, glad you solved it!
@orans8108
@orans8108 9 месяцев назад
Im getting: Not found in shared parameters file:... and then None like a couple of times. Tested it with many shared parameters. Any idea what im doing wrong?
@AussieBIMGuru
@AussieBIMGuru 9 месяцев назад
Sounds like you're either not connected to the shared parameters file or it's not in there by matching name. Case sensitivity etc. is important.
@orans8108
@orans8108 8 месяцев назад
How to connect to te shared parameter file? When i open my family i can set shared parameters through my shared parameter file. Im using revit 2023 btw.@@AussieBIMGuru
@facelessone86
@facelessone86 5 месяцев назад
This may be that it is ready rows that appear to be empty in Excel. I have only two rows but it is reading three. The third returns 'None' when I print the target_params. There may be a way in excel to make them truly empty, but I think I'm just going to add something to remove rows where target_Params == None.
@pawlak0007
@pawlak0007 Год назад
Pleas next time zoom the code, a little bit.
@AussieBIMGuru
@AussieBIMGuru Год назад
Yes code zoom aspect is challenging as zooming too close makes the lines not fit on screen. Will do my best in future...
@AndreaGhensi
@AndreaGhensi 9 месяцев назад
Let me guess, did you learn python using dynamo? Do you know that there's more than lists in python? Your code would be much simpler if you use dictionaries to aggregate the info of a parameter (an excel row) Also, pyrevit ships with xlrd that lets you read excel files without the need to have Excel installed, a Transaction class that can be used as context manager (with Transaction(): ...) and the open_doc function as handy wrappers to the revit API
@AussieBIMGuru
@AussieBIMGuru 9 месяцев назад
I did originally and am learning C at the moment. Whilst I'm aware of dictionaries and use them from time to time I prefer to manage lists for more legible code but I appreciate in this case they likely could have made for simpler code. I'm much less familiar with them though so I'm definitely biased due to my experience haha... I've used xlrd in pyrevit more recently in learning it, thanks for the tips though! These days I use the with transaction statement generally, although I sometimes use dynamo friendly code that depends less on pyrevit with this workflow as I tend to do some family work in Dynamo also.
Далее
Unlocking the power of pyRevit! (Webinar)
49:38
Просмотров 8 тыс.
Introducing Python in Excel
19:01
Просмотров 1,5 млн
Mastering Revit Shared Parameters
33:22
Просмотров 48 тыс.
Dynamo Shorts - Ep009 - Export Sorted Data To Excel
18:04
Mastering Revit Parameters
10:52
Просмотров 39 тыс.
How to Use pyRevit Toggles | Revit
10:43
Просмотров 6 тыс.
Making a pyRevit toolbar!
22:17
Просмотров 15 тыс.
pyRevit - The Ultimate Guide (Live) w/Ehsan
1:08:21
Просмотров 55 тыс.