How to use IUpdater in Revit API to improve your Revit

  Рет қаралды 1,780

Erik Frits

Erik Frits

Күн бұрын

Пікірлер: 24
@danielswearson1360
@danielswearson1360 7 ай бұрын
Excellent work, Erik. Keep it up.
@ErikFrits
@ErikFrits 7 ай бұрын
Thank you a lot Daniel!
@RevitExperiments
@RevitExperiments 7 ай бұрын
Hi Erik! In my experience I've done this exactly for the top and bottom edges' elevations of the windows that you mentioned. However I found a noticeable lag using it in real projects - it made working in Revit almost impossible. So what I've been doing for changes that need to be automated, but require some computation and are applied to many elements in the project is to subscribe them to the document synchronising event, so everything gets automatically updated when you sync. Alternatively it could be done with any other event that makes sense for the particular task. Greetings, Viktor
@ErikFrits
@ErikFrits 7 ай бұрын
Thanks for your insights Viktor! Interesting idea to use Sync button as a trigger for all computation. It's already a long task anyway and people often go to grab a coffee while it happens anyway. In the company where I worked, I've create buttons for calculating window height and we would always push them whenever we needed to export some plans. Then it's always up to date on paper. But I just didn't dare to test IUpdater at the time. So we used it this way.
@MahmoudAboMazrou
@MahmoudAboMazrou 3 ай бұрын
thanx Erik♥
@ErikFrits
@ErikFrits 3 ай бұрын
Happy to help!
@oleksandrkhabailiuk9224
@oleksandrkhabailiuk9224 3 ай бұрын
Hi Erik, good job! I have one more question: would it be possible to make the time stamps only if the family was changed (type - instance parameter or geometricly or even depper level - tracking also the " tamp stemp" of all the nested families? Ideally: that we could track only family changes. Simply to say what was changed when we edit something inside the family including the nested families? Thank you in advance!
@ErikFrits
@ErikFrits 3 ай бұрын
Interesting idea for a tool. It's possible, but in case of nested families might be tricky to detect if it's regular or nested family. Might need an extra parameter, or maybe checking if parent family is open and has this exact family loaded there 🤔
@GilbertoGranados-dj3pp
@GilbertoGranados-dj3pp 7 ай бұрын
Hi Erik! Great video with some really useful examples! I've got a couple of ideas for DMUs that I'm excited about. First, I've managed to detect when a user tries to unpin important elements like links, grids, or levels using the ribbon button. However, elements can still be unpinned from the toggle button when selected. Have you tried addressing this issue in your projects? Secondly, I'm considering a feature that would alert users before they delete critical elements in the model. It would not only warn them but also log the user's name and the date if they proceed with the deletion. Maybe this could be tracked with a shared text file or something similar? Just brainstorming at this stage. Looking forward to your thoughts!.
@ErikFrits
@ErikFrits 7 ай бұрын
Hi Gilberto, 1. Disallow Unpinning IUpdater is not the best option here in my opinion. Instead of that you can subscribe to the event of Unpinning elements, and then check if element can be unpinned based on your rules. Then if it shouldn't be unpinned you can prompt a message to the user and cancel the 'unpin' command. I've made a tutorial before that one where I blocked "Import CAD" button in Revit and put a password on it with a command hook. here is link: kzbin.info/www/bejne/qpeognSsaJt4l68 2.Monitor Element Deletion I might also use another monitoring events here. Monitoring other events allows you to stop the execution of the command that caused the Event Trigger, and also it can be enough to write something to a reporting file. The only downside of using other events is that we can't make changes in Revit Projects. IUpdaters are useful when you know you want to add Extra changes to the model. Otherwise they might be an overkill as they are a bit trickier Hope it helps Happy Coding!
@MustafaHamdallah
@MustafaHamdallah 7 ай бұрын
Great work, thanks
@ErikFrits
@ErikFrits 7 ай бұрын
Thank you Mustafa! 🙏
@engineercivil2088
@engineercivil2088 7 ай бұрын
Excellent! Can you please make a tutorial on how to place line based elements in a family editor
@ErikFrits
@ErikFrits 7 ай бұрын
You mean placing nested line-based families inside of a family? Can you give a bit more context on the goal
@engineercivil2088
@engineercivil2088 7 ай бұрын
@@ErikFrits Yes, exactly placing a line based family on the default level or reference plane in the family environment. I have alot of line based families which i want to place in the another family (Generic model containing all line based families). All these lines lines represent walls for repetitive floor plans in one project and across different revit files. in that way i can change it one time and reload it into all the projects if there are some changes in the floorplan. The problem is that the familyinstance.bycurve node works fine in the project environment but doesnot work in family editor environment. i posted it in the dynamo forum and someone suggested to use this method "NewFamilyInstance Method (Reference, Line, FamilySymbol)" but still its not working. I used chatgpt to convert the c# example to python and tried it but didnt worked for me. Thanks. I am a dynamo user and now i am starting learning Revit API and Python. Your videos are really helpful. Thanks for that.
@michaelwolff1607
@michaelwolff1607 6 ай бұрын
Very nice tutorial. I do run into this error on my first try: ImportError: Cannot import name UnitTypeId. Is this class different in Revit 19, perhaps?
@ErikFrits
@ErikFrits 6 ай бұрын
Yes, UnitTypeId was introduced in 21 or 22. Before that we had to use DisplayUnitType Enumeration for the units. www.revitapidocs.com/2019/7d3d3306-a4c2-c577-0aeb-cca42d6cfd2f.htm
@andid9502
@andid9502 7 ай бұрын
Can I increment the updates, like writting a "blackBox" f.e. how moves the LocationPoint thrue the whole project. Our monitoring the timesstamps externialy. Can i save the values to a .txt f.e. ?
@ErikFrits
@ErikFrits 7 ай бұрын
Yes, you can create some reports about it as well. It will depend on how you would prefer to store and read the data. Definitely check what is the most efficient way to handle it. Maybe you need to write to some DB to make it faster.
@gamekhong
@gamekhong 7 ай бұрын
hi EF, i want to buy your course, how could i do it now ?
@ErikFrits
@ErikFrits 7 ай бұрын
Hi, The next course launch is planned very soon(in 2-3 weeks) and it will stay always open after that. Sorry for the late reply. P.S. If you want to get an immediate access, write me to support@LearnRevitAPI.com ;)
How To Create View Filters with Revit API in a few simple steps
10:41
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 16 МЛН
It’s Been a Good Run, Phone Providers (Part 2)
15:51
Data Slayer
Рет қаралды 1,8 МЛН
Are your JWTs really safe? Watch this or regret forever
26:19
Install These Tools for Revit API to Code Faster [EP. 4/10]
20:47
10 TIPS & TRICKS to improve your DRAWINGS IN REVIT
14:26
VERB Architecture Workshop
Рет қаралды 9 М.
[EP. 1] WPF Course for pyRevit: What is WPF Form and MVVM?
6:31
My pyRevit Template for Revit API: A Step-by-Step Guide [EP. 5/10]
15:46
AU24 Live: Get Started with Revit API using Python
58:05
Erik Frits
Рет қаралды 1,6 М.
Mastering Revit Macros - Lesson 1
39:14
ArchSmarter
Рет қаралды 41 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 16 МЛН