Тёмный

Python Basics for Revit Users: The Ultimate Beginner's Course 

Erik Frits
Подписаться 8 тыс.
Просмотров 20 тыс.
50% 1

📙 Get Free E-Book: Beginner's Guide to Revit API:
learnrevitapi.com/ebook
🎯 Interested in Learning Revit API in the fastest way possible?
Join Learn Revit API Course: learnrevitapi.com
--------------------------------------------------
🔗 Links from Video:
EF-Tools Installation Guide: • EF-Tools - Installatio...
Download RevitPythonShell: github.com/architecture-build...
--------------------------------------------------
📝 Video Summary:
Welcome to my Mini-Course that will take you on a journey of learning python programming language inside of Autodesk Revit. Python is an incredible language that can do just about anything, and learning it will make your life easier in ways you never thought possible. I will cover basics that you need to know:
You may think that this seems like a lot of information, but don't worry-I'll walk you through everything step-by-step and it will start making sense eventually if you put it to practice.
There are 3 ways to access python inside of Revit:
- python node inside of Dynamo
- pyRevit - The Best Option for making your python tools in Revit
- RevitPythonShell - Interactive shell. Ideal for debugging and learning Revit API
I will use RevitPythonShell so everybody can follow along without making your development environment.
--------------------------------------------------
🎬 Chapters:
00:00 Intro
01:00 How to use python in Revit?
02:05 Hello World script
02:45 Variables
04:20 Simple Data Types
05:20 Operators
06:35 Iterable Data Types
14:05 Type Conversion
15:45 Conditional Statements
19:35 Loops
23:45 Functions
28:25 Error Handling
30:05 Outro
30:50 Python Secret
--------------------------------------------------
⌨️ Happy Coding!
Tags: #LearnRevitAPI #RevitAPI #pyrevit

Опубликовано:

 

5 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 64   
@ErikFrits
@ErikFrits Год назад
Email Sign-Up: www.LearnRevitAPI.com/
@miguelbaztan2863
@miguelbaztan2863 2 года назад
Very nice intro video. Concise and straight to the point. I have some experience in python and experience in Revit+Dynamo, but never had the time to sit down to explore both togehter neither Revit API. Thanks for putting this together
@ErikFrits
@ErikFrits 2 года назад
The time has come 💪😁 It's my pleasure
@prasadshetty9422
@prasadshetty9422 Год назад
Thank you so much Erik for this video. I’m a beginner too. Let me start from scratch and try to implement in Precast modeling process. Later I may bother you with lot’s of queries. Please keep doing such videos. Sharing your knowledge in such platforms is not a simple thing. I always appreciate your efforts. Thanks again. ❤️ from Dubai.
@ErikFrits
@ErikFrits Год назад
🙏 Thank you Prasad! It's nice to hear how far away people still find and enjoy my videos! ⌨Happy Coding!
@RevitExperiments
@RevitExperiments Год назад
I just found you by exploring pyRevit's extensions and I'm very impressed - great content, great delivery, nicely edited videos
@ErikFrits
@ErikFrits Год назад
🙏 Thank you! Glad you liked it.
@AussieBIMGuru
@AussieBIMGuru 2 года назад
Great video Erik, so much ground covered in half an hour! Keep up the great work.
@ErikFrits
@ErikFrits 2 года назад
Thanks Gavin! To be honest I got scared once I realized how much I compressed in half an hour after editing, but I think it turned out well.
@AussieBIMGuru
@AussieBIMGuru 2 года назад
@@ErikFrits dont worry I did a 1 hour window family tutorial once!
@AliMaher-qb4zq
@AliMaher-qb4zq 6 месяцев назад
Very interesting, thanks Erik and I can't wait the course release
@ErikFrits
@ErikFrits 6 месяцев назад
Thanks ! I will be announcing Late-Bird Launch soon 😉
@harley9015
@harley9015 2 года назад
This is a great intro to Python as it applies to Revit. I especially like the comparisons to Revit for programming concepts like variables etc. This is also nicely produced with little tooltips throughout for a little expansion on some concepts. I also love the inclusion of error handling, very important to know! Can't wait for your Revit API and future videos!
@ErikFrits
@ErikFrits 2 года назад
I am glad you found so much value in it, Thanks! So far it was the most effort I put into a single video. if you don't mind asking: - Do you find it too fast-paced or is it good speed?
@harley9015
@harley9015 2 года назад
​@@ErikFrits The effort shows in the production and quality, no small feat to try and condense this topic while being concise and informative. The pace fit my needs fine, since I have a rough basic understanding of programming/python already and didn't need much time to digest the content. I'm unsure if it'd be a bit too quick for complete beginners. But I think if beginners review the video a few times, while following along with your examples and investigating the tooltips you've given, I think it should be a pretty well rounded introduction.
@ErikFrits
@ErikFrits 2 года назад
Thank you for taking your time for writing such feedback! It really helps. I agree, this was my initial idea that beginners might want to rewatch it a few times if they don't understand after watching it first time. And it should be better to watch this fast-paced video twice than watching slow-paced video once.
@zapateroz5
@zapateroz5 Год назад
Hi Erik!, Thank You very much for this amazing content, Greetings from Mexico! 😃
@ErikFrits
@ErikFrits Год назад
Hi Gilbert, Glad you liked it!
@alexd2870
@alexd2870 2 года назад
Amazing content Erik! I was always scared to explore this side of Revit because i thought coding is not my thing. But after you explained it with such a simplicity, it has changed my mind! Thank you for that! 😁 Also a small request, if you can share the steps/ helpful contents you referred to while learning the coding from scratch it'll be a great help! Thank you again! Keep making such amazing videos! 💙
@ErikFrits
@ErikFrits 2 года назад
Hi Alex, I am really glad I managed to change your mind about programming! I get this request a lot recently, I am planning to make a video about it, but I need to make RevitAPI videos I have promised first 😅 It's coming eventually!
@alexd2870
@alexd2870 2 года назад
@@ErikFrits Eagerly waiting for both of the videos! Also a small suggestion, when you're typing the scripts, the text size is quite small so it's difficult to read it from a laptop. If you can edit the video with a zoom or any other workaround, it'll be much helpful! Thank you!
@ErikFrits
@ErikFrits 2 года назад
Hi thanks for the feedback! it's really helpful to know what is not good in my videos! I try to zoom as much as possible, but since I work on 1440p monitor, there is limit until where I can zoom before it starts to lose quality. Usually I code in pyCharm and I can make my text as big as I want and luckily all next videos will be in pyCharm, so it should be better. RevitPythonShell made more sense for this video, since people don't need to setup dev environment to follow along. + Revit screen feels like home. haha :D
@arielamadorleon4282
@arielamadorleon4282 Год назад
Muy útil su video, muy práctico. Gracias por compartir su conocimiento. Éxitos
@ErikFrits
@ErikFrits Год назад
Thanks Ariel, appreciate kind words! Happy Coding!
@metalmonster86
@metalmonster86 2 года назад
Erik first of all thank you very much for these great videos, they are very clear and full of knowledge. I have tried to sign up to e-mail list but it gives me an error.
@ErikFrits
@ErikFrits 2 года назад
Thanks, I am glad that you found so much value in them! That's good to know! Explains why the counter has stopped since I updated it... 😅
@OsKaRR
@OsKaRR 2 года назад
Looks like a really informative video , are you able to compare the effort it takes to recreate the same task but in ArchiCAD.?
@ErikFrits
@ErikFrits 2 года назад
I think I have spent in total 1-2 hours in ArchiCAD just to look around at it, so I am not the right guy to answer that. Python in Revit is easy and popular thanks to people who developed RevitPythonShell and pyRevit. They made it super accessible to everyone to use python and it led to many new free tools. So I think ArchiCAD needs a person like that to make it easy to access python. Maybe it exists, but I have never heard of it.
@ahmedfadhil9682
@ahmedfadhil9682 2 года назад
Wow! Seriously I have no idea about it before until now. Interested in learning. Can you share me the installation links pls. Kudoos.
@ErikFrits
@ErikFrits 2 года назад
Even better: I have a video about it, there are links in description 😁 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-wU2tOo2VTSQ.html and don't forget to setup RevitAPI autocomplete. It's the best for writing these long lines
@Lumarez
@Lumarez Год назад
Hi Erik! Do you know if there is a code for Revit that converts a 3d model into specific templates to create plans for small projects? I'd like to try to code something that includes the information needed to print construction documents quickly and accurately but although I've searched I don't know if something like this has already been created.
@ErikFrits
@ErikFrits Год назад
I am not quite sure what do you mean by "converts a 3d model into specific templates to create plans for small projects". Could you explain that in more details?
@toannghiale8064
@toannghiale8064 Год назад
Great Video, thanks a lot. I just have one question about RevitPythonShell, can we update the IronPython 2.7.7 to 3.7? Thanks in advance.
@ErikFrits
@ErikFrits Год назад
If you install the latest version of RevitPythonShell, I believe it runs on IronPython 3.4 or higher version. You will see the exact version it uses on the top of the console, once you open it.
@phatnguyenhuu385
@phatnguyenhuu385 Год назад
which link do you download RevitPythonShell for Revit 2023?
@ErikFrits
@ErikFrits Год назад
@@phatnguyenhuu385 Use the latest release available in GitHub. I am sure it will work for all the latest versions ;)
@husamaljawhar4800
@husamaljawhar4800 Год назад
Hello again; first, when will you release the Revit python course? I cannot wait for that. Secondly, how can I call the value located in the project properties? For example, I want to make a comparison between beams in my project using python, and I want to select the shortest beam. How can I do that using the values of the beams in the properties list?
@ErikFrits
@ErikFrits Год назад
The course is taking more time than I expected and I am also busier than expected. But I still hope to deliver the course this summer. To compare your beams: First of all you would need to get all your beams with FilteredElementCollector. (I have a video how to use it on my channel) Then you would need to read a parameter value (There is a video explaining how to work with parameters as well). Then you will be able to compare your beams. If you want to compare beams between different projects you would need to get doc variable for each project, and then get beams from them. You can get all open documents using app.Documents Hope it helps, Happy Coding!
@husamaljawhar4800
@husamaljawhar4800 Год назад
@@ErikFrits Thanks you so much. You are the best.
@ghassenmhmh7988
@ghassenmhmh7988 Год назад
first , i want to thank u for what tou are giving to the community
@ErikFrits
@ErikFrits Год назад
Glad it's appreciated! You can place script.dyn files instead of script.py and I believe it will run as a Dynamo Player, so if your Dynamo script works it should work well when you run it with pyRevit. I have not tried it myself Regarding RevitPythonShell. There is somewhere __init__ or __start__ file that loads up a bunch of stuff and also prepares variables such as doc, uidoc and so on... You can also modify it if you want to include your own functions to be there by default. Click on Configure button included with PythonShell and you will be able to find a filepath there. Syntax is similar to pyRevit.
@ghassenmhmh7988
@ghassenmhmh7988 Год назад
@@ErikFrits thanks Erik , i will try it there is really people whant to learn here , we need people like you thanks so much , best of luck dude ❤
@ErikFrits
@ErikFrits Год назад
@@ghassenmhmh7988 Thanks man! Glad my content is useful in your learning journey. I know how frustrating it can be to learn on your own when resources are limited! Happy Coding!
@husamaljawhar4800
@husamaljawhar4800 Год назад
Hi Erik, how can I connect the Revit python shell with my extension which I made in Pycharm? For example, if I code by using RevitPythonShell to call all walls area in my building and I found this function is very important so I decided to add this function inside my extinction tools. How can I do that?
@ErikFrits
@ErikFrits Год назад
RevitPythonShell and pyRevit are not connected. You will need to place your code in script.py file inside of your extension. Watch this video to understand pyRevit extensions better: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-K-A3AG0Z8H4.html
@husamaljawhar4800
@husamaljawhar4800 Год назад
@@ErikFrits thanks😍
@alessandrocasalicchio8996
@alessandrocasalicchio8996 2 года назад
Hi Erik, do you think about making a video about pithon + civil3D? Thank you
@ErikFrits
@ErikFrits 2 года назад
Unfortunately, not in the near future. I have never used Civil 3D, but I get this question a lot, so I might give it a try eventually. For now, I want to focus on areas where I am good and can actually teach useful things.
@alessandrocasalicchio8996
@alessandrocasalicchio8996 2 года назад
@@ErikFrits ok thank you. In my opinion programming in python for Revit or civil3D it's a bit difficult not so much for python but because you need to know API and what they can do. For Revit, API functions are much more widespread, instead it is not so for civil3d
@ErikFrits
@ErikFrits 2 года назад
I agree, API can be overwhelming especially in the beginnning with all those long lines. But over time you start to see patterns how it works, and it becomes easier with every tool to find the right methods and properties. Now I can make some tools under an hour because I can copy 80-90% of the code from my previous tools.
@rafaybukhari8525
@rafaybukhari8525 Год назад
It would be very appreciated if you make the files for codes that you have typed.
@ErikFrits
@ErikFrits Год назад
Noted. I need to have a look if I haven't lost them yet.
@willlywillly
@willlywillly Год назад
Have you made the full revit api plus python course yet? How do I support you? Thanks!
@ErikFrits
@ErikFrits Год назад
Hi Ken, Unfortunately not yet. A lot of things got in a way, and I am still waiting for the day to continue editing and recording... I should have more free time soon to focus on it 😉
@willlywillly
@willlywillly Год назад
@@ErikFrits 👍🏼👍🏼👍🏼
@ErikFrits
@ErikFrits Год назад
Sorry I missed the part about supporting, I started answering first part right away😅 I have pages on Ko-Fi and Patreon, there are links in the description
@willlywillly
@willlywillly Год назад
@@ErikFrits I sent you an email. Didn't know if you got it. Thanks my friend!
@ErikFrits
@ErikFrits Год назад
​@@willlywillly Just found it in the Spam folder. Thanks for letting me know, I will read it
@titomoura7014
@titomoura7014 6 месяцев назад
I know it is a very basic question. But I couldn't install it porperly. What I've done wrongly?
@ErikFrits
@ErikFrits 6 месяцев назад
Could you give me more context where you got stuck? Do you mean Revit Python Shell?
@titomoura7014
@titomoura7014 6 месяцев назад
@ErikFrits Thank you for replying. I've installed the file named "Installer for Autodesk Revit 2022" and I couldn't get the python symbol on the add.
@ErikFrits
@ErikFrits 6 месяцев назад
Can you try installing the latest release (2.0.2). I think since then it was modified to suit all Revit version with a single installer. Try This Link: github.com/architecture-building-systems/revitpythonshell/releases/tag/2.0.2
@titomoura7014
@titomoura7014 6 месяцев назад
@ErikFrits Thank you so much Erik. I appreciate that.
Далее
Tips for Getting Started with the Revit API + Python
15:19
Python for Revit: python, RPS, RPW, and pyRevit
22:52
Revit API: Master the Basics!
2:14:34
Просмотров 2,8 тыс.
Making a pyRevit toolbar!
22:17
Просмотров 15 тыс.
Unlocking the power of pyRevit! (Webinar)
49:38
Просмотров 8 тыс.
What is Dynamo and Why Should you Learn it
8:39
Просмотров 146 тыс.