Great tutorial, as always! Please never give up creating this kind of content, you are an inspiration for many people and help us to be better BIM Managers every day. The incalculable value you bring to the BIM community is just amazing. Thank you, Gavin!
Thanks Victor! Good to see you still find some time to check out the channel with the little one around, hope they're going well and you're all enjoying life in Barcelona.
Hello Gavin, first of all, thank you very much for all your hard work and the many videos. You're doing a great job. I have adopted your Python script from GitHub and adapted it according to your video. All results (ViewPlans_all, names_all, and selected) are output correctly. However, for rooms_out and names_out, I get two empty lists. I hope you can help me with this, as I need to create over 4000 floor plans in the coming months. Best regards, Andree
Hi Gavin - I hope you are safe and well today mate - I was just wondering how could I use python to get all the view family types in the current document? I know there is a node (OOTB) or part of Rhythmn package that does this but its a dropdown style node and id prefer if I could use it to get a list of them so I can plug it into Datashapes and allow users to specify the ViewFamilytype that is assigned to elevations / plans of room data sheet creation. Also I had a working script that did all this but thanks to the updates to the Revit API the custom packages no longer work :(
Safe and sound mate! Everything's a bit chaotic and expensive, but that's reality for all of us these days.... The easiest way to do this is with a filtered element collector in Python, like this: OUT = FilteredElementCollector(doc).OfClass(ViewFamilyType).ToElements() This is the class that stores the types: www.revitapidocs.com/2024/e0edeb6d-1627-3e3f-e386-be182a9dd8cb.htm
Hi, thanks a lot for this great tutorial! I'm aiming to get something similar but based not on one room but on few rooms, placed near one another - rooms of one apartment. They have one common parameter, let's say apartment_ID so I can imagine filtering room category to get the set of apartment rooms. But what then? Is there a way to merge polycurves to one big polycurve? Or maybe I could do something like romms to spaces, then spaces to zone then get boundary of zone? What do you think of this?
Merging polycurves is quite difficult unfortunately. The only approaches I can think of are: 1. If the apartments all neighbor one another, extrude then upwards as a solid, union them together, intersect them halfway up for the surface and get that surfaces boundary. If there is walls between, offset the curves outward slightly first 2. If the apartments are not connected, you could get the bounding box of their solids then crop by that. It wouldn't go around the room boundaries though, just the box around them. 3. Look into convex hull/alpha shapes as a method to form a shape around the corner points of the polycurves. Sparrow package has some nodes for this.
Not really, it just makes the videos a bit less boring if I just do *. Usually i begin my code with * and then limit the classes once I know what classes it needed.
Hello guys, I keep geting this message: ArgumentException: Boundary in boundary should represent one closed curve loop without self intersections, consisting of non-zero length straight lines in a plane parallel to the view plane. Parameter name: boundary at Autodesk.Revit.DB.ViewCropRegionShapeManager.SetCropShape(CurveLoopboundary) ['File "", line 60, in cropPlanView '] do you guys have an idea how to solve this?
This warning commonly relates to rooms with messier boundaries, particularly if any edges are bound through almost being closed. Check which of the rooms cause the error and that might reveal a potential cause.
Hi guys! I'm getting this warning: TargetException: Object does not match target type. at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target) at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Python.Runtime.MethodBinder.Invoke (IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, MethodInfo[] methodinfo) ['File "", line 82, in ', 'File "", line 51, in cropPlanView '] Anyone have an idea to solve this? Thanks
Great tutorial, as always! Please never give up creating this kind of content, you are an inspiration for many people and help us to be better BIM Managers every day. The incalculable value you bring to the BIM community is just amazing. Thank you, Gavin!
Thanks Victor! Good to see you still find some time to check out the channel with the little one around, hope they're going well and you're all enjoying life in Barcelona.
I like the way Gary always has an outline of the tutorial, so I am able to follow his next step, Thanks Gary!!
Glad it helped!
In every video, I learn more information about Revit Dynamo, thanks to you.
You're most welcome!
Thank you! I was just working on creating a unit layout for an apartment building then I got a notification for this video.
Hahaha
Thank you!
Great timing!
Thank you so much for your tutorials, I don't miss any videos. I learn a lot from your classes. Fantastic video as always.
You're most welcome!
Good stuff!!! 😊
Thanks!
Hello Gavin, first of all, thank you very much for all your hard work and the many videos. You're doing a great job. I have adopted your Python script from GitHub and adapted it according to your video. All results (ViewPlans_all, names_all, and selected) are output correctly. However, for rooms_out and names_out, I get two empty lists. I hope you can help me with this, as I need to create over 4000 floor plans in the coming months. Best regards, Andree
@@Andree-m5y if you take the code out of the try/except statement it will likely reveal the issue.
Hi Gavin - I hope you are safe and well today mate - I was just wondering how could I use python to get all the view family types in the current document? I know there is a node (OOTB) or part of Rhythmn package that does this but its a dropdown style node and id prefer if I could use it to get a list of them so I can plug it into Datashapes and allow users to specify the ViewFamilytype that is assigned to elevations / plans of room data sheet creation. Also I had a working script that did all this but thanks to the updates to the Revit API the custom packages no longer work :(
Safe and sound mate! Everything's a bit chaotic and expensive, but that's reality for all of us these days....
The easiest way to do this is with a filtered element collector in Python, like this:
OUT = FilteredElementCollector(doc).OfClass(ViewFamilyType).ToElements()
This is the class that stores the types:
www.revitapidocs.com/2024/e0edeb6d-1627-3e3f-e386-be182a9dd8cb.htm
Hi, thanks a lot for this great tutorial! I'm aiming to get something similar but based not on one room but on few rooms, placed near one another - rooms of one apartment. They have one common parameter, let's say apartment_ID so I can imagine filtering room category to get the set of apartment rooms. But what then? Is there a way to merge polycurves to one big polycurve? Or maybe I could do something like romms to spaces, then spaces to zone then get boundary of zone? What do you think of this?
Merging polycurves is quite difficult unfortunately. The only approaches I can think of are:
1. If the apartments all neighbor one another, extrude then upwards as a solid, union them together, intersect them halfway up for the surface and get that surfaces boundary. If there is walls between, offset the curves outward slightly first
2. If the apartments are not connected, you could get the bounding box of their solids then crop by that. It wouldn't go around the room boundaries though, just the box around them.
3. Look into convex hull/alpha shapes as a method to form a shape around the corner points of the polycurves. Sparrow package has some nodes for this.
@@AussieBIMGuru Thanks a lot, really appreciating!
Do you have this code saved in a respository somewhere?
github.com/aussieBIMguru
This is great thank you!
You're welcome!
Is there a benefit of importing everything from db rather than targeting specific classes? Just curious.
Not really, it just makes the videos a bit less boring if I just do *. Usually i begin my code with * and then limit the classes once I know what classes it needed.
Great contant ❤
Glad you think so!
Hello guys, I keep geting this message: ArgumentException: Boundary in boundary should represent one closed curve loop without self intersections, consisting of non-zero length straight lines in a plane parallel to the view plane. Parameter name: boundary at Autodesk.Revit.DB.ViewCropRegionShapeManager.SetCropShape(CurveLoopboundary) ['File "", line 60, in cropPlanView
'] do you guys have an idea how to solve this?
This warning commonly relates to rooms with messier boundaries, particularly if any edges are bound through almost being closed. Check which of the rooms cause the error and that might reveal a potential cause.
Hi guys! I'm getting this warning: TargetException: Object does not match target type.
at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Python.Runtime.MethodBinder.Invoke (IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, MethodInfo[] methodinfo)
['File "", line 82, in
',
'File "", line 51, in cropPlanView
']
Anyone have an idea to solve this?
Thanks
I'd suggest consulting the forums - easier to troubleshoot these types of warnings there vs YT commnets.