My goal is to have our King Stud family that gets loaded from our server into an architecture file and placed at each door in the project. I need it to match the door width, match the floor to floor height and match the rotation of the wall/door that it is placed around.
I have been able to piece together enough code to get my program to work, but am stuck on the last two items. I have managed to load the family, query the doors, apply the location and the width. I can’t figure out how to tackle the rotation and the Level to Level (by instance) problem.
If you can select one of the faces of the door panel you can get its normal. You will need to add vector to your frame (whether it be in the family or dynamo) in the direction someone would walk through it. Then measure the angle between the door panel normal and the vector. That will give you the rotation angle.
However you add the vector to your frame you can do the same to the door instead of finding the panels normal.
You could also draw a line or vector (in dynamo) from king-stud to king-stud and door jam to door jam and measure the angle of those to lines.
Hope this helps
So, I have been able to grab the location of the doors, insert my family at that location, grab the door width, grab the door rotation, but I can not correlate the lists so that the same location also matches the width and rotation. Instead I get random application of my found parameters to the new families. I think it’s related to list combinations, but can’t sort it.
Elements to correlate:
Door location (x,y,z) - (master)
Wall thickness at door location
So the width of your frame is not matching the width of the door? Have you manipulated the lists of the door locations after you place the frame?
Well I rewrote the program from scratch and got everything except height to work this time. However, I have two issues that arise from messing with the model a bit.
- Curtain wall doors mess with Dynamo and cause an error. My small test project doesn’t get affected, but a larger file crashed. I assume due to this. I need to see if I can eliminate Curtain wall doors from the list of doors.
- Modifying the walls connected in my test model doesn’t affect the performance, but adding a new unconnected wall messes with the rotation portion of the program. It’s only for non-orthagonal walls with a door that Dynamo does something odd. Thoughts?
King Studs arch King Studs to Doors
Try looking at this post. He was not able to get it 100% of the way there but seems like it might help you.
To filter out the curtain wall doors get the element names of all door search the list to see if it contains “Curtain” (or something in the name) and run that and the list of doors trough a boolean mask
Thanks, I think I can figure out the curtain wall portion. Not sure what you were linking as reference. It might help.
David-I’m after the EXACT same thing! Not sure if you ended up figuring this thing out. If not, I’m going to continue working through what I’ve got and see if I can’t get the rotation to work. I’ll post a graph if I’m successful! Are you working for a GC? Drywall/Framer?
I’ve got OTB door families loaded but for some reason it’s not pulling the Width parameter? Any thoughts? I switch to walls and am able to grab the length.
I’m not sure why but Element.GetParameterValueByName wasn’t working. Element.Type worked. Things like this make NO SENSE to me. The only reason I tried Element.Type was by browsing through the forums. What’s the best way to understand things like this? Is it based on updates from Dynamo?
For whatever reason this graph only places one instance of the King Stud family. It’s pulling the location of all three doors. Why is it not placing at all three locations? The rotation I’ve yet to really dig into…
Thanks in advance!
If your looking to change family on the same location then try standard OOTB nodes, it does the job.
Thanks KulKul. That’s not exactly what I’m after. I’m scratching my head right now for multiple reasons.
1.) Why am I picking up (3) doors locations, but when I try to place the designated family it’s only placing at one location?
2.) Why is the OOTB Element.GetParameterValueByName not working for me? I had to add Element.Type prior to Element.GetParameterValueByName?
Changing Lacing from shortest to longest solved my problem for placing all instances rather than a single instance. Now to figure out the rotation…
So I’m using the FamilyInstance.FacingOrientation node to find the orientation of the doors but not sure what to do once obtaining that information.
You just need to search on Dynamo online package search. Type Element.GetRotation.
KulKul-Thanks! Stupid question I know…I’m still fairly new to Dynamo.
I’m close. It looks like Walls that are running at a 90 degree angle work, but angled I’m having an issue… thoughts?
Taking 360 from the rotation value seems to get me what I want. Any idea why that’s required?
This is probably the way the doors were modeled compared to the frame. If the door is flipped does it put it in at the right rotation?