Example python node needed

Hi everybody.
I would love to learn IronPython/CPython3, and i guess a good place to start, would be some sort of “example” python node, that i could work from; improve, change…
I can’t find anything in the Primer, so if you could point me to a ressource, or just supply me with a small stupid script. Basically something gathering data from gathered model elements, or the like. Then i could play around with lists in Python, filtering and separating in different output channels. Possibilities are endless, you know :slight_smile:

I’ve only experienced great help from this community, and i hope one day to be skilled enough to give back. Until then…-help a brother out!

Cheers
Tue

The site below has a course hosted by @john_pierson called Dynamo for Revit. Covers quite a few areas. Also, provides a good startup template to use when creating your own python script. I am sure there are quite a few other tutorials out there as well!

2 Likes
2 Likes

I love John’s writings on Twitt*, oh, “X”, and admire his work. The course you’re linking to is a paid course, $100, and i’m sorry to say i haven’t got that kind of money.
Thanks for the help, anyway.
T

1 Like

Business expense. LOL!

2 Likes

I also wanted to make sure to share this class from AU

While it wasn’t recorded the handout and presentation is helpful.

And I do have quite a few Python samples on GitHub as well:

4 Likes

4 Likes

I am on this journey now- I dont know how much python you already know outside of Dynamo and Revit? Because working with Python inside Dynamo and Revit is a bit more involved in some ways and simpler in others.

As for scripts, any nodes written in Python in custom packages can be opened and inspected. As well, Sol Amours Github has a lot of example python scripts.

If you already know how to write “if” and “elif”, how to write foreloops, how to set and work with variables and lists- then I would suggest looking at the AussieBIMgurus youtube, he has a playlist for getting into the Revit API. He has a good python playlist as well, but for me I needed to augment that learning with some Coursera work before I was ready to start knocking out forloops.

It has also helped me a lot to work thoroughly with Dynamo before getting into python- it was a way to kind of learn some methods and properties without realizing I was learning them- and then when I get into python… its basically the same, you just have to add wrapping, unwrapping, and boilerplate stuff.

2 Likes

Just a quick note on the fly; as always, i’m flabbergasted over the amount of support from this community. Thank you all so much. When i find the time, i’ll be scrounging all your nice links and ressources. Until then: thank you!
Have a nice evening.

2 Likes

The beauty of this community is that anyone who’s willing to put in just a little bit of effort will get a boost of exponential growth with the community as a whole. :smiley:

1 Like

I didn’t know the Primer had theses chapters, they are great! -Had i known, I wouldnt have needed to disturb you guys here. I’m already succesfull on my first script, adding two numbers via code, that feels so great.
Looking forward to Jakobs Dynamo-after-hours tomorrow, C# is pretty next level for me, so i’m keen to study.
Again, thank you all so much!

2 Likes