Run Dynamo scripts using pyRevit!

Поделиться
HTML-код
  • Опубликовано: 1 авг 2024
  • In today's video we continue learning about pyRevit by adding Dynamo scripts to a toolbar to run from. You'll need data shapes to generate UI's for this typically.
    0:00 Intro
    1:13 Previous video
    1:46 Scripts without UI's
    2:36 Scripts with UI's
    3:44 Other scripts we will use
    5:00 Updating our toolbar
    8:38 Reload the toolbar
    9:03 Running our scripts
    10:23 Putting scripts in a pulldown
    12:48 Outro
    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.
    Software used;
    Autodesk Revit 2020: www.autodesk.com/products/rev...
    pyRevit: github.com/eirannejad/pyRevit...
    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.jbhifi.com.au/products/ro...
    Audio interface: focusrite.com/en/usb-audio-in...
    #revit #pyrevit #bim

Комментарии • 95

  • @borisziv4557
    @borisziv4557 Год назад +7

    Better content and tutorials then any video autodesk gives us. Much appreciated!

  • @cathychoi6959
    @cathychoi6959 Год назад +2

    Thanks Gavin, more and more people are starting to recognize your amazing tutorials and really appreciate your time!

  • @asiab2335
    @asiab2335 2 года назад

    Thank you a lot for the next video on PyRevit, I really enjoy it! It is really motivating tool to dig in Python itself too .

  • @ahmedaminecharif2268
    @ahmedaminecharif2268 5 месяцев назад +1

    Thank you for your video Gavin, very explicit and clear.

  • @danielarmenta8235
    @danielarmenta8235 8 месяцев назад

    Hey Gavin I have learned so much from you! I wanted to say you are an amazing person, God Bless you, sending the best vibes from Colombia.

    • @AussieBIMGuru
      @AussieBIMGuru  8 месяцев назад

      Thanks for the kind words, and awesome to know my work has reached Colombia! 🇨🇴

  • @joshuastellini3074
    @joshuastellini3074 2 года назад

    This is a gamechanger! I tend to find that users are scared of dynamo/dynamo player meaning they lose access to some really useful tools. Having everything integrated into a push button will help break down those barriers.
    Thanks for walking us through it Gavin! Keep up the amazing work!

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      You're welcome mate! The main challenge with dynamo in pyrevit is UI and dependency on data shapes but if you can work with that then it's definitely a capable way of deploying tools.

    • @joshuastellini3074
      @joshuastellini3074 2 года назад

      I wonder if it’s possible to have a button in the toolbar to deploy custom packages 🤔

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад +1

      @@joshuastellini3074 sure is. Python can copy, delete and rename folders from user appdata folders using the 'os' and 'shutil' libraries, both of which I believe pyrevit has (definitely has os, fairly sure it has shutil).

  • @joaodutra2628
    @joaodutra2628 Год назад +1

    Great content! I will try to replicate this for a better learning.

  • @eliabim
    @eliabim 2 года назад +1

    I am waiting on this! Thanks Gavin

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      You're welcome! Keep up the great work in Dynamo/Revit on your side also.

    • @eliabim
      @eliabim 2 года назад

      @@AussieBIMGuru I have a question, My team dynamo package installed individualy in each computer, sometimes my script will not work into their computer then I have to replace the missing package or red color nodes just to run in their computer. My question is that if I use this pyrevit adding dynamo scripts does it mean that it will not have any issues running the dynamo that I created?

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      @@eliabim unfortunately youll still have the same issue with custom package management as pyrevit just opens dynamo in the background to run the script.

  • @DionisioSouzaproger
    @DionisioSouzaproger Год назад

    If we are thinking of doing something with Dynamo, Python or pyRevit, ABG has already made a tutorial available for free. Thank you so much for sharing your knowledge and studies!

  • @unidesigndc
    @unidesigndc 2 года назад +2

    G'day Mate! Thanks for the video

  • @parametricbim2023
    @parametricbim2023 2 года назад +1

    You are realy great man 👍 thank you

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад +1

      You're welcome!
      Keep up the content on your side too mate 😀

    • @parametricbim2023
      @parametricbim2023 2 года назад +1

      @@AussieBIMGuru I will my dear… thanks ❤️

  • @timyoung2079
    @timyoung2079 2 года назад

    Hi Gavin, waiting patiently for the next video ! Any clues as to what it may be ? :p

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      Unfortunately life has me busy right now so I've had to shelf the channel/series until time allows. Suggest checking out Erik Frits who is about to kick off a python and pyrevit series and has a great toolkit called EF tools for pyrevit.

  • @feri4life177
    @feri4life177 Год назад +1

    very nice.

  • @lengocgiang3702
    @lengocgiang3702 Год назад +1

    Super Thanks

  • @lenikrof
    @lenikrof 2 года назад +2

    Hey Gavin, you're the best. :) I see you use floor finishes as separate floors. What are the advantages of this workflow? Do you make other floor layers as separate floors also, or what is the best practice?

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад +4

      Usually I model the slab and finish separately for a variety of reasons including:
      1. The extents are different
      2. Finishes do not go under walls normally
      3. Structure models their own floors
      4. If concrete/finish go together it can be hard to differentiate screed bed vs solid slab
      5. Can hide finishes for concrete profiles
      Amongst a few other reasons.

    • @timyoung2079
      @timyoung2079 2 года назад

      It's good to quickly see required door undercuts too and create details for thresholds

  • @WietseStarsz
    @WietseStarsz Год назад

    Great video! Will there be any follow up on the PyRevit series?

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад

      Probably not anytime soon as I have run out of time for videos these days unfortunately. Check out erik frits channel as he covers pyrevit in depth.

    • @WietseStarsz
      @WietseStarsz Год назад +1

      @@AussieBIMGuru thank you for the recomendation, learned a lot from your videos so I hope you keep funding time to make them 😄

  • @user-fv2mn9nv5w
    @user-fv2mn9nv5w 6 месяцев назад +1

    This has been super helpfully but how can I get Revit shortcuts to recognize the custom toolbar. I would like to be able to run the scripts from a short cut key but when i make the custom tools they don't show up in the short cuts.

    • @AussieBIMGuru
      @AussieBIMGuru  6 месяцев назад

      Change the tab at the top of the keyboard shortcut menu to your pyrevit toolbar and it should show its commands.

  • @basjanssen9262
    @basjanssen9262 2 года назад

    Great Video again! I was waiting for this exact explanation, Thanks a lot. I do have a question regarding the Dynamo in Pyrevit functionality. I have some scripts that run with expected errors. when you run the dynamo script through this medium, you lose all the viewing of error capabilities of Dynamo right?

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      You're welcome! Yes unfortunately you're running Dynamo blind in this mode. It's a bit like Dynamo Player but without the 'ran with errors' message. Personally I don't run scripts via pyrevit due to this and other limitations, but it took a while to become confident writing tools purely in python.

    • @basjanssen9262
      @basjanssen9262 2 года назад

      @@AussieBIMGuru Thanks for the quick answer! can you make everything that is possible in dynamo also happen in python?

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      @@basjanssen9262 both use the revit api and can use c#/python so yes.

    • @zbyszekzbyszek5755
      @zbyszekzbyszek5755 2 года назад +1

      You can also import Task Dialog inside Python Script in Dynamo to handle exceptions.

  • @natchaakera1238
    @natchaakera1238 Год назад

    This is so great!
    I'm trying to integrate my dynamo into my tab too, but some have an input such as Excel file.
    Is it possible if I need to open and edit the .xlsx before run the script?

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад

      I believe that you can only do that by programming a waiting step using Python into your core script using something like a while loop. Maybe ask if the forums have an idea as it would need to be done in dynamo versus pyrevit.

  • @jasontian5053
    @jasontian5053 2 года назад

    Hi Gavin, is there any chance you can teach us how to tag all in elevation view? they are all 3D geographics. i used shape/geometry in dynamo, none would work without crashing , because it actually is going through the whole depth of the building

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      Unfortunately Revit doesn't know how to detect if something is covered by an object in the view range. Maybe try collecting all objects within a certain distance from your envelope walls a check if theyre visible in active view as well.

  • @ccwwallace
    @ccwwallace 2 года назад

    Gavin, do you know how to use dynamo to modify project location (rename site location name, modify latitude / longitude)?

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      Hrm not quite sure, given it's a searching tool im guessing it might not be exposed in the API. Worth asking on the forums.

  • @eddimaruyama
    @eddimaruyama Год назад +1

    Hey Gavin! Have you ever had an issue where the dynamo script works perfectly, but the PyRevit button does not work? I thought it could be related to the Automatic / Manual thing in the script, but mine are all set as Automatic. They all run via Dynamo Player, and if you already opened Dynamo in the session, the button works! They are very simple scripts, do you have any suggestion or solution?

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад

      Generally I haven't had this sort of issue, might be worth asking on pyrevit forums so they can troubleshoot in depth.

  • @rustyphilip7826
    @rustyphilip7826 2 года назад +2

    Hello there
    I've watched every video of yours in family creation. Great work🤗
    Could you please reply how to make a tag leader to come out at the last line of the text instead of the middle?
    By the way I need this information because I started using shared parameters and I'm slowly transitioning from text notes to shared parameters. My company(BlueStar India) is the biggest in HVAC in india, but we use Revit only for it's 3D modeling aspect. Creating shared parameters about AC machines and others saved me alot of time in scheduling without mistakes.
    Anyway any help is appreciated because a leader line coming out at the middle is forcing me to give space between tages, It's not possible in most sheets.

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      Great to hear you are starting to explore parameters over text notes! I believe they added some extra tag leader management options to Revit 2022 and beyond, but the only way I know to force the leader into a set position is using an invisible vertical line that is taller than the label in the tag, then bottom/left justify the label to the centre of the tag or thereabouts. The invisble line should trick Revit into thinking the leader belongs at the bottom of the text note which is technically the centre of the invisible line. This only works if the leader is set to the side of the tag unfortunately, not above or below the tag.

  • @user-sx5rp5gl5t
    @user-sx5rp5gl5t Год назад

    Can anyone tell me where I can install the pyRoovit ribbon? I can't find it in the extensions manager. :(

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад

      Its on my github and has been rebranded to guRoo.

  • @tonyhoward6085
    @tonyhoward6085 2 года назад

    What about dockable windows? i believe there is a dockable in pydev tools?

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      Yes you can make winforms using pyrevit I think. It's quite timely but there are some apps in pyrevit like the batch printer that use custom UI's. Haven't seen dockable before though... may need an addin for that.

  • @najwansv150
    @najwansv150 3 месяца назад

    is there a way to run multiple dynamo script sequentially from pyrevit?

    • @AussieBIMGuru
      @AussieBIMGuru  3 месяца назад

      Not as far as I know but check our dynamo multiplayer app by birdtools.

  • @110211071155
    @110211071155 Год назад

    i'm curious to know how can we deal with multiline tooltip?

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад +1

      Use this syntax:
      title: >-
      First line
      second line

  • @auron584
    @auron584 Год назад +1

    Hey Gavin, thanks for the informative video. I have a problem, when loading my panel in pyrevit with buttons on a dynamo script, the scripts stop working (python scribt nodes
    gives an error message). The script does not run in any way. Once I unload my panel everything works fine. I use pyRevit v4.8.12, Revit 2023.1, Dynamo 2.16 + CPython 3.9.12. If you had a similar problem, could you share how to solve it.

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад

      Hard to say without knowing the specific warning, but I've managed to run Dynamo scripts via 2023 before without issue that use Python nodes.

    • @auron584
      @auron584 Год назад

      @@AussieBIMGuru I want to know if the nodes you used were Python3?

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад

      @@auron584 I generally use IronPython but did a test and my CPython nodes seemed to work in testing at least. Maybe lodge a github issue to get detailed assistance.

    • @auron584
      @auron584 Год назад

      @@AussieBIMGuru Thanks, I'll try to write github.

  • @AwsAlSaigh
    @AwsAlSaigh 2 года назад

    is it possible to do the same with c#?

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      Yes. Relay, Nonica and Dyno have done this. As you'll see in future videos pyRevit's major drawcard is in its python based tool creation offerings though.

  • @johnm360
    @johnm360 2 года назад

    I have stupid ,, question.. When ever I load Revit with pyrevit it ruins Dynamo.. i.e. the visibility of the nodes.. Is there an easy fix for this?

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад

      Chances are there is a custom package competing with it. Try removing all your packages and progressively reinstalling them. Sometimes the generative design package/tool can cause this also - I typically uninstall this anyway.

  • @MrBondarrr
    @MrBondarrr Год назад

    Is anyone alive? How can I disable backups of a regular locally stored file?

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад

      You can only fully disable them by making a central model. When you save the model you can reduce the backup count there so less are created.

  • @Bimfantaster
    @Bimfantaster 2 года назад +1

    Great video! I am an electrical engineer by training. Maybe someone knows a channel about electrics in Revit.

    • @AussieBIMGuru
      @AussieBIMGuru  2 года назад +2

      Unfortunately I don't, but if anyone in the comments does make sure to leave it here!

    • @unidesigndc
      @unidesigndc 2 года назад

      Hi I think you subscribed to my channel because I have seen your name. If not here's a link to some basic MEP stuff conduit cable trays etc.
      ruclips.net/video/Uwe_SenaWO0/видео.html

  • @LinhNguyen-zp4cb
    @LinhNguyen-zp4cb Год назад

    Hi, at 11:07, Can you please tell me how to create this yaml file?

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад +1

      I used notepad++. Save the file and instead of saving as a txt file, save as a yaml file instead by typing the extension in manually.

    • @LinhNguyen-zp4cb
      @LinhNguyen-zp4cb Год назад

      @@AussieBIMGuru Is this file to arrange the script order? Why can't I write like this?

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад

      @@LinhNguyen-zp4cb in that case it is to order the buttons in the toolbar yes. Some are optional but without then pyrevit will make assumptions about these sorts of things.

    • @LinhNguyen-zp4cb
      @LinhNguyen-zp4cb Год назад

      @@AussieBIMGuru can you upload this file on github ?

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад +1

      @@LinhNguyen-zp4cb you can find some files like this in the files for a future video here:
      github.com/aussieBIMguru/Misc/blob/master/ABG_230320_pyRevit%20prefiltering.zip

  • @adanieltorres01
    @adanieltorres01 23 дня назад

    Hi, Gavin
    First of all, thank you for your time and great videos, I really appreciated both
    Got a question, do you know what this error means?
    ERROR [pyrevit.loader.sessionmgr] Can not find command with unique name: pyrevitcore-pyrevit-pyrevit-tools-reload
    Thank you again, for your attention!

    • @AussieBIMGuru
      @AussieBIMGuru  23 дня назад

      Hrm strange, havent seen it before. Looks like pyrevit maybe needs a reinstall to fix the missing tool.

    • @adanieltorres01
      @adanieltorres01 23 дня назад +1

      @@AussieBIMGuru thanks, Gavin. That's exactly what I did, then I modify the structure in the .extension folder and files, and I finally nailed it. Thank you so much for all your support!
      Greetings from Mexico 🇲🇽

  • @user-gm4vl8ij8h
    @user-gm4vl8ij8h Год назад +1

    Hello, how can I contact you? I need your help to explain some things in Revit because I have a final exam and I need to understand something important about DYNAMO.

    • @AussieBIMGuru
      @AussieBIMGuru  Год назад

      My email is available on my YT profile information. aussiebimguru@gmail.com