👉If you want to get the source code check out my LearnRevitAPI Blog 😉 I left the link in the description so you can follow along this tutorial in a written format as well. ⌨Happy Coding! P.S. 💌 Join my Revit API Newsletter: learnrevitapi.com/newsletter
Great, it will be really handy to be able to read along in the code. Much easier for dummies like me who have to rewind, replay, repeat to figure everything out. Thanks for posting!
@@seanspence78 Yeah I try to make blog posts for all my videos with code snippets, but it's quite time consuming to write it properly. Especially on a longer videos like this. But I am working on it 💪 Coming soon 😉
You just got a new sub. I'm just starting my Revit python journey! Good job explaining everything. It's exactly what I need to start understanding how to work with Revit and Python.
🥳 Awesome, Welcome on board Sean! P.S. You will find plenty of videos that should help you on this path 😉 And check out my website, there are plenty of examples too 👀
Hi @Erik , thank you for your efforts, I fallowed your concept and code to make sections and plans for Curtainwall I glad and happy that I managed successfully to create sections and plans
Hi @Erik, very nice scrip and details explanation. I was wondering if you can showcase how we can utilise it to create Core Plans and Elevation for full height ( i mean from Foundation to till Roof elevation) and also we create plans views for deferent levels showing all walls of a core system
I think it will depend on the project a lot. People model differently, so automating this step might be not as universal because of that. Sometimes it might be easier to prepare lines manually and then turn them into sections to show full height of the building. Especially if these sections are made once and then can be reused by duplicating. My example is great for automation, because finding every single type of window in the project is too time consuming and prone to errors. So it makes perfect sense to automate. Core elevations a bit more straightforward to do manually, and too project dependant to automate. But again, depends on the standards you use in the office ;)
Hi Eric, I managed to install it on the system. but it's not showing in the toolbar. is there any other to check? but in the extension list, it's showing installed and enabled. could you please help me with this?
Did you install EF-Tutor? You can check the blog post to get the whole code and adjust it to your own needs. I think I used some shared parameters in the script that should be adjusted to your families
"Stop wasting your time..." said the guy with the 30minutes videos with a very complex knowloedge wich certainly would help me for my entire life but would take a veeeery long time to learn to do this!
I see your point, but creating hundreds of sections in each project also will take ages. But with this workflow you spend time once, and then reuse the solution over and over with ability to adjust to your own needs. Nowadays Chat GPT definitely lowers the barrier of entry in programming as it can act as a tutor and even write code for us. It's not perfect, but fixing its error often times is quicker and easier than writing from scratch. It is an advanced topic, but there is a lot of interest from Revit Users who want more from Revit. For non-coders I try to publish tools in my EF-Tools extension. There is one tool where you can click on an element and it will generate 3 sections and place them on a sheet.
For sure!! I'm here now losing this exactly time.. if i had learn all of this i could be already done.. but sadly i dont even know how to begin using programing in revit!! I need to install other program or put the scripts on revit data? Searching for this tool on internet there is only very difficult ways to do this (as yours) or rodiculous and long time ways
I showed all the steps, so now you need to adjust them to your use for other elements. Take a Pen&Paper and write down simple steps you would want to follow. 1. How do you filter your elements? (Type, Parameter value, categories...) 2. For creating sections you need Location Point and rotation Vector (The other 2 vectors are easy to calculate if Y axis is vertical ). 3. Also you need size + Offset so you only show the desired area. In case of structural elements probably width and height will be enough. Then you need to test and see if you get any exception cases. Maybe you need to address multiple parameters across different families, or something else. By this point it will be about testing more and fixing little issues you might get. But it all comes down to going through these steps 😉 Happy Coding!
Thank you very much for the wonderful material. I am a beginner in API and trying to extend the functionality of the script. Is it possible to create sections by giving them a view template of my preference?
My pleasure! Yes, any view has a property called ViewTemplateId, so you can use it to set ViewTemplate by providing its ElementId. e.g. vt = ... #Get your ViewTemplate section_view.ViewTemplateId = vt.Id P.S. Don't Forget Transaction 😉
Do you have a video on EventHandlers, parameter updaters, etc? I am looking for way to monitor parameters for 2 elements so that if a parameter of the first changes, then the parameter of the second also changes.
Yeah I realized that during editing. Check out the code snippet in the blog article here: learnrevitapi.com/blog/how-to-automate-window-sections-in-revit-api-and-python Generally, you need to invert your vectors by making them negative 😉 Scroll down to "Transform - ViewPlan" section. Also note that you would need to adjust your sectionbox so window is actually in the middle and not on the side of the view. Happy Coding!
Hey Eric, The script is looking awesome. I wanted to go a little bit deeper and to create a filter so that i can get only section views each specific window type. I just can't figure out how to do it do you have a solution or a tip to look at?
You mean that if you look at Window_A15 then you should see sections only related fto Window_A15? Because it would need a lot of filters for each window I would try not to use them. I would create some sort of script to go through views, and hide sections based on their names. e.g. if view name is py_Window_A15_Section, Then I would hide all other views that don't have Window_A15 in this view. It will require you to run this script after you create more sections, but your filters list will stay clean and neat.
I always go with sections by default when I need these kind of views. Can't remember if I even tried using Elevations with Revit API. If I remember correctly, Sections and Elevations both use the same class ViewSection. So I would imagine we just need to provide Elevation Type instead of a Section. I might be wrong, though.
@@ErikFrits thanks for the response. I've found issues with making these views as elevations because you need to place an elevation marker, tell it what side of the marker you'd like the view to come from, and rotate the marker to be parallel to the wall - a little more complicated than a section. Or am I trying to do this the wrong way 🤔
👉If you want to get the source code check out my LearnRevitAPI Blog 😉
I left the link in the description so you can follow along this tutorial in a written format as well.
⌨Happy Coding!
P.S.
💌 Join my Revit API Newsletter:
learnrevitapi.com/newsletter
Great, it will be really handy to be able to read along in the code. Much easier for dummies like me who have to rewind, replay, repeat to figure everything out. Thanks for posting!
@@seanspence78 Yeah I try to make blog posts for all my videos with code snippets, but it's quite time consuming to write it properly.
Especially on a longer videos like this.
But I am working on it 💪 Coming soon 😉
How do you get the funky image thingys after the #
@@ricardoschenk5113 I use [Win-Key + .(dot)] for prompting Windows Emoji Picker.
I edit it out so it's not so distracting ;)
Love to see it. Because it makes it more understandible. But the scripts that you make is lvl 9000 compared to my level 😂
You just got a new sub. I'm just starting my Revit python journey! Good job explaining everything. It's exactly what I need to start understanding how to work with Revit and Python.
🥳 Awesome, Welcome on board Sean!
P.S.
You will find plenty of videos that should help you on this path 😉
And check out my website, there are plenty of examples too 👀
Your videos are so well made. Respect.
Thanks, I appreciate that!
Trying my best 😉
Super Amazing Erik Hats off to you
Thanks, Appreciate that!
Hi @Erik , thank you for your efforts,
I fallowed your concept and code to make sections and plans for Curtainwall I glad and happy that I managed successfully to create sections and plans
That's awesome! Glad you managed to make all the plans and even modified for other elements!
Keep going !
Hi @Erik, very nice scrip and details explanation.
I was wondering if you can showcase how we can utilise it to create Core Plans and Elevation for full height ( i mean from Foundation to till Roof elevation) and also we create plans views for deferent levels showing all walls of a core system
I think it will depend on the project a lot. People model differently, so automating this step might be not as universal because of that.
Sometimes it might be easier to prepare lines manually and then turn them into sections to show full height of the building. Especially if these sections are made once and then can be reused by duplicating.
My example is great for automation, because finding every single type of window in the project is too time consuming and prone to errors. So it makes perfect sense to automate.
Core elevations a bit more straightforward to do manually, and too project dependant to automate. But again, depends on the standards you use in the office ;)
Hi Eric, I managed to install it on the system. but it's not showing in the toolbar. is there any other to check? but in the extension list, it's showing installed and enabled. could you please help me with this?
Did you install EF-Tutor?
You can check the blog post to get the whole code and adjust it to your own needs.
I think I used some shared parameters in the script that should be adjusted to your families
"Stop wasting your time..." said the guy with the 30minutes videos with a very complex knowloedge wich certainly would help me for my entire life but would take a veeeery long time to learn to do this!
I see your point, but creating hundreds of sections in each project also will take ages.
But with this workflow you spend time once, and then reuse the solution over and over with ability to adjust to your own needs.
Nowadays Chat GPT definitely lowers the barrier of entry in programming as it can act as a tutor and even write code for us. It's not perfect, but fixing its error often times is quicker and easier than writing from scratch.
It is an advanced topic, but there is a lot of interest from Revit Users who want more from Revit.
For non-coders I try to publish tools in my EF-Tools extension. There is one tool where you can click on an element and it will generate 3 sections and place them on a sheet.
For sure!! I'm here now losing this exactly time.. if i had learn all of this i could be already done.. but sadly i dont even know how to begin using programing in revit!! I need to install other program or put the scripts on revit data? Searching for this tool on internet there is only very difficult ways to do this (as yours) or rodiculous and long time ways
Hey! Do you think that we can use it for structural detailing? thinking in beams reinforcement. May be once a 1/3 L.? F*ck i need to learn this
I showed all the steps, so now you need to adjust them to your use for other elements.
Take a Pen&Paper and write down simple steps you would want to follow.
1. How do you filter your elements? (Type, Parameter value, categories...)
2. For creating sections you need Location Point and rotation Vector (The other 2 vectors are easy to calculate if Y axis is vertical ).
3. Also you need size + Offset so you only show the desired area. In case of structural elements probably width and height will be enough.
Then you need to test and see if you get any exception cases. Maybe you need to address multiple parameters across different families, or something else.
By this point it will be about testing more and fixing little issues you might get. But it all comes down to going through these steps 😉
Happy Coding!
Thank you very much for the wonderful material. I am a beginner in API and trying to extend the functionality of the script.
Is it possible to create sections by giving them a view template of my preference?
My pleasure!
Yes, any view has a property called ViewTemplateId, so you can use it to set ViewTemplate by providing its ElementId.
e.g.
vt = ... #Get your ViewTemplate
section_view.ViewTemplateId = vt.Id
P.S.
Don't Forget Transaction 😉
Do you have a video on EventHandlers, parameter updaters, etc?
I am looking for way to monitor parameters for 2 elements so that if a parameter of the first changes, then the parameter of the second also changes.
Not yet.
But I do have some plans to show how to make EventHandlers in Revit.
But I want ot finish many other ideas before that 😉
As we see, windows plan view created in upwards direction, but needs to create downward direction, how to do that?
I tried already, it doesn’t work.
Yeah I realized that during editing.
Check out the code snippet in the blog article here:
learnrevitapi.com/blog/how-to-automate-window-sections-in-revit-api-and-python
Generally, you need to invert your vectors by making them negative 😉
Scroll down to "Transform - ViewPlan" section.
Also note that you would need to adjust your sectionbox so window is actually in the middle and not on the side of the view.
Happy Coding!
@@ErikFrits ok thanks
Hey Eric, The script is looking awesome. I wanted to go a little bit deeper and to create a filter so that i can get only section views each specific window type. I just can't figure out how to do it do you have a solution or a tip to look at?
You mean that if you look at Window_A15 then you should see sections only related fto Window_A15?
Because it would need a lot of filters for each window I would try not to use them. I would create some sort of script to go through views, and hide sections based on their names.
e.g.
if view name is py_Window_A15_Section,
Then I would hide all other views that don't have Window_A15 in this view.
It will require you to run this script after you create more sections, but your filters list will stay clean and neat.
Any thoughts on doing this with elevation view type rather than section view type?
I always go with sections by default when I need these kind of views. Can't remember if I even tried using Elevations with Revit API.
If I remember correctly, Sections and Elevations both use the same class ViewSection. So I would imagine we just need to provide Elevation Type instead of a Section. I might be wrong, though.
@@ErikFrits thanks for the response. I've found issues with making these views as elevations because you need to place an elevation marker, tell it what side of the marker you'd like the view to come from, and rotate the marker to be parallel to the wall - a little more complicated than a section. Or am I trying to do this the wrong way 🤔
This is great
Thanks! I hope it will serve you well 😉