Making a pyRevit toolbar!

Поделиться
HTML-код
  • Опубликовано: 28 ноя 2024

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

  • @general212f
    @general212f 2 года назад +5

    Dude, just... Thank you.
    I hope you receive in the future even a small portion of what you are giving to the community.

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

      The exposure helps me run my consulting business so that's benefit enough for sharing my knowledge!

  • @NikoG
    @NikoG 2 года назад +3

    Nice topic Gavin. I've use this method long time for my work team. Thank you for sharing.👍

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

      Nice one! You're welcome Niko. Keep up the grear content on your side too 😉

  • @johnny_Tea
    @johnny_Tea 10 месяцев назад +1

    Just remember to clear all temp files before starting this, especially if it has been a while (win+i -> system -> storage), or else you might have an issue with icons showing up in Revit; it took me more than a minute to figure that out. Thanks Gavin!

  • @dalibordasic3039
    @dalibordasic3039 2 года назад +6

    Awesome work Gavin!!
    One tip btw, you can check code for pyRevit buttons by pressing ALT and left click on some of the button (for example MRead) and it will open you a folder where script for that button is placed.

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

      Cheers! Seems to be a hot tip for pyrevit and has helper me a lot over the last few weeks (Ehsan himself told me too).

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

    For all those having issues getting the toolbar to show up in Revit. An easy work around I've found is to copy the folder into the pyrevit directory manually.
    Click on the pyRevit toolbar drop down. Then select extensions and make note of the folder that extensions are being store in ( shown at the bottom of the popup).Then copy and paste your folder structure directly into that location.
    This however doesnt live link to the folder as i imagine the other technqiue will but if you replace the folder with a new version and reload it should be fine for personal usage.
    This worked for me but might not for everyone. Hope this helps

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

      Thanks for the tip! To add to this, I've found if you place your folder on a cloud environment that can cause issues as well, such as OneDrive or Google Drive folders using the Windows addin. Best results I find are from putting it in a user folder like My Documents.

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

    Thank you for the amazing tutorials, the way you explain is straight forward and self explanatory , just on point! Greetings from Ukraine 👏

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

      You're welcome! Wishing you and your nation all the best in these trying times.

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

    I just installed pyrevit ... perfect!
    Thank for the video!! :D

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

    Thank you for the help!!! Love your videos, very insightful

  • @FinArt119
    @FinArt119 8 месяцев назад +1

    Gotcha! If anyone got stuck in somewhere like me. Just go back a new folder, create a simple folder. Root Folder > [anything].extension > [anything].tab > [anything].panel > [anything].pushbutton > (script.py with simple print("hi") + icon.png (exactly 96x96 pixel)). At first, bundle file or layout file is NOT necessary! Good luck!

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

      Bundles are only if you want/need to tailor tooltip, name and various other aspects of your tool such as adding context to when the tool can be run.

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

    Thanks for the video Gavin, greetings from Chile.

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

      You're welcome, and great to know I have viewers in Chile :)

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

      @@AussieBIMGuru Also from Hong Kong too.

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

      @@singwing100 nice one!

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

    You are a amazing educator

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

    Thank you so much!

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

    Hello, can’t wait for part with Dynamo Scripts inside extension. To Run The script from my pyRevit ribbon do I have to have custom UI inside Dynamo to force inputs?

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

      Coming next week! But yes we will need to use data shapes to make user inputs.
      We'll go into pyrevit scripting soon as well which comes with many inbuilt forms in its default libraries luckily.

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

    Hi Gavin, amazing work as always!
    Is it possible to have a drop down menu within another drop down menu?
    I have tried doing so by simply nesting a .pulldown file in a .pulldown file but the tool bar doesn't seem to pick this up. I was wondering if there is something I need to do within the bundle.Yaml file.

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

      I believe the deepest you can go is a stacked dropdown in an expanded panel. Haven't tried dropdown in dropdown but I doubt it would work as you could infinitely nest buttons if so.

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

    Love it! Is it possible to break the name of the button in Revit so it takes two lines instead of one really long one?

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

      Sure is, enter the title like this in the yaml file:
      title: >-
      --Line 1
      --Line 2
      Use spaces in lieu of the - at the start of each line, I've used this symbol so it's easier to see the spacing.

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

      Wonderful! Works perfectly; I appreciate it!

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

    very good.

  • @AIWorks2040
    @AIWorks2040 8 месяцев назад +1

    Thank you so much ....

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

    Dear Aussie, first of all i would like to send for you a lot of worm thanks for all the knowledge you provide, I am really learning from you a lot.
    I had a question regarding the topic of this video, after i created my own toolbar and buttons, i want to know how to reorder these icons, i mean i need to keep the links at left, then other tools, even if i am writing the bundle file in this order i found them in another order in the revit toolbar. thanks in advance

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

      Typically bundle files should be able to do this, but you may need to close/reopen revit for the changes to take effect.

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

    Great video!
    I was trying to create a urlbutton that opens a PDF file in a network folder but couldn’t get it to work. Any tips on that?

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

      You would need to use the os library in order to do that, as a file in a network doesnt have a URL.

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

      @@AussieBIMGuru yess thanks! Os library did it!

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

    Awesome stuff Gavin! How can I specify an order of my buttons? When I change the order in de yaml file, it doesn't change it in Revit if I reload.

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

      The yaml file is the way, but sometimes I find I need to close/reopen revit for reordering to work.

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

      @@AussieBIMGuru Thanks for your answer. I found the solution in renaming the button folders. The title is specified in the yaml file so it doesn't change the name in Revit. But I'll try restarting Revit, maybe it works too

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

    Thank you for the Video.
    Is it possible to change the name from MyTools from something else?

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

      Yes this is based on what you choose to either name the folders or set as the title field in bundle files.

  • @Starfieldman
    @Starfieldman 9 месяцев назад +1

    Hi Gavin, thanks for a great tutorial, you have inspired me to venture into the murky world of custom tools. I noticed the current github download of your excellent guRoo tools does not have the 'guRoo.extension' directory so does'nt show up in the Revit ribbon. I created a dir called guRoo and placed it in the pyRevit extensions folder in appdata (C:\Users\pcname\AppData\Roaming\pyRevit\Extensions\guRoo\guRoo.extension) . Then renamed the 'guRoo_main' folder containing the tools to 'guRoo.extension', then all works and shows up . Many Thanks for sharing all your hard earned knowledge.

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

      Ah yes right you are.... it's mainly to support the CLI based install method which wraps this all into a .extension automatically, but your solution works also.

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

    Hi Gavin!
    Super video, but one thing doesn't seem to work out for me.
    I can't make the bundle to work, have looked around a bit on the documentation pages of pyrevit and still can't figer it out.
    Is it possible to make a video on these :), would be super helpfull!
    I think there is alot of info in there, like background colors and those kind of things.

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

      I'd recommend borrowing some bundle files from pyRevit itself as a template, the tools should be openable via Revit if you alt + click on the buttons. All of Ehsan's work is open for viewing and he uses bundles for both naming of tools and organisation of pulldowns, panels etc. That's pretty much how I learnt about them myself originally (and still do when I come across extra things like 'context' settings).

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

    Hi Gavin!
    Super video, but one thing doesn't seem to work out for me.
    Icons don t show in my bundle... i rename them "icon.png" and nothing happens. Everything else is working so far. Thanks for the tutorials , you re the best.

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

      Hrm strange. Make sure they are 96x96 pixels, and I suggest png format for best results.

    • @HypnoticHamlet
      @HypnoticHamlet 11 месяцев назад

      I know I am late to the comment lol. I am working in Revit 2023. I had the same issue. I don't know if it changed due to updates in recent years but the ".png" is not need. Just name it "Icon" and it should work.

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

    Hello! Thank you for the video, I really enjoy your way of explaining stuff. I was just wondering if it is possible to insert a link to a place on my server instead of youtube/github link. As BIM manager I would like to let my workmates know where they can find tutorials or templates or libraries prepared by BIM manager in our office.

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

      Yes you can use the os python library to open folder paths. I use this method in a few scripts currently in order to open server locations for a client and it works well.

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

      @@AussieBIMGuru Thank you for the reply. Seems not so complicated to run simple one!
      import os
      path = r'D:\folder\folder\xxx'
      os.startfile(path)

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

    Hi Gavin, are we able to have Pyrevit (in different Revit versions) pointing at different custom folders for extensions? Some scripts only work in 2019 not in 2020.

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

      I dont believe so, it usually shares its settings across builds. You can however use bundle files and 'context' to limit which versions scripts can be ran in I think.

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

      @@AussieBIMGuru Thanks Gavin, I think Pyrevit CLI might be able to make some configuration to Revit versions. Another question is, are we able to NOT show the Bundle name when the mouse hovers over the icon?

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

      @@rflash_w not that I am aware of. Maybe ask via the github.

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

    Thanks Gavin! If my title on ribbon is too long, how can I make it two lines?

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

      Hrm I'm not sure actually, you could try using a yaml file at the panel level to try to set its title but I've only got 2 line names to work for buttons so far.

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

      @@AussieBIMGuru ok solved, I made another bundle yaml and rename the title with two lines by adding

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

    Hi Gavin, do you know if the url method still works? im getting no target url error.

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

      Yep, still using it currently on a few tools. Maybe try scripting it instead using the webbrowser library?

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

    I followed all the step however the tool did not appear in the bar. What could be the error?

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

      Hard to say. Most likely there may be a typo in a folder, or pyrevit is clashing with another revit addin.

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

    Thank you!
    I'm still stuck with Revit 2024. Nothing loaded.
    I have already moved folder to document, named .panel ( not ".Panel), "_layout" file instead of bundle.yaml BUT nothing happened. Help!

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

      Maybe compare to guRoo on github, my sample pyrevit extension. Ive had that working in 2024 without issue.

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

      ​@@AussieBIMGuru thanks for your response. Maybe the structure is too much things so that, for a newbie, we are easy to get stuck in something.

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

    When you first open notepad++ in your video, How do you type two symbols being used? I think I got the first one which is a raised dot, but I can't find what the second symbol is used? Thank you in advance.

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

      The raised dot is actually a space. Notepad++ can be set to show whitespace which is really helpful when programming. You can adjust this setting in the preferences area of the application.

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

      @@AussieBIMGuru thank you. I will look. I also wondered what the other symbol (hyphen) that typed?
      And. How did you get the collapsable plus sign? I have seen it in a bundle that I opened but can not reproduce it. Thank you.
      By they way I was able to do tutorial on my machine so thanks to you again.

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

      @@brandonkemp9579 the symbols are likely one of the following which are common to python:
      # / \ - _ [ ]
      To get the + you will need the file to be saved as a relevant format such as .yaml or .py.

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

    Hi Gavin, I tried everything as you explained. Also your pyRoovit, downloaded from your Git. None of the tools are being loaded into my revit 2022. I don't know why!!

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

      Hrm hard to say, typically i havent had any issues seeing pyrevit it once i install it. Might need to report it to the github for hands on assistance.

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

      @@AussieBIMGuru Hi, do you know if there is an issue for Revit 2022 ? I can't use it on Revit 2022. Thanks for this video and this plugin. I'm using in on older version of Revit and it's really nice !

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

    Hi Gavin good day where can I download YAML editor?

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

      As per other video, try notepad ++ or pycharm.

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

    I've recently had a new work PC, and trying to re-associate my previous custom extensions, but the custom extension directory paths don't seem to save?
    I add the directory and save/reload, no new tabs are added, and when I head back into the settings, the paths are gone.
    Has anyone else come across this issue?
    I'm using Revit 2020 and 2023 if that helps

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

      Make sure you have read and write priveleges for the pyrevit.ini file in your roaming appdata folder.

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

    when I "save settings and reload" my toolbar does not appear. What could be wrong. I followed the steps exactly

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

      Not sure unfortunately. Maybe ask over on the forums, it worked for me as you see in the video.

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

      @@AussieBIMGuru I got it figured out, simple typo in one of my folder names lol. Thank you for all the amazing content. I have learned so much from your channel over the past year.

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

    This was Great But Facing this issue, can you help with this.
    CRITICAL [pyrevit.loader.uimaker] Error creating item: | 'GenericUIComponent' object has no attribute 'has_commands'
    Please help with this.
    Thanks

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

      Unfortunately I am not familiar with this specific issue. My best guess is there is an error in the bundle file or the Icon file isn't at a suitable aspect ratio.

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

      @@AussieBIMGuru I am also receiving this error. Followed instructions step by step. Both icons I pulled from Icons8. Any further thoughts on why I would be getting this error?

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

    hi, did you remember my question about a plug-in for creating a family window and placing it on the wall of Revit by using an user interface, python and C#?
    i'm facing this kind of error, : "Value cannot be null. Parameter name: symbol".
    Actually, I think that my error come from the win_type variable used to create the window family is null at this time.
    Do you know how to handle with this kind of error? i can also give you some other informations, can you give me your email?

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

      Generally i havent been able to get these parameter types to work yet unfortunately. Maybe try revit api forums.

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

      @@AussieBIMGuru i will do that. Thanks for your reply.