How to use IUpdater in Revit API to improve your Revit

แชร์
ฝัง

ความคิดเห็น • 24

  • @danielswearson1360
    @danielswearson1360 7 หลายเดือนก่อน +2

    Excellent work, Erik. Keep it up.

    • @ErikFrits
      @ErikFrits  7 หลายเดือนก่อน

      Thank you a lot Daniel!

  • @MahmoudAboMazrou
    @MahmoudAboMazrou 3 หลายเดือนก่อน +1

    thanx Erik♥

    • @ErikFrits
      @ErikFrits  3 หลายเดือนก่อน

      Happy to help!

  • @RevitExperiments
    @RevitExperiments 8 หลายเดือนก่อน +2

    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 หลายเดือนก่อน +1

      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.

  • @oleksandrkhabailiuk9224
    @oleksandrkhabailiuk9224 3 หลายเดือนก่อน +1

    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 🤔

  • @MustafaHamdallah
    @MustafaHamdallah 8 หลายเดือนก่อน +1

    Great work, thanks

    • @ErikFrits
      @ErikFrits  8 หลายเดือนก่อน

      Thank you Mustafa! 🙏

  • @GilbertoGranados-dj3pp
    @GilbertoGranados-dj3pp 8 หลายเดือนก่อน +1

    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: th-cam.com/video/tfEQAv36EaM/w-d-xo.html
      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!

  • @michaelwolff1607
    @michaelwolff1607 6 หลายเดือนก่อน +1

    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 8 หลายเดือนก่อน +1

    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 หลายเดือนก่อน +1

      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.

  • @engineercivil2088
    @engineercivil2088 7 หลายเดือนก่อน +1

    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.

  • @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 ;)