📙 Get Free E-Book: Beginner's Guide to Revit API:
https://learnrevitapi.com/ebook
🎯 Interested in Learning Revit API in the fastest way possible?
Join Learn Revit API Course: https://learnrevitapi.com
--------------------------------------------------
🔗 Links from Video:
...
--------------------------------------------------
📝 Video Summary:
pyRevit Hooks, Revit API Events...
I've been getting many questions about them. So it's time to cover it on the channel!
There are 4 different types of Events
Data Base Events (under Application Class)
UI Events (under UIApplication Class)
Command Binding Events (monitor PostableCommands)
IUpdater (Monitor changes and add more)
💡 IUpdater is not technically an Event, but it behaves like one, so it's part of the club.
In this video, I will focus mainly on the Command Binding events, so we can pop-up a warning message, whenever a user clicks on the Import CAD. This will allow us to block users from Importing CAD and give them a warning message that they should you Link CAD instead. And to make it a bit more fun, we will also ask users for a password, so only a select few have this power.
--------------------------------------------------
🎬 Chapters:
0:00 pyRevit Hooks / Revit API Events
1:00 Event Types in Revit API
1:55 How to Subscribe to an Event?
2:15 Create pyRevit Hook
5:05 Extension Hooks Names
6:15 How to find Command Id?
8:00 Create command-before-exec[cmd-id]
8:55 Code for Event Handler
11:45 Testing
12:25 Remove Hook
12:45 Subscribe Manually to Revit API Event
15:00 Unsubscribe from an Event
15:30 More Events?
--------------------------------------------------
⌨️ Happy Coding!
Tags: #LearnRevitAPI #RevitAPI #pyrevit
Watch video Revit API Events and pyRevit Hooks Explained (Say Goodbye to CAD Imports) online without registration, duration hours minute second in high quality. This video was added by user Erik Frits 18 March 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,026 once and liked it 64 people.