Duct support placement using Dynamo!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] good either you're watching the Aussie boom guru and today we're going to cover how to place duck supports using dynamo automatically so I'd like to thank Dennis for his question he queried me this quite a while ago and I've been working on the workflow on the background here in there so I really appreciate that request and I've solved your problem so I've got another video that I released previously to this one where actually build the Uni stripe family itself that's going to support the doct so I recommend that you watch this one first because it's a good tutorial in family creation we build a line based family so essentially this is the family we're going to place using dynamo and we're going to set its parameters as well so it looks a little bit like this so essentially it's going to fix itself to the underside of the slab which in this case is going to come from a linked model and it's going to sit just under the duct that it supports so the goal is a little bit like this this is essentially what we're going to achieve today so we're going to be able to select any element within a duct run and support the entire system and this is the goal so we're going to select the duct get its system get the ducts in that system and then only obtain the ones about the length that we're determined or more to filter out all the little sort of Dickie ducts there's no matter when they go to determine the spacing rule and distribute our families along the runs of that duct and then set their emitters for their higher so it's quite a complex workflow to probably take over a while but I think it'll be a valuable lesson in dynamo for MEP users and I know I haven't done too much MEP content yet so hopefully this will help sort of bring more workflows to your companies so I'm going to be using three custom nodes today one is the the duct systems all elements in network node from MEP over the family instance by curve to place the line based family from clockwork and then the ninki element by rebounds from by morph in order to form the slab above the support and ideally um I'm using two point 0.3 but if you use a similar work version to that it should be should be pretty much the same workflow so without further ado left as you jump into the model so at the moment I'm operating in the Autodesk sample project the MA advanced sample project so the mechanical model and I've linked in the structural model and positioned it so that it's it's roughly on top of where it needs to be in the model you can see at the moment I've actually just left a few supports I just placed just to show you that this workflow will achieve this it's not perfect it will clash with some elements like this isn't going to detect things like corner junctions and how to rationalize them so there's still some work from the user required after it won't detect things like pipes that might clash with this once that place but what it will do is it will read the structural model and it will stop the support under beams and slabs at the very least so it's still quite powerful so I'm just going to go and delete all of these so what we'll do is we'll just open up dynamo and we'll start a new script so I'm just going to run in automatic mode initially and then we'll go to manual mode once we start placing families this way we can see our duct geometry updating live in dynamo so the first thing we need to do is we need to select a duct so we're going to do select model element and we'll just pick a duct that's on the run that we want to analyze so now we have that that model element and we're gonna get a parameter value by name because we want to find out the system that it's in so we'll do get parameter value by name and the parameter that you'll be looking for is called system name I can't actually get the system itself as an element from what I've seen you can get the name and then we can do a comparison to all the systems in the project so now you can see this is a part of mechanical supply air21 so obviously your ducts need to be in the system that is one shortcoming of the workflow if you're not putting your ducts into systems workflow it's not going to work from what I understand this is a best practice anyway so we're gonna do a category bar name and the name we're looking for is going to be duct systems this duct systems also exists as elements in Revit and anima and we'll get all elements of category if you're in a project with a lot of duct systems it might take a little while to extract all of these these systems I think there's about 50 in this project 45 you see now we have all our mechanical systems so what we want to do now is get their name so we're gonna use the element name node and get the name of the element and we can use this to compare where this element occurs and then extract the respective actual dock system so you can see now we've got all these names so we're looking for mechanical supply air21 in this case this is that index 18 in the list so we're going to use index of so in this list where does this name occur and you can see that we'll get the index of 18 and what we can do is combine this where they get item index node and from our system elements we can get the respective element that has that name and we should get our mechanical system that we can proceed with and now we're going to use our first custom node so we're going to get duct duct system or elements and we want to find all elements in network from MEP over and essentially this will give us every piece that belongs to mechanical air system 21 including the thing that we selected so now we can actually filter these down so what we'll do is just create a little block for this area this is really just the first step so we'll just call this get system it's a pretty big script so it's good to sort of start blocking off these little areas in your scripts what am I do is just expand this just to get myself a bit more room in my canvas okay so that's the first step the next thing we need to do is only get the ducts in the network because we'll have a lot of other elements in here we don't want my flexi ducts and elbow radiuses and all sorts of things that we don't want we just want the ducts because they're the major elements of Irun so we're gonna in this case get the category of all of these elements so we're gonna do get element category and what we want to do is turn this into a string objects this way we can compare it through the word ducts and now we're going to check if it equals we're getting equals node and we'll say we've put all these categories here at the moment and we're looking for ducts only and as you can guess we're gonna be using a filter by boolean moss in order to filter down to just our ducts a pretty common workflow on my channel if you're on if you're familiar with my videos so from all our elements in our network based on this mask of equals will break down elements and only proceed with the ducts in our network so very convenient so again this is sort of like another little step in the workflow so just call this filter ducts okay so at the moment we want to proceed with our in list which is all about dots so an interesting thing in Revit is that a lot of elements have a special behavior when you feed a location node into them so sometimes a family might have a point at its location but line based elements or run based elements will typically have a curve as their location and ducts are one of those elements so we're going to go at element get location and we need to get the existing elements location and what we'll end up with is wind up with a whole set of lines that actually represent the run of the duct itself - all the connectors so we can actually proceed with this as our method to find out the spacing of our hangers so at this point maybe you know exactly how to solve the problem but if you don't stick around and I'm going to show you how we actually practice down into into runs okay so what we're gonna do is just jump back into dynamo and we're gonna check the length of each of these runs because we only want to really consider that the larger runs so we don't really need to place hangers on say these little extensions here because they're going to be supported off the main run anyway we're really just concerned with these main primary runs okay so at this point we need to check the curve length and you can sort of assess pretty much what lengths you're really caring about in this scenario so we can see we only really want in this case to deal with this one this one and this one so at this point really it's anything over about 700 that we care about in this case so we need to set a threshold for what we need to deal with so we're going to use a greater than mask and we're going to check if the curve length is greater than a so I'm just gonna get a number slider so numbers and we'll just set the minimum threshold at say 500 and the maximum to a lot at 5,000 or something like that and we'll just jump up in increments of a hundred that way the user can say I only are many interested in increments that deal with anything over 700 so in this case we'll get a true/false list which again we can just use a boolean mask on so this is quite an important number we'll just call this on threshold or length and you can move this off to the side because it's a pretty important control if you like you can put it in a in a little group so people can see that it's important but what we want to do now is get some boolean masks so filter by boolean mask and we're gonna filter two things we're gonna filter the locations and what we'll do is just turn off these previews as we go so I'll turn off this this node and then we're also going to filter our elements as well so we're gonna proceed with our ducts and their locations only if their length is greater than 700 if that makes sense so we'll just rearrange these a little bit clean up the script as we go though okay so at this point we can just proceed with the ducts from our in list and you'll see that we'll only have three now so three locations three dots so what we're going to need to do now is determine the spacing of the supports along these lines based on their length so what we'll do is just take a curve length and we're just gonna get the length of the curves that we're dealing with we're going to build a code block at this point so there's going to be a few variables we need so we need a number for our maximum spacing between each support and we'll just call this max spacing so let's say we're gonna work at the maximum spacing of a meter and then as well as that we'll also just get a number slider to insert the supports from the start and the end of the duct system because we don't want to put them right on the end of the duct we want to put them sort of inset so they can actually sit under the dots so they start and insert and for this one we'll just say it's between zero to 200 with an increment of ten and we'll just say by default we want inset by a hundred from either end so I'm just gonna build a code block at this point in order to determine some aspects that we need so I'll just create a code block so I'm gonna just say that the length we're dealing with is the full length so I'll just defined a variable called F learn full length - the insert and what I can do now is fit in my insert and I can also feed in my full length and we'll end up with a list that is though that that shorter length we're dealing with what we want to do now is figure out how many spacings we need to include along a doctrine so we're gonna do this length that we've created / max spacing and then we're gonna check the required count so we're going to do ds4 we're gonna do we're gonna get the ceiling because we want to round off in the case that we end up with say 0 supports and we're gonna do count plus 1 for our required count that way we always end up with at least two supports along our run one at the end one at the start and then in fill between from there we just say that spacing or the distance between each support must be the length over the required so in this case I need to include a couple of other variables I think I need to do divider and then our max spacing okay so now we can see in each one we know the spacing between each respective element so this allows us to go and create hangers along this point so I'm gonna do another formula now which is to determine each parameter along that for each length along that curve that a spacing is going to be placed up so I need another code block here and all I'm going to do is create a range so I'm gonna say that I started my insert because I'm sitting in word of the start of my curve and then my count applies my spacing and I want the number of increments between based on my count so essentially at this point I can say that I'm starting at my insert and then I'm taking my account and my spacing so in this case my count and my spacing what we should end up with is sub-lists with every single point along the run where support needs to be placed or a length at that point so this part is really critical because now we're going to really use this to process the curves of the ducts based on their domain so what we'll do here and a happy for you to leave comments and ask questions about this part because it is quite complicated and it is a formula that I had to spend a bit of time determining feel free to just copy it if you're not that interested in it I don't recommend that you spend some time thinking about these formulas I talk about them for longer but I think it's probably not the focus of the video okay and what we can do now is actually change some of these variables and you'll see that they'll they'll change and respect to these parameters let's say our maximum spacing is 2000 so now we need less supports but we always end up with at least one at the start and one at the end because of the way that we've processed our count okay so now we're gonna go and create the points along that doctor to place these elements out so the first thing we're going to do is do a curve point at the segment link because we have our segment lengths and we have our curves so these are our segment links and then our curves are back here so we need to go and extrapolate these values so we'll take our curves and then we'll get that points and now you can see we've broken up our curves into these respective points so then we know where we're going to place these elements which is great but now we also need to just figure out the normal at these points so we want to find out the 90-degree Direction add it to these points because we want to create a line that is moved either side of the ducts in order to place our line based family so we're gonna do curve parameter at point to find out the domain of that along each curve hmm there we go yeah want to add these points on these curves what is our parameter and the reason we're doing that is because we want to get the normal parameter so now you can see we've got the parameter between zero and one along the curves domain now we want to get a normal app parameter and we're going to say that the parameter is this and the curve is back here again and now we have a vector for each of those points along that that curve so we can really quickly set up our hangers now which is great so we're gonna create the line that represents our hanger and in order to do this we're going to use to geometry translation notes so I'm going to do jomi geometry translate I'm going to translate by direction and distance am I going to be translating the points by the vectors so in this case we'll be moving in this direction and we're going to move them in two different directions so we're gonna create to translate notes and what we're going to use to control the direction is actually the distance in this case so I'm gonna get a number slider and this is going to be the the width of the support so let's say our minimum is 600 now maximum is 1500 and we'll just work in increments of 100 let's say about default we'll just do 1000 as I support width so what I'll do here is just build a little code block because we want to find out half off the width so we can move half in one direction and then we want to find negative half the width so we can move in the opposite direction by half so the overall we move to form a total of a thousand from the our starting point all the exons for you and X on negative two and now we should get two values that we can fade in so we can feed in X 1 2 and X 1 negative 2 and now you see we have points that are moved up in either direction by half of their total bits so as we increase and decrease this you'll see that these change in size okay that's pretty easy and then we need to just create a line by start point end point so we'll go buy a stop point end point and there we go so now we have the line for our support hangers essentially so that's really the placement method for these now determined so that's quite straightforward what I might do is just go back and hide some of my geometry just because it's getting a little bit messy so hide these I'll keep these lines here for now I might hide the points I just leave the lines on for our placement cool so if I go back into Revit I think we should be able to see these lines as preview potentially maybe not sometimes I find that preview lines don't show often sometimes they do it looks like in this case it's it is showing it that our they're occurring along the doctrine so you can see that now we've got a method for placing the challenge now is we need to know the height of the support and the height of the fixing to the slope above so this bits a little bit harder so what I might do is just create a big group here for this that's creepy actually just hold up find support curves okay what we're gonna do is go back a step and we're gonna go back and figure out the levels and the heights that we're dealing with so we're gonna get all the way back here to my minimum length filter and what we'll do is just build a code block again and we're going to take our ducts as a variable actually we'll just refer to it in the formula so we're gonna say that our list of ducts is PS for lists I'm just gonna flatten our list this sorry dot list dot button and we're gonna flatten ducks list so we'll take that and now we should get just a list of our ducks in our run and we'll just turn that we'll take the first item using square bracket and 0 square bracket closed just to get one duck to find out the level that we're dealing with and what we're gonna do is look for two parameter values so we'll do is get parameter value by name and we're gonna get two things so we're gonna get two parameters one of them will be of our duck list and one will be of the first act so the first parameter we're looking at is the bottom elevation of every duct in that run so if I just go into rabbit we're looking for the bottom elevation of our duct which is automatically determined in Revit and then on top of that we're gonna look at the reference level as well for our first doctor in our system just to find out the level that we're placing all of our Unni struts up so we're gonna just call out to from their names here we're gonna do bottom elevation and we're gonna do reference level okay so of all of our ducks we want to get their bottom elevation so now we have those numbers and then we want to also get the reference level of the first Ducks as an element what I'll do is just minimize this way and what we're gonna do here is just we're gonna round these because you can see they're not very friendly numbers at the moment so it's better that we just round them off so we're gonna apply a just a standard rounding function to go to the nearest whole number cool because we don't want to set up parameters with all those ugly decimal points we're gonna do here is take our level I'm gonna get its elevation I want to find out how high this is and then we're gonna round that as well so we'll take her round and cuz this one comes out quite on precise as well there you go it was seventy three hundred is a lot of our level itself okay so this point we've sort of processed levels so we'll just move this off and just create a group for it it's good various levels so now we need to go ahead and what we're going to do is actually figure out the slab above each of our points I believe that's probably the next best step to do yes it is so we're going to do what's called a ray bounce in order to do this so essentially it's going to it's going to shoot off the line and it's going to give you the first lint element that it finds so that's quite an interesting you know it's run by morph nodes package it's quite an effective node so we're going to do element y ray down so what it's asking for is it's asking for an origin of the Ray a direction and a view so that's pretty easy the view is quite easy it's just current document and active view so we'll get current document and we'll get active view off current document okay so you would want to be in a 3d view when you run the script that's one limitation of this I guess you could specify a 3d view that you're not in but I've just yeah the view mm-hmm so our our direction is just gonna be the Zed vector so we're going straight up and our origin in this case is going to be the points of our supports so what we need to do is just go and find go and find those points back here cool and now we should get a link to element where it hits an element so in this case you can see that we're actually hitting the slabs I believe so you can see we have a link element floor in some cases we actually hit a beam so you can see here we've got a beam so what we want to do now is find out the height of where this occurs and luckily we just get a point where this occurs in each case so very straightforward but the way that we need to process these points is quite unique so what I'm going to do is just create another code block and I'm just going to get the first point of each of those lists because what happens is the first point represents the starting point and the second point represents the clash point so we want to get that second point so we're going to say that points equals ds4 and we'll just list I'm going to still get bottom that index and we're gonna take the lists of clashes level two and we're going to get the fight the index of one of each of those so from our class points so we only get one point for each element rather than two but you'll see in each of these sub lists that there's two points so you want that second point what we want to do with that point is get at Z value find out how high it is so we're gonna say that the Z value is points dot Zed and that function will just give you the Z value what should don't capital P the lowercase P there we go now we can see we've got that we want to round this as well so we news n Mele rounded equals es for now rounds and we'll just round off I've set values there you go so now they're rounded and then the last thing we'll do is we just say what is the fixing height and it must be the rounded value minus the height of our levels so what we need to do now is just go find that elevation of our levels and feed that in now you can see we have our fixing right off from the level itself so you'll see most of the time it's the same number you can see one exception we have is where it's hitting a beam sort of slightly law so at the moment we now have the parameter for our fixing height which we can set into our part line based family after we place it because if you remember my family tutorial there's two parameters there's a parameter that sets the base height and then the fixing height so we've got one of them so we're almost there it's pretty close thanks for anyone that I'm around this long it's a pretty big workflow so we'll just call this rate great bounce for support it takes like cool and then I think we're almost there the last thing we need to do is get the support height so in this case this one's quite easy because we already have support hive technically so we know we know the bottom of each duct run but what we need to do is replicate this number for each support so that we can set the parameter at the equal listed size when we get to the end so there's a few ways to do it the way I'm going to do it is quite abstract I guess what I'm going to do is count the number of supports on H duct so from level 2 we're going to go on count the number of lines that we're dealing with so that we get three counts we have five supports two supports and 6 respectively what I'm just gonna do is I'm gonna feed this into a list of repeated items function I'm gonna feed it over a list of this combined function and I'll show you why in a sec so we'll get this combined so we want to repeat the elevation so this is our combination function and then we're gonna be feeding in our count as our amount and for our items we're gonna be getting them from elevation so the way that this combined is going to work is it's gonna say for each of these items apply this function at the same level as each of these counts so we end up with essentially a list that is matching the number of supports with the number of heights that we need so quite an efficient little function and then we just flatten this at the end just to get all of the values of each of those supports respectively okay so we've got our two list of parameters to deal with at this point we've got that and we've also got offset supports and so all we need to do now is actually place the family and then set its parameters so we're gonna get our family instance by curve from clockwork almost there in the instance by curve there we go so what we need is the curves and then we need the family and we need the level so the level is quite easy we can just go back and extract that from level that we got back here that's our placement now we are gonna apply this with a longest lacing as well because we're only gonna be feeding in two single variables for a list of variables here I'm just gonna go to manual mode as well so now we need to get our family types and when you need to get your unis strap or your support family in this case I'll go and find my way you nice drop connect that in and then all we need now is our curves so if I ran this at this point the fixing and the support height wouldn't be set so what we need to do is actually take these families after their place and we set two of their parameters as well as part of the same script so I'll just do a set parameter by name and we're gonna take this family instance I'm going to set three different parameters okay so the values are going to be a fixing point in our support higher so we've got our support height and we've got our fixing height and then our three parameters are going to be support pipe and fixing height because that's what I named them in my family so I support my fixing height and then I'll just quickly show you the parameters so we're gonna be setting these three parameters here fixing height and support foot which essentially control the base of the unis strut support and the fixing height itself and we're gonna place them there family give it the line based family so it's basically determined by that curve so let's go I think I think we're ready to press the magic button and hopefully it all works so I'll do a save and I'll just minimize this window just so you can see the placement so let's hit the magic button run cool it worked so you can see there that this has determined the beam and it's placed it's fixing height and a support height so you can see here fixing hard and support height they've been set its curve has been set based on the support but it's level has determined its placement on it and that's pretty much it so what I might do is just quickly go to another another system somewhere in this in this view and just run it again just to show you that the script is quite flexible what I might do is just tap select a system do a section box and now we can we can work with this I'll just raise my section books as well so you can see the floor above okay so what I'll do is I'll just close the scripts and reopen it to refresh all the inputs you could run this through dynamo player I'm just gonna run it through dynamo in this case and the only variable will actually have to change here is a duct and which system it belongs to so I'll just do that run and there you go it's done the whole system it's found all the ducts I'm so pretty powerful and really flexible so hopefully that helps other people in learning more about how to interpret mechanical elements and also how to place families based on this so there we go so thanks for the request Dennis hopefully the workflow makes sense so thanks for watching today I look forward to sharing some other MEP based workflows in future whilst I'm not an engineer I do have an understanding of how they work so if you ever have requests or any feedback or comments feel free to leave it down below and there will be some more workflows coming in future because I do know a lot of my fans are actually um engineers as well so thanks for watching today I make videos two times a week so if you're not already following and subscribing feel free to do so so you can stay up to date I don't know if they'll see you in the next video thanks take care you
Info
Channel: Aussie BIM Guru
Views: 10,782
Rating: 4.949791 out of 5
Keywords: aussie, bim, guru, cad, revit, dynamo, computational, tutorial, demonstration, how to, educational, mep, mechanical, duct, services, unistrut, support, hanger, dropper
Id: szZF-N7R27k
Channel Id: undefined
Length: 31min 46sec (1906 seconds)
Published: Wed Dec 18 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.