Adding User Interfaces to Dynamo Scripts (Presentation + Demo)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
get out there you're watching the odds of him guru and today I'm gonna be talking about dynamite user interfaces it's actually a presentation that I've done in person had a user group in my hometown of Sydney but I thought I'd put a version of enough of my channel as well because it's quite an educational so today I'll sort of skip over most of the stuff about me because that's not as relevant to YouTube but I'll be focusing mostly on dynamo a dynamo player and a custom package called data shapes which is the emphasis of the presentation and ultimately how this can be done notice what and why a lot of presentations talk too much about things and don't show them in action I actually show these people videos of what I do and I'll also put this in the presentation here as well so walking the walk anyway just quickly about me so my name is Gavin and I'm an architectural a focus bin manager I'm actually trained with a master's and I've been working for about eight years now we need in the industry and I've been attending this user group for about a year now and also my youtube channel which you're watching right now we're focusing on dynamo today so I guess most of you probably know what dynamo is for those of you that don't it's an open source tool which uses visual coding in order to script and relate back to BIM software such as Revit so it's quite powerful because it really lowers the entry point of coding for us it's in in Revit it's on the manage tab just where it's highlighted here typically unless you're in an earlier version so graphical programming or visual scripting or visual coding is basically an easier way to code for people that aren't familiar with coding environments so you can see on the on the left here there's a a c function i believe that is and most of that doesn't really make that much sense to me i'm even if it is telling me that time is the best teacher hardy-har-har funny funny but really i don't have the time to learn that ironically but on the right you can see a program called scratch which is a form of visual coding so you have a lot of prompts and ways of seeing how your code is working and it's very word and visual based versus the coding environment where everything is some syntax based if I make one space in the wrong spot code doesn't work which is a big problem for is this is this is literally a program that I know people as young as three are learning in in little technical mini schools now so it's a brilliant way to bring people into the world of coding and probably take our jobs in the long run as well so why do we use dynamo so it's accessible to all Revit users it's it's free and it comes of Revit so there's no excuse not to use it it'll save you a lot of time and it'll make you much more efficient and it will standardize your workflow so scripts will force things to run in particular ways and it does support Python coding so if you know Python and that will help and it's fun most of the time occasionally things don't work there's bugs you know typical scripting issues but far less than the frustration point of the harder language to learn such as c-sharp so I guess you know here's me computational designer here's everyone else and they're running the square wheels so a lot of people I see don't have the time for dynamo but ironically they spend a lot of time doing things in very unintelligent ways which actually wastes their time so they're busy being busy and they could actually save more time they were just a little bit less busy for a little while not leaving at 5:30 probably so so don't be these guys try to try to keep up with the way the software is moving if you're using software and this is a I think it's a C a c-sharp c-sharp scripting or C++ script and Visual Studio you can see it's very intense it's very hard to learn how to script just by looking at that so most people would look at that if they're learning to code and they'd say no not interested and off they go so it's really important to make sure that you don't scale uses away when you're trying to teach them how to how to code so avoid vertical learning curves so how to get to Dynamo so unless you probably know on the Dynamo website you just go to get Dynamo and you pick your latest version and download or you can go to builds and pick up another build of Dynamo to install there's also a great forum for Dynamo if you have any questions or you want to contribute anything this is a great place to do it very busy forum so the dynamo primer as well as a good way to land dynamo I got a lot of tips and tricks and it's got a very good start to finish work there's also a dynamo learning series on my channel so anyway how does dynamo logic work so don't worry for anyone that thinks this is very basic don't worry I will get past this so but you can see here our basic scripted actions you can see inputs going into a list and we're watching that data and then making captain adding into a sentence so essentially we have inputs we have functions and we have outputs and we really just flow our data in this direction from left to right through our visual script so we're not going top to bottom like most scripts would it's a different way of looking at coding so Dynamo uses what's called nodes in order to manage it starter so you can see a lot of components here in this this node so you have like a sub list inside of a list you have levels within that list and you're counting your data as well so you can see I have four items there so that's sort of like the I guess the biology of a node in dynamo so a node an input and an output and then what we call wires which connect all of them together and basically this is how I died and moves through it goes in processes and flows out of the output so that's that's in principle how dynamo works at a higher level so there's a problematic example we're going to pick today for our case study in order to show user interfaces that can be solved by using dynamo so most of you have probably dealt with revisions before and having to add them to sheets maybe a lot of sheets let's say you're doing a Friday issue you've got a revision for the day and you need to go on add them to save 300 sheets so you have to go to revisions on sheet edit then you have to go in and tick the revision that you want and you have to do that every time for every shape what a pain so you sort of end up feeling a bit like this guy why can't I hold all these revisions is there's just too much work to do it's very boring very monotonous there's a lot of tools that can solve this problem but Don American as well so we're going to just do a quick demonstration I'm going to switch to video mode so you can see the full screen and I'll show you just how to set up that basic script so off we go okay so we have a here where I've just set up a bunch of sheets this is just a sample project and as you can see I've just configured the title block so you can see which revision each shape is currently sitting on so they're all currently sitting on revision one so what we're gonna do is we're gonna open up dynamo and we're just going to build a really simple script that can able us to change the revisions of these sheets by applying a a revision to a set of sheets essentially dynamo takes a little while to boot up the first time usually but once you're in you're in okay so I'm using version 2.0 0.3 at the moment noting the earlier versions such as Revit 2016 more need to use version 1 where the script may not quite function the same way so we're just gonna save our workspace as a new script and then we're gonna get started so I'm just gonna move my geometry preview out of the way just so I'm working on white space okay so you've got here basically a set of nodes this is basically our library that's available and then below that you have a whole bunch of custom nodes or add-ons as we call them so these are built by the dynamo community and they usually have much more advanced functions within them typically written in Python so that they're much more complex and they let you do a lot more things so we will use a couple of custom nodes today but basically you can find them in packages essentially so you can see here I've got a bunch of installed packages in dynamo and I've got a package manager where I can search for them so you can see here that I'm just you know searching for anything really there's a lot of good ones a lot of bad ones it's it's open source so anyone can upload there's very little moderation in this case we're using say our key lab and our key labs you know a very thorough package that's got a lot of versions and builds so as dynamo progresses people typically release add-ons to these as well anyway so we'll start building our scripts so we're gonna get started that's just a code block that's specially just like a block of curried if you want to write very flexible code but we're gonna be able mostly with nodes so we're gonna get our views sheet set as a drop-down and this basically lets us pick from a set of views so we're gonna have to work with sheet sets just because of the way dynamo works but we will be able to work around that in later versions of this script which we enhance with user interfaces so we're just gonna go and get the views from that view sheet set and in this case the views are actually sheets because sheet sets can have views and sheets so I've already pre-configured this to have all my my views or sheets so you see here if I go to my sheet set you can see I've already pre selected I'll make a new set actually I'll just make a fresh one sheet set demo and we'll just pick all but I think one of the sheets for the sheet set maybe just so you can see how it impacts all but one there you go as you can see we've got we've chucked a bunch of views in there as well is what we're gonna have to do is actually manage list because very often sheet and view sets kind of have sheets and views um it's really important in dynamo to build your scripts so that they don't have the potential to be broken by other people so for example if you just built it to let sheets and these through and you assume - no one's ever going to put using their sheet set they might break the script and send them through backs and do some damage to their model so what we needed to do here was actually filter out our views so we're going to get the category of all these views which we're treating as elements and you'll see that now we get a list of what those are and then we're just going to compare these so we're gonna turn that into a string which is basically text and we're going to use a comparison though in this case as well I'm just going to show you data types here so we could have used the element category but the reason we're not is because you'll see that if I check the category of this element it's not the same as a piece of text which we want to compare it to so you see there it's a it's a Revit element in category but here it's a string so that's why we can go to that data type data types are really critical to understand in any coding language because you cannot see any process data but is in the same type of data as something else so here we're just going to double check what is sheets and what is not sheet so we're gonna use an equals node to get a base here true or a false and you'll see here that depending on whether it's sheets or views we end up with throughs or falses going a little bit slower than i usually what a much had also just bear with me i was presenting to a lot of new users to dynamo that needed this to be explained I think but what I'm going to use now is one of my favorite nodes which is a filter by boolean so it takes a list and will basically split up results based on whether true or false is fed into the mask so essentially like a Photoshop mask it's black and white so you separating them into two lists so this is how we just get our sheets so we're essentially getting everything that's category is equal to sheets out of here so you see I'll just use a watch node to preview my results and you'll see what we end up with great so that's pretty much the first step of our script we've got all our sheets that we want to apply revisions to but now we need to get the revision and also the node that lets us apply revisions to sheets so we'll just make that a group so you can right click and select nodes in dynamo to put them in a single group and this is sort of a really basic way of showing your users how they can they can go about the script and understand each building block that makes it functional okay so we're going to go another drop-down called select revision so this is the revision that we're going to apply or remove from our sheets using the script so you can see that we're gonna take everything in the sheet set so we only have to do one thing which is create a sheet set and in this case we're just going to add a boolean because we need to say whether we want to add the revisions or remove the revisions if we made a tool that just added the revisions it's not as functional as it could be because the process of removing or adding revisions is very similar in dynamo so it makes sense to put the two together we're just making another true/false that we'll use just a little bit later to turn on another node but at this point we're gonna call on the add revisions to sheet node and this is actually a custom node so this I believe comes from the Archie Archie lab package yes so you can see there that this isn't a node that comes with Dynamo by default so it's really important to understand that that maybe should be identified in our script so if someone opens our scripts and they don't have our key lab they know where that came from just in case and we can go back and also identify this view sheet view sheet set views node as clockwork because clockwork is another custom package at this point we're also going to add the remove revisions from shape node I'm also from our kilo and then we're gonna basically set up a bit of a a bit of a function in order to pass one or the other through so we're going to use what's called an if node and this is from a package called zebra there wasn't if node in dynamo I think there still is but I find that doesn't always work since version two so instead we go and call on zebras package instead which retains the old function of this if node okay so at this point we're just using this true/false in order to tell the revisions to be run because otherwise it won't run some people like to add those to their scripts for testing purposes so they can disabled parts of their script so what we're going to do is we're gonna say if it is true the function that we want to push through is adding revisions and if it's false the function we want to push through is removing revisions so it's quite simple essentially and what we're going to do with that is we're then going to use a node I believe called list map in order to apply that function to the sheets so list map basically says find all the nodes that are disconnected in the the function that leads up to the bottom line and take the things from the top and run it across all those elements so it's going to take all the sheets and it's going to run them across either the the true function or the false function in this case so that's how we can backtrack a function in dynamo it's a bit of an advanced technique that one it took me a while to sort of figure that out how that works it's basically like an if-then-else if anyone's done in the Excel or Revit coding before but it's a little bit more complicated to achieve that and Dynamo so what we've got there is basically our output so that will essentially run that function across all the sheets so we've really ended up with quite a quite a nice little script here it's quite a simple one that's not too big I tried to pick an example that wouldn't end up becoming a big sprawling tree of code there's a lot of dynamo scripts tend to become in demonstrations just tried to keep it simple so what I'm going to do here is just I'm just gonna color code these and call them my inputs so that if someone opens the script they understand how it works but there we go so if minimize this and put Revit on the side you'll be able to see how this script interacts with Revit itself so we should expect that whichever's revision we choose will be applied to the sheet set so we're just going to pick our demo sheet set and we're just gonna pick our revision let's just say revision two and we'll say yes we want to add it and we'll run our script and there you go you can see that those numbers all ticked up so essentially the script has worked so you can see that that's quite a powerful script and obviously we can keep changing our inputs at this point we can say we want to remove that revision again we can obviously add more revisions as well so we can really quickly work with this but but note that the sheet set is a very limiting factor in how the script works or I really don't like using sheet sets in Revit unless I really need them for something like a tool like X Rev because they're quite quite a pain to maintain and keep track of but there you go so you can see that in this case our revisions have been applied and I'll just I'll change my sequence in Revit so that the revisions are ordered pair sheet rather than per project so if revision eight is on is the second revision that will be at revision - you're not revision eight for example and there you go so that's as you can see in that demonstration what we've essentially done is taken our original script and we've taken our inputs and made them actual inputs we've processed them and we've taken them to an output but there's some problems with basic scripts that you can sort of come across quite immediately when you use dynamo a bit more one is that the native script must be open to run it so the user has to understand the dynamo user interface so immediately they don't want to learn dynamo because they have to learn everything just to run a basic script the user has to find the inputs as well so for bigger scripts that can be your problem no matter how well your color code some users just won't be able to spot a certain aspects of the script they need to work with and the users cannot see overwrite the script as well which is you know really frustrating if you're a coder and you need someone to just come in run the script and leave maybe they'll try and fix the scripts because it's not working because they're not using it properly and before you know what your scripts broken the other limitation is only one script can be open at one time so what's the solution to that so one first solution that I explored is dynamo player so this comes with Revit I believe in 2017 and beyond and it's located right next to a dynamo if you're going to use it it's important to understand that I always recommend opening dynamo first in Revit and then closing it because in the background dynamos chosen its version so you basically tell dynamo which build you want to use by default if you don't pick it by opening dynamo a dynamic player will just open the lowest version of dynamo you have which is usually not what you want because usually you're building for the latest version so from there you basically just opened dynamo player so we the great things about dynamo player the first thing is the native script is not opened to run it so they only need to understand how to use dynamo player which is a lot simpler than dynamos interface and it's very easy to access inputs as I'll show you soon and the user cannot overwrite the script very easily there is an edit script button where you can jump into dynamo but I think people would know if they clicked it by accident and the other thing is you can build tool boxes of scripts as well that I'll show you - so this is dynamo player so it has an active document nominated at the bottom of the interface this is sort of docked separately to Revit so you can navigate to your folder here so you pick your folder refresh dynamo player and essentially each row is when your scripts from there and you click on this button to modify the inputs before you run the script not always your script may not always have inputs but most of them will and then from there you just press play to run so essentially in dynamo player there's a lot of types of inputs you can accept so things like true/false Azure boolean x' as we call them in dynamo more text inputs and file paths and also you can see it takes on default values as well so in that case my default path there was my desktop and the script remembers that so the other things too it has things like number sliders and outputs for feedback and also drop-down menus were available in dynamo and you just press play when you're ready to go so I'll just do a quick demonstration on how to enable dynamo player in a script and then we'll move on to some more advanced user interfaces so it's time for another demonstration okay so we have our script here that we've just built so you can see we're good up or input still there so what you do is you rack the comm what you want to make an input dynamo player and you select is input so we're going to add our three inputs here um so they show up in dynamo player and then we also have an output section we can show them as outputs but instead I'm just gonna plug in this little node that I've built that basically collects a bit of data from what's happened so it finds out how many sheets you're applying it to by going back and it also finds the revision name and it will basically use another if node to either say added or removed so we're really just building a sentence there based on what's happened so am I just making a sentence that says this has been applied to a certain number of sheets and we're gonna basically run that as our output instead so it's a bit more meaningful to the to the end user and you can see that's how that sort of changes as those inputs change as well there we go you can see removed okay so we've added a really basic interface here as a result and we're just gonna add something on the end so we're gonna show you like a really minor interface here that you can add which is basically just a user message so this is from a package called rhythm found freeze that it's really just gonna add like a little box like this though it comes up after you run the script it's up to you whether you want it to be there or not it can be a pain for users if they don't want to keep clicking okay but it's a great way for users that might be more concerned that maybe the script didn't do anything because this tells them what's happened essentially because you're taking your outputs but anyway that's that's not related to dynamo player that's just a little additional trick that's up our sleeve if we need it anyway we're gonna close dynamo and boot up dynamo player and we're just going to navigate to our folder that contains our script so I'm just going to my presentation folder here at the time and you just opened the folder itself not the file in this case we're just going to run the dynamo player for video script and I'm just going to my inputs now usually the first time you open inputs it can be a little bit slow but I find after that once dynamic player has sort of started doing its thing it's pretty fast when you go to other scripts so we just you can see here are three inputs so we can pick a sheet set we can pick our vision and we can pick whether we want to add or remove so quite quick and there you go you can run it you can just change the settings again and you can run it again with the same settings so very fast very efficient you can remove so yeah it's very quick and this is all the user needs to see so as you saw in that script we did use rhythm it's really important to have a look at these sorts of packages because they have a lot more nodes in them they're just what I showed you but that's a little helpful one that comes from there another great node that rhythm has in here is the ability at upgrade batch upgrade families to new versions in dynamo so check it out and you'll go to the next slide alright so what we've basically done with our scripting principle is upgraded it so we've kept everything more or less the same we've just defined the inputs and we've added a basic message at the end so large and part the same but there are some limitations with dynamo player as well some that never led me towards user interface creation so the input types are quite limited the way that they're set up is very dictated by how they're defined within dynamos default nodes in Revit the stop-start function is not easily achieved so the ability to gather some data and then keep the script running so to stage your inputs and a lot of users have what I call eg trigger fingers they're really keen to hit play without checking their inputs and unfortunately dynamo player will let you do that so unless you build your script to be absolutely idiot-proof and make sure that the script just can't run without the inputs you can get some scripts that people will run incorrectly and the UI layout is quite restrictive so the order the inputs appear in is quite quite random I think it's usually defined by the order that those nodes were created and dynamo so that doesn't really give us a lot to work with and it's hard to embed any sort of help in that dynamo function it's hard to put any text notes in there or help follow hyperlinks things that could help people understand how to run the script like a how-to fact so what's the solution so a really easy and easy to reach solution for anyone that does a bit of research is a package called data shapes so it's made by a French development team that makes a lot of custom packages for Dinamo they've made another one called diner maps as well they get some map data from Open Street Map and gives you basically a basic city mall so definitely worth looking into all their work and they also have a tool for model comparison inside data shapes as well but what we're looking at it for and what they're probably most popular for is that their user interface package so we're just going to do a demonstration on what is possible using the UI package from data shapes so we just got a little demonstration again so it's got a little a five-minute video where I sort of show the data shapes package and how it works and then we'll apply it to a script after so the data move the data shapes DynaMed package has a lot of sections but if you go down to uui and then the UI section you'll see that you've got a whole bunch of inputs or data types that you can feed in so the way that it works this is my main user interface or what triggers the UI to pop up you can see I'm fitting in a lot of things like the title of the UI I've got file paths I've got a sizing section that says how big is your user interface there but what I'm gonna look at first is just all the buttons that you can add to your user interface so essentially this is a set of boolean or radio buttons I'll run this shortly so you can see what they look like essentially you set their input name and then you tell them what are called keys and values in some cases which I'll explain shortly we've got our color pickers and file paths directory paths and what you do is you collect them all in a big list and you feed that list into the interface builder so we're going to take that list and we're just gonna connect that to the inputs node of the main UI and you can see here sort of what they look like so I'll just quickly I think toggle list is true so there you go so we've got radio buttons coming up there we've got boolean x' color picker and paths so we're just gonna look at keys and values so note for this radio button section see how it's saying ABC you'll see that's because the keys are also being told to say ABC I'm showing a color picker there so you can get a color and it returns the color you can take directory paths so I'll just pick any any old photo except for a cycle bin and then you can get file paths as well so I'll just pick that that path so from there if I run run my script about to there you go so you can see that these are my outputs that I'm collecting so you can see my color my file paths and my my boolean czar my ABCs so I think I'm just gonna explain keys and values shortly all right so this is another type of UI that you can trigger so we've got what I call model selections in this case you can see I've grouped these four elements in one so I've got four UI buttons being fed into an input group so you can sort of subset your UI buttons as well you can see I've got nodes that let me select select edges faces model elements I've got a UI slider that I define using the UI slider node I've got text boxes as well then I've got text boxes that only accept certain types of characters so they don't accept numbers in this case so you can see down there I've said number entry is false but then below that I've got number entry is true and then also multi-line text as well I think when I run this the first time it I need to set told to true so what I'll do is I'll just rerun my UI and see it's it refreshes each time you don't get the same values so I'm just going to really quickly populate some values in here and then we run and you'll see that sometimes if someone doesn't choose something you get what's called a null which is like no data so just be mindful that you may need to process nulls sometimes if people don't run the script properly anyway we'll just refresh our UI again every time you talk without it basically refreshes your user interface so we're going to collect some other types of nodes and this one so we're going to collect what's called a data tree in this case and you'll see what that looks like so this is where I talk about keys and values so note that my keys are arranged from A to Z and my values are arranged from 1 to 26 so they're essentially not the same thing so the key is more or less what you'll see in your UI but your value is what will actually get through so you can see here much free structure so you can set up very complex lists if you have a complex list that a user needs to go through such as you know families by category or something like that you can see my drop-down but then also my list view so list views are really handy because they're like a multi they're like a multi boolean basically so I run this note that my my values that came through our all numerical so you can see that down the bottom nine and eleven and thirteen came through even though I picked letters so that's because my keys were letters and my values were numbers and that's really important to understand so you can push through things up model elements but you can use the keys like the model elements name it's what makes more sense we're gonna do an image and a little surprise in this one just to show you how flexible this um this one can be okay so we're just refreshing our script and check it out you can do text notes for help notes and you can even embed gifts in there as well so obviously that gif isn't very helpful it's just a bit of a joke so really what that could be like a little gift showing someone how to operate the script so that's quite powerful one um really exciting thing that we saw there in data shapes is the idea of stop-start logic so the ability for a script to be stopped at a certain point and then feed three values after so this is our basic script we've got but let's sort of rethink how the script works using data shapes so you can imagine that what we're going to do really is we're gonna take our inputs and they're all gonna go to the front and all the processes are going to come after instead and what we're going to do is collect all our inputs in a UI so basically like inputs provide the options and our outputs provide the data and essentially this forms a stop point in our script which says wait let the user pick some things and then keep moving and you can put multiple your eyes in a script so you can stop the script too many times over so you can collect out a trigger a user interface collect data trigger ease interface run the final process it's very powerful um so it's got all the benefits of dynamo player which is great but it also does stop start it has a play button that triggers the UI so basically in dynamited player if you hit play it will trigger the UI to pop up because the script was just start running so you no longer need dynamite inputs in dynamo player I'm it's highly flexible so the order if the buttons the types of buttons the way you can make the data look adding logos it's and it's very easy to add help as well so you saw that I could add gifts you can also add a help file on the bottom right corner as well so we're going to do just a demonstration of how the script would look when we add data shapes to it I won't show the whole thing being built in data shapes because it takes a little bit of time but I'll sort of explain how the script has been changed so we'll just do another demonstration video so here's our script with a UI added to it so you can see we've got a UI here that's basically saying what's the title which is out to remove revisions run script the size and then we're just collecting our inputs so what we're doing instead is we're collecting our sheets in a UI button for a ListView in order to pick our sheets we want we're choosing our vision using a drop-down and then way just you're doing a boolean input for whether we want to add or remove the sheets so the way the script runs is a lot more efficient now we no longer have to worry about sheet sets which is great so the revisions are quite simple we just collect all revisions and we collect their names so the keys are the revision name and the values are the revision itself in dynamo it's a great example of keys being used their sheets much easier we get all sheets and then we get all sheet numbers all sheet names make a little sentence that sort of describes the sheet and then we feed that into our list to you so we can pick any sheet in that project so we do away with having to set up a sheet set much more powerful so that's pretty much the UI ready to go but what we do then is we collect our our outputs so we take item 0 1 2 and then we feed them into the back end of our script so we're taking the true false and we're feeding that into our revisions node we're taking sheets and we're feeding that into our list map and we're taking our vision which we should look at in a sec maybe not know the revisions going into the same place that it was before so at this point we can pretty much run our scripts as a UI so if I run this it should prompt the UI to come up straight away there you go that's our UI if you don't specify the logo we just brings up the data shapes logo so we can pick any number of sheets we can pick a revision add or remove we run and off it goes and it's run so there you go so it's about the same speed as dynamo a player to run as well maybe slightly faster but they go very great quick very easy and the user is guided entirely by the by that process instead I'm so far better there we go and you can see there we're collecting all that data to make the names of our sheets getting that through then we're getting no revisions so we feed through the revision itself but not the the name is that is it only the key but that's what we see in the user interface much more powerful and you can see that we're getting it only tells you the last input in a code block for the outputs for there you go there's our outputs so a list of sheets a revision and a boolean in this case and that's pretty much it so I think I'll just break it up through dynamo player as well just to show you what happened but it's essentially still functioning the same way that it did before in that case okay so we're just going to close that we'll go over to dynamo player and we're just going to quickly run our script through dynamo player as well just to show you that the UI still triggers from dynamo player itself it runs the same way again taking a little bit of time to beat up done workflow it was a little bit faster in future versions okay so I was gonna get navigate to that photo usually it remembers which folder you want to go through but I think I was testing something on my desktop as well so that's why it defaulted there okay so he's gonna run a data shapes scripts and we should expect our UI will pop up once dynamo players on read the script you can imagine I'm a user that has no understanding of dynamo you know I don't really understand dynamo player that this this immediately is something that makes sense to me I can see my sheet so I can see my revision and I can say I'm adding or removing so very simple really simplifies the process for them and it runs tells you what happens and all your scripts all your scripts update the model and you can run it again pick your inputs again the only disadvantage between this and dynamo player is that data shape doesn't remember the last thing you chose for your inputs so occasionally dynamo players more suitable but I find data shapes is nearly always superior okay so we've basically seen data shapes in actions so we're more or less scrapped our original input strategy and instead we collect them differently to suit the user interface so we're pretty much setting up our inputs here regenerating our user interface buttons noting the true/false is now part of the button structure instead of a an input before that building our menu by getting our outputs of bottlenecking them as I call it so collecting them all in one node and then spreading them out to the output in the process and then the process in the output is large and part the same most of the time the output structure doesn't need to change it's really just the input structure and how you collect all that data before you release it back into the process so I'm going to show you three examples of using dynamo not on our player on data shapes and then one using dynamo player noting in the dynamo player example it's more efficient to use dynamo player because I want to keep the input setup chosen I'm so I'll run through that shortly okay so we've got um a few demonstration scripts here this first one is just a scheduled exporter you can see here I just picked the schedule out of the model that I want to export and then I just pick where I want to save it to in this case the desktop is the default path so off another user runs this dynamo actually understands their name and knows what their desktop is called and then it just generates a little excel file that has some predefined templating applied to it so it means you don't have to worry about formatting your your data every time it comes out of Revit because usually you have to deal the tax then you have to change your column widths because they're all defaulted and you can add like additional tabs to them as well such as branding so just a nice little way to export schedules as well as that this is a view and a sheet stripper so I'm picking parameters of views and then I'll pick a parameter of my sheet as well that I want to filter out so I'm going to isolate my sheets based on these parameters and my views based on these parameters so if I just open a little helpful probably yep so obviously this is a placeholder so typically when I build scripts I'll actually build the placeholder helpful because that path is inside the script that way later on I can update the file so here I'm just saying what values do I want of those parameters so notice if I stopped and started my daughter twice which is quite powerful so obviously I can collect more data that usually in dynaweb player you wouldn't be able to get straightaway and then I'm just gonna delete the matches and I get a little results window and Dynamis went and found anything that met those criteria and deleted them so it's a great way to clean up models as well for daughter shapes and this last ones pretty cool so I've basically suppressed my Adobe PDF settings so that it doesn't ask me where I want to save things it just has a default path and it won't show me the PDF when it prints and that's because I'm gonna use dynamo to batch print so I'm using a annoyed from the Archy lab package in the backgrounds but data shapes is doing all the UI work so I've got a ListView for sheets I'll just pick a few sheets just to print doesn't have to be all next to each other I'll just pick my print settings which are coming from the project and I've got the option to add the sheet name on the end as well and the great thing about this script versus other tools is that everything is already built into the script for the company naming conventions and numbering conventions so you pretty much don't have to worry about any setting files that other tools need and obviously the tools free as well which is nice and there you go you can see that they're all printing out and off you go Bob is your uncle cool so that's that so that's a pretty good application for data shapes as well and the last some we're gonna look at is actually an example where dynamo player is more suitable than data shapes and the reason why this is the case is because I'm in this case I want to hold on to most of my inputs and only change one of them being the end of my goal because the way the script works is it it finds the shortest route through walls and doors in order to reach another point so you may recognize that this is sort of a tall in River 2020 now the shortest distance tool but there's a little bit more control available in dynamo and this is in Revit 2019 so I'm actually utilizing this portion of the the API of Revit before it was actually integrated into rabbits ribbon itself through a package called space analysis so if I run this you'll expect that my my path which is actually a railing is going to reroute itself to my destination using the same process as the shortest distance tool so they're really flexible and a little bit more control than the 2020 version but I've see the 2020 version is much easier to use so it was really fun for us to be able to access that before it was a part of rabbits main tool set I've got a little sort of sneak peek there yeah you can see a lot of um applications for data shapes and user interfaces but we're just going to get some other small packages really briefly just for further learning if you're interested so one of them is called mandrel which is quite similar to actually a tool called power bi by Microsoft but this one runs directly on the back of the dynamo script so it can generate metrics and graphs and report them and print them out to PDF so definitely worth looking into further there's a lot of types of plots and graphs that you can run on the back of / dynamesh script using this for an immediate reporting obviously power bi is probably more powerful for data visualization if you've got the time to take your data and then process it but this is a nice quick way to get a little little feedback of what's happening in the dynami scripts synthetic is a tool that's able to interact with rabbit dialog boxes directly I believe it can even tell dialog boxes what to do so you may actually find out that there's the option here to semi automate some batch tasks by prompting dialog boxes and when certain things pop up but definitely worth researching and of course I've got a YouTube channel as well which I guess you're watching right now but the people there didn't know this at the time where I teach a lot of things such as learning dynamo and dynamo tutorials and also rapper tutorials as well so thanks for watching it thanks for listening so if you've got any questions or feedback on the presentation or just comments feel free to leave it down below if you're not already following us subscribing you made it through this presentation hopefully that was motivation enough to join my community and thanks for watching I hope TLC in the next video thanks take care you
Info
Channel: Aussie BIM Guru
Views: 7,396
Rating: 4.9708028 out of 5
Keywords: aussie, bim, guru, cad, revit, dynamo, computational, tutorial, demonstration, how to, educational, custom ui, custom user interface, ux, user experience, user interface, ui, data shapes, shapes, dynamo player, player, mandrill, rhythm, synthetic, presentation, user group, revit user group sydney
Id: wkwMsy9DQiQ
Channel Id: undefined
Length: 42min 39sec (2559 seconds)
Published: Tue Jul 23 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.