Python in Dynamo: Create Sheets (API 1)

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

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

  • @GottfriedSchmidtke
    @GottfriedSchmidtke 9 หลายเดือนก่อน

    I am on my path to learn Python for REVIT for a good while now and I appreciate how you go systematically through each part of your scripts including debugging an cleaning up. Thanks for your good work in all your videos and keep it up. Much appreciated!

    • @AussieBIMGuru
      @AussieBIMGuru  9 หลายเดือนก่อน

      You're welcome, debugging is crucial!

  • @TheAlexwander
    @TheAlexwander ปีที่แล้ว +1

    Thanks for the video, its easy to understand and the content is very friendly for the user

  • @inouizi
    @inouizi 4 ปีที่แล้ว

    I can't wait to sink my teeth into these videos and see what I can do with them.. great work as always! 👍🏼

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว

      Cheers Ilyes! Make sure you take that enthusiasm to www.revitapidocs.com/ as well, there's a treasure trove of information there. Hopefully my videos help get you started with exploring all it has to offer us.

  • @otdosa
    @otdosa 2 ปีที่แล้ว +1

    pure gold man.
    keep it up.
    cannot thank you enough.

  • @jedsanford7879
    @jedsanford7879 ปีที่แล้ว +1

    This was super helpful, I see now that I am approacing the boilerplate from the wrong direction- I should be deleting not typing. The boilerplate and wrapping and unwrapping has by far given me hte most trouble. Would it not be helpful to add a tolist function to the boilderplate, since its used so much? I always see it typed out in other peoples nodes.

    • @AussieBIMGuru
      @AussieBIMGuru  ปีที่แล้ว +1

      Yes in fact my own personal boilerplate these days has this and an unwrap list function. You can find it here:
      github.com/aussieBIMguru/Misc/blob/master/PythonTemplate.py

  • @erjuico888
    @erjuico888 4 ปีที่แล้ว +1

    That was very informative. Thank you for sharing! :)

  • @ATTechTutorials
    @ATTechTutorials 4 ปีที่แล้ว +1

    Great script Gavin! I'm planning to create a series on this using Dynamo's DesignScript

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว +1

      Cheers Alan! The node technically exists already, but is a handy example for getting started.

  • @titomoura7014
    @titomoura7014 ปีที่แล้ว

    Hi Gevin, How it's going?? It's been a long time that I haven't watched your videos. I'm wondering if there is a way to create a 3d model in revit from a xml file??? if it so, which tools it is required?? Thanks!

    • @AussieBIMGuru
      @AussieBIMGuru  ปีที่แล้ว +1

      Xml isn't really a format Revit deals with unfortunately (it's just a data storage format, not geometry). You would need an addin or dynamo package capable of reading it and processing it into logical steps in Revit I think.

    • @titomoura7014
      @titomoura7014 ปีที่แล้ว

      @Aussie BIM Guru Humm interesting. I use a software called Liftdesigner, which contains a database with the lift component, and create a 3D model from an xml file. But I have no idea which type of files are its database. I actually recommend you at Schindler as a BIM consultant, as we want to improve our BIM processes. I'm not when or if they will contact you. I hope they do!

    • @AussieBIMGuru
      @AussieBIMGuru  ปีที่แล้ว +1

      @@titomoura7014 no worries and thanks! Generally lift designer probably has some tools made for reading the xml file and using that to generate the geometry.

  • @immi85
    @immi85 4 ปีที่แล้ว

    True, Learning the entire API is almost impossible, but if you learn entire API then you can create new version of Revit 😁
    Again your video is easy to understand, but i need to practice more-then before.😃

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว +4

      It only gets harder - important to take breaks here and there (I've actually taken one for about 3 weeks now - check out the video times in the taskbar!).
      API is still one level above the inner workings of Revit, so to code a new Revit would be even more to learn!

  • @SuradkarTushar
    @SuradkarTushar ปีที่แล้ว

    Thank you for this excellent video. I would kindly want to ask if we can use libraries like Pandas and NumPy in the Python editor of Dynamo.

    • @AussieBIMGuru
      @AussieBIMGuru  ปีที่แล้ว

      They will only work in Python 3 engines, but you can add them as per this guide:
      github.com/DynamoDS/Dynamo/wiki/Customizing-Dynamo's-Python-3-installation#what-if-i-see-warning-modulenotfounderror-even-if-i-followed-all-the-steps-above

  • @gonzalodelucas4341
    @gonzalodelucas4341 4 ปีที่แล้ว +1

    Thank you for your work man!

  • @tonyhoward6085
    @tonyhoward6085 4 ปีที่แล้ว +1

    I have seen examples of what to use and when but what do see as the reason to use API versus dynamo? Code v Node is what i have seen. They dont really break it down into when to use either or just a how much of a headache to you want.

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว +2

      There isn't really a versus approach here, moreso an enhanced approach. If you've ever used someone's custom node, you have been using API technically. Heck, dynamo is essentially API and some pure Python behind the scenes.
      I personally write/use API myself to 'fill the gaps' when a custom package doesn't have what I need, for example the other day I needed to rename the prefixes in all my fill patterns and the only way was by using Revit API for the fill pattern class. Easily saved me 15 minutes of boring work!

    • @tonyhoward6085
      @tonyhoward6085 4 ปีที่แล้ว +2

      ​@@AussieBIMGuru Currently we have a BIM manager who isnt learning about API/Dynamo so it is left up to myself to look at which to choose. Our BIM manager likes the flashy toolbar buttons approach while almost scoffing at dynamo as a lessor version. This could be due to their lack of knowledge with regards to API v dynamo. I see API (TOOLBAR BUTTONS) as a simpler way to get programs/processes out to other offices in a national company as it controls what the end user does to some extent. there is a lower learning curve for the end user.

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว +2

      Ultimately the best approach is a company developing their own custom tools in C# using API. Dynamo can be made to work at a company level, but deployment can be a bit of a hassle and scripts have to be built carefully and users trained well. Personally Dynamo is enough for me currently, but I can understand why for some it isn't.
      Dynamo is probably not to be scoffed at lightly (unless your BIM Manager is building their own custom tools to cater to your needs), but I could understand the reasoning to some degrees. One thing Dynamo is worth focusing on for is it forms a soft entry ramp into coding/programming for AEC professionals, whilst launching straight into C# can be quite a nightmare for most.
      To scoff from a high vantage point usually rubs me off the wrong way, as it really becomes quite an elitist way of viewing the bigger picture (and doesn't welcome others to join).

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว +3

      Also check this webinar out, it gives some insight into the challenges and opportunities of Dynamo on a company scale; th-cam.com/video/KZWcs9nDbZU/w-d-xo.html

  • @alessandrocasalicchio8996
    @alessandrocasalicchio8996 2 ปีที่แล้ว

    I Gavin, do you know a place to begin learning civil 3D API? Thank you

    • @AussieBIMGuru
      @AussieBIMGuru  2 ปีที่แล้ว

      Probably from the camber package or the dynamo forums. I haven't learnt much of it myself unfortunately.

  • @moutazsherif383
    @moutazsherif383 4 ปีที่แล้ว +1

    Thanks Gavin !..Incredible tutorial
    as always.
    Yet, i was wondering if I have a list of lists (list of walls at each level for example)..Main list that include 10 lists each one include 100 walls is there a way to carry out a process (like join walls) in python that work that would only try join walls on the level to avoid unnecessary operation and cut run time.

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว +1

      There is indeed a Revit API method for this; www.revitapidocs.com/2016/2f223fde-0e7c-fce5-e68f-3c1ca6a6b6c1.htm
      You would need to iterate this method for each wall in a list, in relation to each other wall.
      You could also use this property to check if already joined to avoid errors also;
      www.revitapidocs.com/2016/69178304-668a-bcbd-b459-33de2146942d.htm
      These are all called on as methods to the 'JoinGeometryUtils' class.

    • @moutazsherif383
      @moutazsherif383 4 ปีที่แล้ว +1

      @@AussieBIMGuru
      Okay.Thanks for your respond. But I already managed to find a way for the join process..My problem is dealing with the list itself..
      In my example previously, when I do the join command it will try to join each wall to all the walls (in the whole project..1000 wall) even if it's not in the same level...so my problem is how to tell the command to try join each wall with the 100 wall in the same level only..knowing that the INPUT list include 10 list, one for each floor. and each list of the ten include the 100 walls.
      Hopefully, I managed to explain my question to you.

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว +1

      This would be a matter of iterating at a few levels. You could do something like this (excuse the lack of indentation);
      for list in lists:
      for wall in list:
      wallcount = len(wall)
      counter = 0
      while counter < wallcount:
      check if wall and list[counter] are joined
      if so, join wall and list[counter]
      counter += 1
      This should exhaust all possible combinations of the wall and other walls, within eachsublist. A climbing counter and a while loop can be dangerous if you make any mistakes in the code (as a while loop can potentially go forever) but I believe above should be fairly safe.

    • @moutazsherif383
      @moutazsherif383 4 ปีที่แล้ว +1

      @@AussieBIMGuru Thanks Gavin!..It sounds promising..I will give it a try and get back to you ..
      Really appreciate your support..Thanks again for your time.

  • @justinstirling5792
    @justinstirling5792 4 ปีที่แล้ว +1

    Great stuff Gavin! Really enjoying watching and learning from your whole collection.
    I went to your Github and grabbed the Crumple package. Unfortunately, when the package is located in my Dynamo 2.0 package directory, my entire open Revit application disappears (closes without any warning whatsoever) when I try to open Dynamo. Any thoughts on why this may be happening? No issues at all if I remove the package from the Dynamo 2.0 package directory. Thanks and keep up the great work!

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว

      Yikes, that sounds a bit worrying! The package is developed in Revit 2020 and Dynamo 2.3 so I don't think it will work in versions before then, maybe that's causing it...
      Make sure to place all the package contents into their own package sub-folder also. I believe if they're in the root package directory that causes issues too.

    • @justinstirling5792
      @justinstirling5792 4 ปีที่แล้ว +1

      @@AussieBIMGuru I'm using Revit 2019 with Dynamo 2.0.3, so maybe that's it. As far as the folder structure goes, it's no different than any of the other packages I have installed - "C:\Users\XXX\AppData\Roaming\Dynamo\Dynamo Revit\2.0\packages\Crumple-master". Thanks for the response Gavin!

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว

      Ah try calling it 'Crumple' instead... might be looking for its static package name.

    • @justinstirling5792
      @justinstirling5792 4 ปีที่แล้ว +1

      @@AussieBIMGuru Nope, that didn't fix the problem.
      By the way, might you be aware of a python method to copy views from a linked project to a host project? I'm an MEP engineer and looking for a method to essentially recreate the architectural sheets containing floor plans and enlarged plans in the host model. Then I want to be able to use these sheets/view locations as a template to create all of the MEP sheets/views. This would allow the MEP sheets to match layout of the architecture sheets very similarly. Not having any extreme luck with this on the forum. The closest I think someone has gotten is near the end of this post - forum.dynamobim.com/t/transfer-project-standards/44975.

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว +1

      I've since found that the package only appears to work in Dynamo 2.3 and Revit 2020+ unfortunately. The nodes are all exposed though so if you want to copy any of the contents down to old versions in Python feel free to.
      This would be a pretty intense workflow - try getting in touch with Sean on the thread to see if he found the workflow solution in the end.

  • @abdullahjanamiri4586
    @abdullahjanamiri4586 3 ปีที่แล้ว +1

    thanks, Gavin your videos are so great. could you explain how to change family properties like changing the timber columns to concrete ones using Dynamo in a building project? I have seen someone who used python script but did not work for me.

    • @AussieBIMGuru
      @AussieBIMGuru  3 ปีที่แล้ว +1

      It depends how your loadable families are set up. The element.setparameterbyname node can be used to ser the Type of a family instance to another, so this could be used to swap families from a concrete type to timber - you would just need to match the types. This could be done using a file in excel to guide the family/type names to use.

  • @quoctuanhoang759
    @quoctuanhoang759 4 ปีที่แล้ว +1

    How to download the Crumpler package?

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว

      It's available on my Github;
      github.com/aussieBIMguru/Crumple

    • @quoctuanhoang759
      @quoctuanhoang759 4 ปีที่แล้ว +1

      @@AussieBIMGuru Thank you very much. I always watch your videos. it's so good

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว

      @@quoctuanhoang759 glad you like them :)

    • @quoctuanhoang759
      @quoctuanhoang759 4 ปีที่แล้ว +1

      @@AussieBIMGuru I want to learn Dynamo for Revit Bridge. Is there any good channel about this

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว

      Not that I'm aware of. I'd search on Autodesk University.

  • @djrease7354
    @djrease7354 4 ปีที่แล้ว +1

    Nice script ... I have an idea to add on to this script... more related to detail sheets .. Have you tried creating views and/ or creating section views using dynamo.. and using dynamo to place views on sheets?

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว

      Thanks! Dynamo can create sections, but the parameters of how a section is drawn can be quite challenging. Usually you need to detect an extent and logical placement point - I tend to avoid this in Dynamo for this reason as it would just lead to people going 'I want the script to place my section exactly here', of which my response would have to be 'but how does Dynamo decide that?'.
      In part 2 we place views on sheets!

    • @djrease7354
      @djrease7354 4 ปีที่แล้ว +1

      Aussie BIM Guru Correct the script would be only targeted to specific types of elements of interest such as a wall, door, column, Or a generic model element.

  • @rezwanulhoque117
    @rezwanulhoque117 ปีที่แล้ว

    How to create sheets in pyrevit?

    • @AussieBIMGuru
      @AussieBIMGuru  ปีที่แล้ว

      This method gets the job done:
      www.revitapidocs.com/2020/bc9e8be3-f3fd-97c2-2709-1d6eea3db775.htm

  • @aaruparanzhu
    @aaruparanzhu 4 ปีที่แล้ว +1

    Thanks Gavin,,,

  • @borun67
    @borun67 2 ปีที่แล้ว +1

    Thanks.👃👃👃👃👃

  • @dungnguyenthanh6390
    @dungnguyenthanh6390 4 ปีที่แล้ว +1

    Hi Gavin! , How to setup Crumple on the link: github.com/aussieBIMguru/Crumple. Thanks

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว +1

      If you copy the content to your packages directory in a subfolder called 'crumple' it should work. Noting I've built Crumple in Revit 2020/Dynamo 2.3 so it may not work in earlier builds.

    • @dungnguyenthanh6390
      @dungnguyenthanh6390 4 ปีที่แล้ว +1

      @@AussieBIMGuru Thanks Gavin, your mean copy content to direction :C:\Users\Admin\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\Crumple (Unfortunately im using Revit 2019/Dynamo 1.3.3)

    • @AussieBIMGuru
      @AussieBIMGuru  4 ปีที่แล้ว

      @@dungnguyenthanh6390 i doubt my package will work in 1.3.4. I suggest using 2.0.3 build if possible.

    • @dungnguyenthanh6390
      @dungnguyenthanh6390 4 ปีที่แล้ว +1

      @@AussieBIMGuru thanks Gavin