Set Revit family parameter values using Dynamo and Python!

Поділитися
Вставка
  • Опубліковано 26 лис 2024

КОМЕНТАРІ • 45

  • @JasonTian-rz3ls
    @JasonTian-rz3ls Рік тому +4

    I really like how you doing this. in Chinese we say "Guide throws the rocks on the right direction for people to build the road". you literally lights up so many possibilities for doing things for the future. such as a new way to manage all family data on excel files.

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому +2

      I love that phrase! It resonates with my goal on the channel for sure, showing people the way - lots of people go well beyond me as well too which is great to see.

  • @beldjoudidjamel5797
    @beldjoudidjamel5797 Рік тому +2

    I highly appreciate what you do and the information you share with us. I want to sincerely thank you

  • @MaciejWrzosek-o6i
    @MaciejWrzosek-o6i Рік тому +1

    Brilliant as usual!

  • @jaehoonchoi3125
    @jaehoonchoi3125 6 місяців тому

    Hello Gavin, Thank you for this tutorial. This is very helpful. At the end of the video you shortly mention situations where data types are converted in order to correctly update family values. Could you elaborate on how this can be done? I have been trying to find a way to adjust the script to work for data types other than string, but have not been successful so far.

    • @AussieBIMGuru
      @AussieBIMGuru  6 місяців тому

      The best way is to use something like Python to check the data storage type of the parameter you are going to set, and then try to convert the data you have to that type. This is very difficult to do with nodes only.
      An example of how this can be done is in my Crumple package where I have a familydoc node for setting parameters by values/names in a family document and it has code to check parameter storage types and then attempts to convert them.
      Some data is very hard to store in excel/written form, for example an element Id / element. Whilst you might want to put in a name of a material in excel for example , in Revit that material parameter is set as the element Id of that material. As a result youd need to code a way to get that name back to an Id, or store the Id in a way that you can retrieve it when returning it to Revit via excel (where it's all just text really).

    • @jaehoonchoi3125
      @jaehoonchoi3125 6 місяців тому +1

      @@AussieBIMGuru Hi Gavin, It took a while to make it work (I am new to Python) , but thanks to your tip and the codes in the Crumple node now the script works for different data types as well. Once again thank you very much!!

  • @ENK-rh8fi
    @ENK-rh8fi 10 місяців тому

    Hi Gavin,
    I've only recently started to learn Dynamo and your videos are an amazing resource. Thank you!
    Is there a way to apply a key schedule to a family parameter using dynamo?

    • @AussieBIMGuru
      @AussieBIMGuru  10 місяців тому

      Glad to hear!
      Unfortunately key schedules are only available at the project level in revit. Whilst dynamo can bend the rules sometimes, it generally cant break them.

    • @ENK-rh8fi
      @ENK-rh8fi 10 місяців тому

      @@AussieBIMGuru
      I appreciate your reply and I will mention my question has nothing to do with the contents of this video but I came across this tutorial in search for answers to my problem.
      If I may clarify my vaguely worded question...
      I should have asked if a key schedule *value* could be applied to a selection of elements (doors) within the project level using dynamo. I am hoping there's something like Element.SetParameterValueByName but a node that will accept a key schedule value element as a Value input.

    • @AussieBIMGuru
      @AussieBIMGuru  10 місяців тому

      @@ENK-rh8fi the key schedule parameter should be referenceable by name, although the value will need to be a relevant key value.
      This will likely involve going to the key schedule itself and getting visible keys, then getting the one with matching key name and setting that key as the value. A thread shows the code behind the process here:
      forum.dynamobim.com/t/assigning-values-for-the-key-name-parameter-in-a-key-schedule-parameter/96415/2

    • @ENK-rh8fi
      @ENK-rh8fi 10 місяців тому +1

      @@AussieBIMGuru, thank you for this. I really do appreciate that you took the time to help!

  • @licamus
    @licamus Рік тому +1

    Hi Gavin! Here from Argentina! Where i can find the python template? Very good videos, thanks a lot for share this content.

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому +1

      You can find it in my misc repo:
      github.com/aussieBIMguru/Misc

    • @MrsSorvad
      @MrsSorvad 5 місяців тому

      Hello @@AussieBIMGuru . Thanks for the video. It help me a lot to follow, what you show us.
      I have been looking in your 'misc repo', but I can't find the exatly text to the python script.
      Is it possible, that you can help me further to find it?
      Or maybe copy the python-text and paste it here?
      Best regards, Henriette

    • @AussieBIMGuru
      @AussieBIMGuru  5 місяців тому +1

      @@MrsSorvad github.com/aussieBIMguru/Misc/blob/master/PythonTemplate.py

    • @MrsSorvad
      @MrsSorvad 5 місяців тому +1

      @@AussieBIMGuru Thank you 🙂

  • @AzuMarcelo
    @AzuMarcelo 25 днів тому

    So, that's what i looking for, but can i set the formula field instead of the value? Actually i work editing some MEP families, many parameter families are by instance and not by type, are there a way to do it?

    • @AussieBIMGuru
      @AussieBIMGuru  21 день тому

      Generally instance parameters are not needed to be set at the family editor level as they will not be type based, but you can update their default values. I've set up a pair of scripts for getting/setting values and one for setting formulae here:
      github.com/aussieBIMguru/Crumple/tree/master/Script%20samples
      I still need to update Crumple to support Revit 2024+, but they worked in Revit 2022 and 2023 when I tested them.

  • @jephtisomosot9267
    @jephtisomosot9267 8 місяців тому

    Hi is it possible to set family parameters that are already loaded inside a revit project and not a directory path?

    • @AussieBIMGuru
      @AussieBIMGuru  8 місяців тому

      Yes you can open the family and load back into model instead. The family class and familymanager class have the needed methods in the API.

  • @sapthagirisaravanan7284
    @sapthagirisaravanan7284 Рік тому

    Can you do that Tag all elements of the linked model elements and arrange automatically...?

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому

      Too complex for me unfortunately, auto arrange requires either AI or a heavy algorithm - only evolvelab glyph has solved this to my knowledge. Generally I avoid tagging linked elements but in principle it would be a similar approach to this.

  • @paulogoveia7603
    @paulogoveia7603 Рік тому

    Hi ABG, is it possible to batch delete selected parameters (no native parameters) with this logic?

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому

      Yes there is a method for the family manager class for deleting given parameters as well.

  • @wakidoodlevlog627
    @wakidoodlevlog627 Рік тому

    Hi Gavin good day where can I download YAML editor?

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому

      I just use notepad ++ or pyCharm, both can read yaml files as comes.

  • @arekm9906
    @arekm9906 Рік тому

    Hello,
    In duct fittings is the possibility to change loss pressure method to “specific coefficient”.
    If I change this parameter below I have “Loss pressure method settings”.
    If I click this I have little new window there I can write some value.
    But I want fill this value by Dynamo calculations.
    Set parameter value is not working.
    Is it possible to fill this value by Dynamo?

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому

      I had a look on revit api docs but couldnt see anything obvious. Maybe ask revit api forums in the MEP area.

  • @wanderer4865
    @wanderer4865 8 місяців тому

    Hi Gavin, i can't seem to find the dynamo script for this video in your github, would it be possible for you to direct me to the accurate file?

    • @AussieBIMGuru
      @AussieBIMGuru  8 місяців тому +1

      Looks like I missed it... just added it then:
      github.com/aussieBIMguru/Dynamo_Scripts/blob/master/ABG_230521_Set%20parameters%20by%20excel.dyn

    • @wanderer4865
      @wanderer4865 8 місяців тому

      Tq so much, appreciate it bro@@AussieBIMGuru

    • @wanderer4865
      @wanderer4865 8 місяців тому

      @@AussieBIMGuru thanks man!

  • @MeinKanal1983
    @MeinKanal1983 Рік тому

    Hi, Many Thanks for this Video. I always have errors in the line 56 in the Video . Can you help me?! Thank You ;)

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому

      This likely means you don't have a matching family name to Excel. Cross check for case sensitivity and typos.

  • @rezwanulhoque117
    @rezwanulhoque117 Рік тому

    if we set the length parameter, how to solve it in python script?

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому

      It depends on what it's in, if it's family then the method I use here should work fine. Length may sometimes be locked for some family types such as line base families though.

  • @asifkhorrami384
    @asifkhorrami384 Рік тому

    Hi Mate
    I really appreciate your great tutorials. I am an Autocad Architecture user and planning to switch to Revit. I am not completely new to revit as we do some very small revit work as well but i am not a pro. However, i am wondering if you have a Revit template for sharing or selling. We are based in Melbourne and would like to know what you offer. Or if you have a two storey revit working drawings file that you could share I am happy to pay for it. It will be used for educational purposes only.

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому

      If your focus is volume housing (1-2 storey) I sell a template and content over on my platform, and includes a sample model:
      courses.bimguru.education/courses/template-revit-housing
      I also sell a larger scale focus template as well as developed family content packages such as doors, windows, joinery etc. You can view previews and samples in each for free. Hope that helps!

    • @asifkhorrami384
      @asifkhorrami384 Рік тому

      @@AussieBIMGuru thank you for your reply, 80% of our work is residential housings so I am wondering if you could post the link to your contents for sale, as in I would like to purchase the full template, models and contents that you have available for sale. I looked at your platform and noticed a package for sale for 300 AUD and I am wondering if this is all I need to buy or is it just one component.

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому

      Generally most customers begin with the base template but fairly quickly upgrade to full doors/windows/casework collections as they provide most options required. By default the template provides a basic content library that can deliver most volume house typologies but for more bespoke designs I recommend looking into the expanded library packs:
      courses.bimguru.education/bundles/revit-allfamilies
      You can see the individual packs in the bundle as well, depending how many you'd be interested in eventually the bundle becomes more cost beneficial. Each content pack has a sample family in the preview for review to ensure they suit your goals/needs.

    • @asifkhorrami384
      @asifkhorrami384 Рік тому

      @@AussieBIMGuru does the Housing Template (330 AUD) includes a full working drawing sample and walls, slabs and internals or is it just a model only.

    • @AussieBIMGuru
      @AussieBIMGuru  Рік тому

      @@asifkhorrami384 it contains a series of plans, elevations and sections. The plans include floor plan, RCP and slab setout. There are also wet area and kitchen elevation/plan drawings included.