Description
Key Learnings
- Discover some limitations (non-negligible in some workflows) of out-of-the-box BIM metrics in Revit
- Discover the power of Revit API in "filling the gaps" above and beyond the standard Revit functionality
- Learn some specific practical examples of enhanced metrics for estimating and design-to-preconstruction workflows
- Understand the potential of working with Autodesk Consulting, typically through an Enterprise Business Agreement
Speakers
- Miroslav SchonauerMiro has extensive combined engineering and IT background, with a Dipl.Ing. in Civil and Structural Engineering (Split, Croatia 1988), PhD. in Numerical Methods in Engineering (Swansea, Wales, 1993) and 35+ years’ experience in commercial engineering software design, development and customization. His initial involvement with 3D AEC and BIM (before it was even called BIM!) took place between 1995 and 2000 within AceCad Software and its then-market-leading 3D structural steelwork modelling solution StruCAD, where he was leading the integration efforts with various 3rd party 3D structural analysis/design (QSE, Staad III, etc.) and Plant Design (Intergraph, Aveva) software packages through proprietary and neutral/public data formats. He's been with Autodesk since 2000, initially as Developer Consulting Specialist leading the AEC support team (AutoCAD, LDDT, ADT/ACA, MEP, Revit and Civil3D APIs) and currently as Senior Solutions (Software) Architect with Autodesk Consulting. His specialty have always been APIs for all Autodesk® AEC and BIM products, now extended from pure desktop APIs into the full APS cloud platform. He's conducted numerous training sessions, given many conference talks and provided direct technical support on such topics. For the last 18 years, he's been applying combined API, products, industry, software/IT methodologies and process analyses knowledge to architecting and developing consulting solutions that extend the functionality of Autodesk BIM/AEC desktop and cloud products/platform; and integrate them within various generic and /or specific customer workflows, processes and solutions.
- MLMERRI LAWANWith over a decade of experience in construction both on site and off site, Merri Lawan joined the French leading general contracting company VINCI Construction France’s Building Information Modeling (BIM) Team at its inception in 2011. Having worked for Bouygues Construction, Merri has been a keen Revit software user since 2010, and as of 2011, he is now responsible for the BIM implementation in VINCI, in charge of Revit software integration within design teams, technical departments, and cost estimations to construction sites. As an Autodesk Developer Network Member, Merri focuses on custom software development and takes an active part in the Autodesk Beta Testing Program. As an expert in the Revit software API, he has developed and deployed VINCI’s in-house plug-ins and tools accelerating business workflow among BIM products. Finally, as a BIM evangelist in VINCI, his role includes the training supervision and technical support for all subsidiaries in France.
MIROSLAV SCHONAUER: OK, so I think it's half-time. So welcome to the presentation on tips and tricks about using API to achieve enhanced and customized BIM metrics. My name is Miroslav Schonauer, or shortly, Miro. I'm from Autodesk Consulting. And Merri's from VINCI Construction France. And we'll present this class jointly.
So just a quick introduction-- I won't waste much time here. So I've been in Autodesk for quite a long time, nearly 19 years now, working in developer technical support initially but lately in consulting-- actually, from the first day of the consulting conception in 2006, I believe. And even in consulting, I continue specializing in APIs for AC product. So all AEC desktop products now, we are moving a little bit in AEC But my speciality is still on desktop products.
And also, having combined engineering and coding background, I enjoy working on challenging customer projects. So I'll let Merri introduce himself and have introduction. But before that, I'd just like to do some poll from the audience.
Now one month ago, when we checked-- all of this is developer's dream. It seemed like there were a little bit more of software BIM managers and non-technical coders in audience. It was about 50 to 70. So how many people have you do hands-on development with Revit API?
OK-- so roughly half. And from the other half, who at least understands what API is? OK, so there is hardly anybody who doesn't know API hands-on and doesn't understand what API is.
OK, that's good. Because I have to find the right balance. I hope presentation will be the right balance. But I'll just have to ask for your patience when I go in some very technical things and some very high-level for the other people.
OK, so now I'll hand it to Merri, who will also do the introduction section about the history of the project for the first 10 minutes. And then he'll hand back to me, I think.
MERRI LAWAN: So hi, everybody. I'm Merri Lawan. I have over a decade of experience in construction, both as a work-site temporary designer and also as a BIM specialist. So I joined the VINCI Construction in France Company in 2011 as a BIM specialist. My team is in charge of implementing the BIM inside our company, which means do custom development, also library creation, technical support, and training.
My overt focus is on software development. So I used to develop with the Revit API several years ago. And I am using currently my experience in development to help the Autodesk Consulting team to do the specification for our user needs.
So a little bit about the background, how we present the context of the development project. So first, my company-- so who knows of VINCI Construction Group? Not many.
So VINCI Construction is a world leader construction company operating close to 70,000 people in some 100 countries. So it's an integrated [? concession-construction ?] company. And we basically design finance and build infrastructure and facilities projects.
So I'm working in VINCI Construction of France, which is a subsidiary of VINCI Conservation Group based in France. So we are the French leader in the construction market in France. And we are about 20,000 people dispatching all over the territories and in many business units. So we are specializing in concrete construction. And we deal with the overall logistic coordination of all the other jobs.
So the context of the project is to try [? to ?] quantity takeoff from Revit. So a little bit, I will talk about why we need a good quantity takeoff inside our company. So as I said, we have to manage, as a general contractor, all the subcontracting companies.
So that means what we have to figure out in the earlier phase is [INAUDIBLE] cost of the project. And you have to figure out very precise quantity takeoff. And we also have to plan the logistic operation during the execution phase. Because we need to [? smooth ?] the [INAUDIBLE] activity and also the resources-- human and material resources-- on a daily basis. And that way, we manage to secure the planning for our client and also his budget.
So why we choose Revit-- so we choose to deploy Revit in our company a few years ago. Because Revit offer good construction features. So you may aware of-- but you can use the parts, for example, to create a pouring division and phase the pouring element independently. So it help us deal with all the logistics.
And also, there's a good to a phase 2 in Revit, so you can save many graphics features to do a sequence simulation and also actual quantities based on the phase. And so we choose Revit.
And today, it's our data engineering tool. But you may aware of that, in Revit, you have some little gaps to extract a very precise quantity takeoff. But we don't want to leave Revit to deal with this. We want to stay on our data engineering tool.
So we decided to leverage the Revit API to fill in these gaps. So here you can see our custom matrix templates. So our [? guess ?] estimating team are using these templates. So all the materials are already set and also codification.
And here you can see an example of view sheets face by face. So we generate view sheets on a daily basis. And we extract the quantity of pouring and also the [? formal ?] equipment quantity.
So to implement the BIM in all these technical engineering departments, VINCI has signed, four years ago, a enterprise business agreement contract with Autodesk. So the EBA contract basically offers you flexible licensing management and also, as more important parties, we have a good consulting services from this contract.
So the key benefits to this consulting is you have very expert consultants, which knows very well all the Autodesk projects and also the API. And they are also software architect. And it is very important. And you will see during the presentation how we develop a very well-suitable integrated tools.
And this consultant benefits also from the direct support from the Autodesk Development team. So it's very important. When we are getting stuck, we can have a good support. And we also keep you informed to this roadmap.
This is also a key point. Because we don't want to reinvent the wheel. So if we know that something has been currently developed by Autodesk, we don't want to redevelop everything in Revit.
So what are the quantity expression gaps in Revit? So we need to calculate some parameters on the Revit context. This is important, because we want to show the information in Revit.
For example, here is a tag where we can show the weight of the elements. So we need to create information in context. But Revit lacks some information. For example, when you are remodeling with a multi-layered wall in Revit, it's quicker. But you don't have the real [INAUDIBLE] of each feature material layer.
Also, we want to calculate, for market creation purposes, the drop height of the beam beneath the floor. And we want also to calculate-- because we need a precise quantity to takeoff on the earlier phase-- we don't model all the framework. So we need to calculate the exact framework slab area. So we need to extract this information in Revit. And also, we need to calculate the weight on a complex as somebody, like this balcony.
So there are several information we need to extract that are missing in Revit. And we need to show it in context. And also, you may be aware if you're using Revit. But there's no real room finishes module. It's not possible to quickly model room finishes and also extract precise quantity takeoff. So we will talk about this a little bit later.
And also, we need to extract the quantity in a more flexible manner. Because in Revit, for example, if you are using the schedule, the schedule stick to the category. And you cannot carry information from various sources, like on multiple categories or on the specific material on a specific layer.
So we need to group this information on a specific manner to use in our cost estimating tool and also assign some qualifications. So to deal with it, Miroslav will present you how we developed our custom solution for this. So I will hand over to Miroslav.
MIROSLAV SCHONAUER: OK, thanks, Merri. Thanks for the summary. And let's go to the slide. So first a little bit about the approach-- I'll try to take the next 45 or so minutes.
The focus is on, as Merri said, the things that are missing in Revit. But we should view this as a kind of glass 70% full rather than 30% empty. So it's not a criticism of Revit. But I just want to really emphasize how, if there are gaps, you can definitely surpass them by API.
Because Revit's BIM model does contain all the information. Unfortunately, some of the things that you need don't come conveniently in parameters and things like that. But it's almost limitless what you may need for particular situations. And that's why every development team really started developing API from 12 years ago.
Also, for the personas in audience, I'll try to have a balanced approach, try to give some explanations about what happens in Revit. And then I will go into some of coding and some of the code. So apologies for those who are not coders. But I'll try to keep the balance to keep both personas interested.
And finally, last but not least, thanks to VCF for agreeing to share some bits of source code. You will see later, the application is absolutely huge. But we extracted bits and edited codes so that you have main points how to solve some problems. And you will get all the code as an upload.
So by the way, apologies for not uploading my materials yet. I just wanted, after class, to make sure that you are happy. And rather than spending time on a handout, I'll give you the model. I'll give you the code that I'm going to present in five or six separated files and also the model that I'm going to show all these things today. So that will all be uploaded, hopefully by the lunchtime today.
OK, so let's address some of these main gaps. So this was the first thing that I heard from them when I got involved. There are a lot of things we've done. So metrics is one important-- but not the only-- thing.
So for example, three of the main things that were missing in their metrics module is-- first is lack of gross areas and volumes for walls and floors. So for a lot of calculations, they needed to know, what would be a gross volume and gross area of the wall without the openings? Now, you haven't got that information in Revit, unfortunately. In some API tools, there are some references to some solutions on Jeremy Tammik's blog. But you'll see a bit more details how we approached and how we solved this problem.
And in this context, there is no what I call manual solution. So when I say manual solution, that means using some other Revit workarounds out of the box to solve the problem, which is not directly available through a variable parameter or whatever. So for me, manual solution is just without API using other workarounds in Revit.
So this one, I don't think I need to show you. You are probably aware of this. Is there anybody here who, for some reasons, would like to have this information in the [? QTO ?] or somebody from construction or something like that?
Because this is something very specific for VCF construction needs. So the reason why probably it's not in Revit is that, for 95-plus percent of the people, you don't need this information. But when you need special things like they do, you need to resort to API to solve them.
So even if you don't want this particular thing, just be open minded. Think about some other things that you may need. And they can be probably solved through API.
The second thing, which I'm just going to quickly demo, is a wall materials takeoff issue. So on the corner is when the wall joint-- as I'm going to show in a second, there is a problem with the precision of the numbers in Revit. And again, for most of the people, it may be OK.
But if you are working in estimating, and you have to estimate project, and you are in a business which is on 2%, 3% margin, if this is 1% wrong, you could lose a contract or something. So let me just quickly show you this problem in Revit live. So I got a AU demo.
So first thing what I'm going to do is not to mess this file. This is AU Demo Start. I'm going to save it as AU Demo Completed. It's not completed. It will be at the end. OK, save.
MERRI LAWAN: During the meantime, just to expand-- so we need the gross around volume or the gross area is for framework purposes. We need to extract the framework area. And the gross volume is to calculate as a steel weight based on the steel ratio. So that's why we wanted to calculate this.
MIROSLAV SCHONAUER: OK, so what I've done is I've created some very extreme wall types. Each one is 2 meters thick. So what you see is the numbers. It's all in meters. But just thinking in feet, it's exactly the same problem.
So if you have a wall, for example, 2 meters thick here and one meter is brick and one meter concrete-- of course, in Revit, you can adjust it. It cleans up nicely. And you have what you want here.
And if you look in a 3D walls corner, this is roughly the situation. So I made the wall, again, extremely, extremely low. Let me just remove the section box.
OK, so basically this is 2 meters high. And it's 1, 1. And obviously, the volume of concrete inside should be smaller than the volume of brick outside.
So if you create schedule in Revit, what do you think the results will be? Will it be-- is somebody confident what the result would be? OK, so this is the schedule, corner, walls, MTO totals. If you create schedule in Revit, actually, Revit will tell you that you have exactly the same amount of both materials. It will tell you that you kept 12 cubic-- in this case it's meters-- of brick and 12 cubic meter of concrete, which is obviously wrong if you want to look at the real numbers.
Again, it's not a problem for 95% of the people. But for those it is important, it's quite a big issue. So workaround to do this in Revit-- there is a manual workaround. What you can do is if you create parts. So if you just the split the wall into parts and then create schedule from the parts-- which are down here-- so corner walls part material takeoff.
Then the thing is correct. Because then you have 14 cubic meters of brick and 10 cubic meters of concrete. Because when Revit breaks things in parts, then each part inherits the volume.
So to be honest, I was surprised when I heard about this problem from Merri. And they want to have this information very quickly and accurately without having to break in parts, then un-break if they don't want, and so on.
OK, so this gives you a feeling of what kind of things we needed to solve for them. So let me demo. And I'm going to demonstrate how to solve the problem in API in a second.
The third thing is linear wall metrics. So there is no-- for a lot of VINCI QTO, they want wall layers in a linear-- in a length meters for isolation.
MERRI LAWAN: Specifically, when you we are dealing for partitional walls. So our prices in in linear. So we need the linear for this type of [INAUDIBLE].
MIROSLAV SCHONAUER: And in Revit, you can't extract linear metrics. You can extract the length and then, through API, drill into the wall structure, and do it that way. But the problem is, again, the lengths in Revit suffer from a similar problem at the T junctions like the corners for materials.
So let me just show that in Revit directly. So that's the walls. So if we have a look in the original one, I've created a similar thing here-- again, with extreme numbers to exaggerate the problem. So this is the main wall. And this is the partition wall.
So partition wall is modeled to center. So it's 5 meters long, technically. But actually, it's real length is only 4 meters. Because this thickness of concrete is 1 meter.
And if you create, for example, schedule for wall lengths here, you will get that it's 5 meters. So that partition wall, according to Revit, is 5 meters long. So even if, through API, you get the length and drill through the layers and say, I have one layer so that means it's 5 meter, this 5 meter is wrong. Because what you want is a 4 meter in your estimation.
OK, do you mind if I keep slides like this? Or do we want the presentation? I'll be switching a lot from the code to here. OK, that's probably better.
Right. So let's get to some hands-on things, then, to show at least those who are interested in coding how to do. So lack of the gross openings. How can we solve this problem?
We need to extract metrics from walls and slabs as if you don't have openings. So you can change the model in API. But obviously, you don't want to [? persist ?] the change. So in such situations-- and this is applicable to a lot of other situations-- you can use something that's called a dummy transaction pattern.
So idea is-- you start the transaction. You change things in Revit. You call regenerate to make sure that model regenerated.
After you regenerate, you take all the metrics that you need from that regenerated change model, cache it somewhere globally, save it. And then at the end, you just roll back your transaction. It's a very, very powerful way of extracting things from Revit in what I call temporary changes.
So in the slides, I just listed key API constructs from the code and from the things. Like, for this one, host object find insets will tell you all the openings and windows in a wall. Then document regenerate is important. Because in transaction, you need to call document regenerate after you do changes so that you can start extracting the values. Otherwise, Revit model is not up to date.
But that up to date is still within transaction. So at the and, if you roll back, that's it. From user perspective, nothing will happen. And you will get all the things that you want nicely there.
So code extract review-- so let's quickly have a look at these code extracts. These files-- they will all be given to you in-- I think there is a handout PowerPoint. And there's a third category, which is the downloads. So I will zip this, and give you all the code.
The dummy transaction for gross metrics. That's the one. So I tried to write just concise thing. Is this font OK? Can you see it? Or should I make a bit bigger?
AUDIENCE: Sure
MIROSLAV SCHONAUER: A little bit bigger, yeah. Tools, Options-- I forgot where this is now. Environment--
[INTERPOSING VOICES]
MIROSLAV SCHONAUER: It's like in the browser, isn't it? Yeah, yeah. Sorry. Sometimes I still think I'm Visual Studio version 1.
OK, so basically it's not the code you can compile. But it gives you all the major elements. So you start the transaction.
Then for each host object-- host objects are base class for all the system families in Revit. So that's wall, slabs, whatever. You can then call find inserts. So we remove inserts, which means we are deleting doors, windows, openings.
Then you call document regenerate. At that state, inside your transaction, you can start extracting then metrics from these regenerated walls. And then you loop all these elements. And then you extract metrics with the simple methods, as you would have done in other ways.
And then you cash it somewhere globally in your code, or directly in the parameter, or whatever. At the end, you do transaction rollback. And how do you say [INAUDIBLE] I never understood what that means, but that's probably it.
So this pattern-- you can use for this particular situation. But as I say, it's quite useful for some other situations when you need to change something in model and not [INAUDIBLE]. OK, so let me just show in Revit how we implemented that in the code.
I'll have to jump a bit forward. So at the moment-- let's see, walls, corner. So this wall-- you see, I haven't got any custom parameters. I'm jumping a little bit ahead with the UI. So just bear with me. Don't ask any questions about this UI, because we'll come to that later.
But in VCF for metrics, we have something called calculate parameters. And at the moment, let's say I want to calculate for everything in Revit. And I'll just select it. This will enable you to calculate something we call level 2 metrics and parameters.
And these multi-material caches is something that we do to calculate all these things that are missing. We are shielding users. So only when they select parameters that need this caches, this will be checked-- but added just a little button code here, AU Force Check. So when I click on this, this means that these caches will be created even though we haven't we haven't selected any of these parameters.
And now when I calculate these caches, that's all done. What we can do is-- let's go in the level 0 original. So what we can see is that, for this wall-- [INAUDIBLE] What we have is that-- you see under the other, we have a lot of things that we cached here.
These are all read-only parameters that you won't use directly. And in theory, we could have really hidden them. But this is where we cache all the things that are missing in Revit. And then we use these caches later to calculate parameters for more specific things.
So here, for example, you can see that the concrete cast in situ is 3. And brick common is 4 meter cubed. So this is precise metrics. Sorry, this is about lengths.
I'm talking about volumes. Yes, so concrete is 6 cubic meter. And the brick is 8. Because concrete is inside, so it's less. But if you look in a real volume, that wouldn't be reflected.
Same for this wall-- which demonstrates problem 3. If you look at the length, the Revit length here is 5. But if you look at the bottom, the VCF multi-material lengths, it knows that it's 4. And actually, for the brick, the length is 4. But for the plaster, it's 8.
And it's 8 because this one has got two layers of plastic. If I quickly go on Edit Type and have a look in the structure, it's got a finish. It's a plaster, plaster. And then in the middle it's a brick. So basically, they already have this thing now cached not only that it's two layers, but also, it's two layers of 4 meters, not 5 meters as Revit would give you under the length.
So back to the presentation-- so I ran a little bit ahead of the time. I've shown you how we solve the problem tree. But what is the API solution for 2-- which I didn't show where is the correct. So we need to do the same as a manual solution.
If you remember, I show you that, if you do parts, then you get correct volumes. So the idea is, again, to use the dummy transaction. And then in dummy transaction, you create parts from the wall, get materials from the parts, cache that, and then undo the transaction.
So here, we use the part utils class and then the standard elements, get material volume and get material area. And if you have a look, that's gross metrics. This one is transaction for precise material take of [INAUDIBLE] parts.
So here-- yeah, we start the transaction. And then for each element in these two process, which would contain, typically, only walls here-- so if the parts already exist, then we just continue, and skip that element. Because user has already broken the wall in the parts.
But as I say, you don't want to force people to do this for the manual solution. So we'll do it here. If it's not, then we add-- that wall to the list that we need to partition. We create parts. Then again, crucial to call regenerate. And then for each element in this whole collection, we loop all the parts that originated from that element.
And then for each part, we get material IDs, and cache them in some kind of dictionaries, and put that, in our case, in that read-only parameter. But you can put this in extensible storage data, or pack it somewhere. But you hide it from user or whatever. We just choose to show it. Because sometimes it's good to read and look at the numbers, because that was good.
MERRI LAWAN: [INAUDIBLE]
MIROSLAV SCHONAUER: Yeah. Because you can manually check, and you can manually debug. And you can see if something is wrong on example like I did with 1 meters and so on. And of course, at the end you, roll back the transaction.
OK, so back to the presentation-- so we saw the code for solution for 2. And the solution for problem 3, which was the length, we already saw how it's working in our caches. But I didn't show you the code, how that works.
That's quite complex. Because first, you have to do it within the context of previous solutions. You have to have a dummy transaction. And you have to create gross walls. And then from gross walls, you create dummy parts.
And then for each part-- luckily, linear parts in Revit provide length already. And the key here is that the parameter is not the same length as an element. The parameter is called built-in parameter D part length computed.
This one will give you the length of the path but only if it's a straight part. If it's a part from curved wall, Revit doesn't give you anything here again. So again, there are some gaps in the wall.
But what we do then is, if the path doesn't provide length directly-- which will be in few percent of cases for curved wall-- then we assume that wall is a constant height. And we divide the volume of the wall with the height of the wall and the sum of all the widths from the wall structure. Because that will give you exactly the length of the wall.
So let's just a peek in the code for that. And code extract, gross metrics, real linear lengths-- there's the third one-- OK, so all within the context of dummy transaction. So I didn't put it again here. And you just create some dictionary material, two widths. You get the wall height.
Then you have to drill into the wild type compound structure. And for each layer, you have to extract, what is the thickness for each material? And again here, you have to be careful. Because you might have two or three layers of the same material. So you just need to handle that somehow.
I'm sure a lot of you can do this in probably some better way. And you will find better way than using tuples or dictionaries. But this is a solution that works. I'm not saying that's the best.
But it gives you the gist of Revit things to do. I'm sure that die-hard programmers will find some of these things here maybe not the best. But that's fine.
And then what we need to do is, for each part-- if we haven't got length from part directly-- we need to get the materials. Actually, this is what we are trying here. So we are trying to get the parameter D part length.
And then if it's not available or if it fails here-- I hate using the Go To. I think once in a year I have to use Go To in C#. But here, it was so complex, I had to use it just to jump over something.
Then we need to go to this no-parts length. And this is where, for each of these volumes, then we have to extract. First, we get the volume. Then we get the widths from the cache dictionary from the wild type.
And then the length is-- and you have to be careful here translating from-- if you know your caches and meters, Revit internal units are in feet. But you should never worry what Revit internal units are. Because you always should use convert from internal units or convert to internal units. Always use this.
In old days, you have to do it manually, and you get to know what is the type. You can do it for feet in Revit. But if you start working with MEP and these exotic units, you haven't got a clue almost what the units are.
So if you know what is something, you say from something to internal, from internal to that. And use this unit parts. I should have really added unit parts to the useful classes in this example.
And then we divide, as I say, volume with the height and sum of all the widths. And we shove that in our custom length cache. So for this wall here where we saw the problem, as you see, Revit length says 5 meters.
But we know through our algorithm-- we calculated that, actually, the brick, which is mid-layer, is 4 meters long. And the plaster is 8 meters long. Because we have two linear lengths of the 4 meters of plaster on each side.
This is also a bit less of a problem but the nice to demonstrate. T junctions are 90% of the problems here. But for example, for this curved wall here-- again, because I used this very thick structure, Revit tells you that length is 20.42. And that that's correct on the wall location curve.
But obviously, the length of concrete-- if you look at the middle of your-- whatever mathematical is semi-donut or whatever-- it should be a little bit less than a brick. And here, if you look in our VCF lengths, we got that correct. Because this algorithm does it correctly.
So concrete cost in situ is only 18.84 lengths, while the other brick is 21.99 So one is bigger, and one is smaller than what is wall in the middle. So again, 90%, 95% of people don't have to worry with these things. But if you have to worry and if this is your business, then it can be a big, big issue. But you can apply this on other problems.
OK, so let me just try to go quickly. So these are the problems we realized. They are there. VCF had a lot of old plugins, which did resolve some of these issue. But they were disjointed. They were repeating the things.
And then we sat down together and designed nice framework so that they can also develop things on top of that framework, not just me and my colleagues to help them to develop it. And basically, we do three levels. So on the first level, we extract these metrics caches. You can't use them directly in parameter and so on.
On second level, we calculate VCF parameters. And I'm going to show you what that is. I'm not sure we'll have a time for hands-on demo, but we'll see.
And then on the third level, we have something called VCF codification, where they extract on a combination of these values and put them in a custom XLS report for their cost-estimating engine. So these three levels happen in Revit. This is outside the Revit.
Two more things we have to solve-- I just have to mention them. I can't go in details. They also had an issue that, when they extract values from materials, sometimes they need to extract value for collection of materials. But in Revit, you have only one too many. So if you group materials, one material can be only in one group.
But VCF had an issue that, for example, [INAUDIBLE] which means concrete cast in situ, yeah?
MERRI LAWAN: Yeah.
MIROSLAV SCHONAUER: They had several of them. 50, 40-- I'm not sure exactly what the numbers mean. But they wanted [INAUDIBLE] 50 to be in the group but [INAUDIBLE] But they also wanted to in group [? baton, ?] which is concrete. So they want to calculate it when they ask model for all concrete. And they want it also for the concrete in cast in place without any kind of coding yet.
MERRI LAWAN: We have cast in place, concrete cast in place, and concrete pre-cast. And it's the way we built. But when we do process matching, we need to do that of concrete. So that's why we needed to put everything in the same.
MIROSLAV SCHONAUER: OK, so solution to that is we develop some custom Revit persisting data structures. Again, you can store them in extendable data. You can store them in parameters of the materials. That's just implementation.
But the key is that they are persisted in the model. And the idea is that they can create something called VCF material. And then, in this UI, they have a list of all Revit materials. And for each Revit material, they can say all the VCF materials that it belongs to.
So for example, VCF [INAUDIBLE] C 40, 50 belongs to [? baton ?] but also to [? baton ?] [INAUDIBLE].
MERRI LAWAN: And also, it's a good trick. If you want, for example, to not rely on the material name, it's very important. Sometimes we get the material from the architect. So we need to have a special key.
And we set as a value on the specific material attributes. So we don't look at the metal name. We look at the special key. And this tool help us to define the special key on each material.
MIROSLAV SCHONAUER: OK, so that's the materials. And the other thing is room finishes. Now, on room finishes, I won't go in much details. But in Revit, there is no concept of room finish element.
So this was quite a comprehensive solution and framework in itself that we developed over a few months-- initial versions. And at the last AU 2017, we had presentation only on this module. So this is hyperlinked to the presentation from last AU. If anybody's interested, you can have a look. There is a full recording of the demo, and all the materials are there.
So we won't go into more details. But it is important element. Because coming back to that slide now without too much details-- in addition to caches, parameters, and codification, we really have-- the VCF materials also contribute to the codification at the end and VCF room finishes, which take all the finishes from the rooms and know whether they are on the walls, ceilings, or floors. So just for the completeness of picture, that's here. And of course, they also leverage the standard Revit metrics or standard metrics, and standard, parameters, materials, whatever.
OK, so let me go back in the presentation mode quickly. So metrics level 2, that's parameter. Yeah, I have about 10 minutes. I think it should be fine-- and then 10 minutes for you.
So this is now when it gets to real parameters. We designed a framework for all custom VCF parameters. Because they are a calculating one in one plugin, not in another. It was mess-- something was based on GUI. Something was based on name. Some, they didn't have source code, because this was done by subcontractors.
So what we've done is we designed to obstruct VCFParamAbstract class. I'm going to show it in a moment. And the idea is that it's a very easy and quick to derive from this class and define parameter. And just by defining it in this form, it automatically then contributes to all user-friendly UI that we hooked into this system. And from user perspective, it's all seamless.
Now, I'll see if I can do the hands-on exercise. But quickly, let me show what this param abstract is about. And I do provide code here. So this is roughly what is in that abstract class.
So you can see that you can do this through interfaces or through the abstract class. I'm a bit of a old school. So I do more a kind of inheritance wherever I can rather than interfaces. So basically, clients have to provide the parameter name. They have to provide the GUI. What is the type, visibility, modify-ability-- that means can user edit, do not. What is the group that it will be defined with? What is the Tooltip for which categories it's applicable?
And at the end, we have these dependent on MMT. These just help us to know-- if the answer is yes here, we know that we have to calculate those caches for that element before calculating the values. But through this mechanism, we also do parameters which are not necessarily dependent on the caches. So we use this mechanism for both.
And then the crucial thing is that these calculate value. That's the main method that then user puts all the code. Because we will pass the element. We provide the element and also message errors and warnings if they have to call back anything.
And then given the element, the client can write all the code based on this element class, and do just what really they want to do for this parameter, and return the value as an object. The reason it's object-- because it can be ID. It can be integer. It can be double in Revit.
And we also have a concept of even the attributes for the parameter. That's a bit of [INAUDIBLE]. So this is something I wanted to do live to show you how quick it is to add it.
But I'll probably just Copy and Paste the code. But the idea here is that-- so first, I'm going to close the Revit to make sure I can compile the code. Save changes-- yes in VCF parameters.
So you see this is all the list of parameters that then VCF developed based on our VCFParamAbstract. So really, we didn't need to get involved into the nitty-gritty of their business logic. But we provided the framework, where they can just do this very quickly.
So for example, I can add a class. And what did I call it? My high column param. So we are just going to do something which classifies column as high or not high.
And if you add it here, what you need to do is we need to use Autodesk. [INAUDIBLE] I believe that's all that we need. And what we do here is then we derive the class from VCFParamAbstract.
And then just by right clicking here and implement-- there is implement interfaces 1-- implement obstruct class. This does all the code for you. And here you have to say what is your GUI, what is your parameter name, what is the Tooltip? So all these things that you have to do manually.
Now, for those of you who don't do API, you may think this is just another API solution. But for those who develop parameters for APIs, it's quite clumsy. You have to look if parameter exist in the model. If it doesn't, then you have to look, is it in current shared parameter file? Do you go to--
So this shields you from all that crap. And that was the first-ever featured developing Revit API parameters. So it was a little bit jumping here and there. It's all doable, but it's a lot of ugly code. And this shields you from that.
So what I'm going to do here, just to shorten, unfortunately-- I wish the class was for two hours. Because I could have done more things live here. But what I'm going to do is-- in this code, I have a stream here-- VCF parameters. So in bonus is high column.
So if you look-- if I just hide these two things, it's dependent on MMT [? falls ?] which categories it's irrelevant to columns, structural columns. You put the GUI in. Let me just put the new GUI to make sure that we haven't got anything in the model. So tools, create GUI, new GUI copy-- and let's put the new one to make sure that--
MERRI LAWAN: It was agreed. It is very important for dealing with shared parameter. We have a custom template. We share parameters. So we need to check if it's the right GUI. So it was very important, too. So we don't look at the parameter name anymore.
MIROSLAV SCHONAUER: So that's all the very simple ones. And then what we are doing in the main calculate value, if using-- let me set this to false first. So if you use this false, what is happening is we have called the threshold in meter is 2.5. And then basically, what we are saying is, if structure column is higher than 2.5, we return 1, which is yes and otherwise no as 0-- as simple as that.
And the other one should-- let me just have a look this-- should compile. OK, so that all compiled. And I should have really shown you the dialog before. Actually, we've seen it. It's recorded when we were doing caches.
This parameter wasn't in the list. And now just by compiling and by starting Revit again, this parameter will be in the list of that custom UI. And user will be able just to check and say, yes I want to calculate this one.
MERRI LAWAN: And the good thing-- it's creating the primary parameters on the price. So even if we don't use our custom template, we can use a plugin. And [INAUDIBLE] after, we can transfer our schedules, and our tags, and it will work.
MIROSLAV SCHONAUER: So if you have a look in columns-- if I select this column, yes, we have caches. But we haven't got, in data, anything like that. So what we can say is in the [INAUDIBLE] meter [INAUDIBLE] parameters for the, let's say, current view to keep it simple.
And now because it's only columns in the view, system gave us only the VCF parameters, which are applicable to columns or structured columns. So I don't think I've re-compiled the code. It should-- wait a second.
Let's save that. I think--
MERRI LAWAN: [INAUDIBLE]
MIROSLAV SCHONAUER: Sorry?
MERRI LAWAN: Did you--
[INTERPOSING VOICES]
MIROSLAV SCHONAUER: Yeah, I did. It's in the project here. Let me just rebuild solution to make sure. OK, it all succeeded. Let me start from the debugger just to make sure that I'm loading this one. It should be there.
Yeah, that's better. Because last time, it didn't ask me. That means it didn't pick the new DLL. So you will see, this is quite fast, even from debugging.
OK, so VCF metric [INAUDIBLE] param for the current view. Ah, sorry. I didn't-- yeah. I should have done this control. Sorry about this. When you try to rush, I created a class, and I shown you the one that I'm going to give you. But I didn't put it in the code.
So Control-R, Control-Copy-- this one is Control-A, Control-B. Is new column, AU-- [INAUDIBLE] is new column. OK. So this is the one that I'm giving to you. And this is the one that added to project, of course.
Very silly-- let's make sure that this is done. OK. And now I think we can start throw Revit like this. It should be fine.
MERRI LAWAN: So it just shows how many of you are using the part to get more accurate metrics on Revit model. Do you use a part command? No, nobody?
MIROSLAV SCHONAUER: Right. So [INAUDIBLE] parameter, current view-- here it is. Now it picked the AU high column. So I'm going to check that one. So I want to calculate that parameter, block calculate. OK, so that will now calculate the caches but parameter, as well.
And now we have this structure column, which is 1 meter high. AU is high column is unchecked, because it's under 2.5 meters. This guy, which is 3 meters, is high column-- is checked. And also, you shield it from the users, because it's read only.
So you are in control. And they haven't got time to mess it. And it works for columns. It works for structural columns and columns.
So let me just then quickly run. On the same columns, there is one that VCF does. This one is academic sample, because I can't call it 2.5. But we have an option where we can calculate ranges and pass the ranges to this UI.
And that one is a [INAUDIBLE], isn't it? Yeah.
MERRI LAWAN: Yeah, we use it as a key to differentiate different framework height. There are tool.
MIROSLAV SCHONAUER: So this one provides even something that we call parameter attribute so that you don't have to [? hard code. ?] But you click on this. And this is the list of doubles.
So I provide list 0, 1.5, 3.5. And now in the code, it will look for the ranges. And it will create parameter name, parameters of string nature, which has a name. And it will say, height is in between these ranges, or height is in between these ranges.
So if I select that one and say, calculate, now for the small one, it would tell me H is 0 to 1.5 meters. This one, height is 1.5 to 3.5. And this one should be high-- is over 3.5.
And now when you have these strings, you can use can in schedules. You can use it for coloring. You can use it whatever you want.
And as a matter of fact, we have loads of other so-called utility tools which are not topic of this class. But let me just use one here. So what we can do is we can create parameter filters now.
So for columns, I don't want doors. I want columns. And I want not [INAUDIBLE] Let me do this-- check none.
So what we want is columns. So four columns, you see, we have these parameters and structural columns. Structural columns-- here it is. So we want to create parameter filters based on all the values that we find in the model for the this parameter.
So here, there are three different ones. I'm going to click on Create Filters. What happened is we automatically, in the model, in the view, and in the filters-- we automatically created [INAUDIBLE] So you don't have to care to do this manually. You just search for model, find all values, create parameters.
And then we also have another utility, which is a duplicate active view by param filter. So what this will do now is-- we want to use these three filters. And this current view will then automatically be duplicated and filters set in a view according to these three that we calculated. And the view will be calculated.
And now this has got only ones which are 0 to 1.5 meters. This is only 1.52. And this is over 3. So in that case, they just want to do this quickly.
But is this good, yeah? And you can do this with loads of things, with foam work. This is area we call productivity tools. So this talk is not on productivity tools.
But we hope we can probably have a talk next year on only this. Because what we've done in the background-- if you look in the view visibility, I create these filters based on other ones. And the only thing is-- I said this-- but you may go back and then have this in the colors or whatever.
MERRI LAWAN: You use that to create different view sheets on different Revit, basically or are on different area of the building.
MIROSLAV SCHONAUER: So here, you can start how we are starting to connect why we create parameters, tools for productivity, and so on. So yeah, apologies, Merri will probably then go a little bit over the end. But I wanted to show you this.
I'm just going to quickly go through the next few slides. So we also cover-- this is probably most complex one, which calculates the floor area for which you have to put foam work. I won't show this.
And the level 3 codification and BOM export-- Merri will show that in his example. And so I won't go into much details here. And I won't talk much about gaps about parts. Because I think that's another good topic for the next year presentation.
And we'll probably prepare a bit more code. But it's worth mentioning it in the notes. OK, so I think we will probably go a little bit over the end. But please feel free, if you are rushing somewhere-- but Merri we'll show you, then, this level 3, how everything works in a real, big model.
MERRI LAWAN: So basically, this is a typical building. 90% of our project look like this. So this is a full view of our buildings.
So we have a couple of tools. Here, we have-- if they go to services, this doesn't run in Revit. It's a separate executable.
So it helps us to create our codification. So codifications important to get the right price. So we have our own tree node of codification-- so one here for the concrete structure and for all the subcontractor.
So we needed a way to define this structure. And most important also to define a complex formula. So we will later associate each codification to some Revit components. And then the plugin will look at the codification and apprise a correct formula.
So for example here, you can see a custom parameter, a calculated parameter. So we calculated within our plugin. And here on another example, you can here tell the plugin on which category you want to run the calculation. And you have a special multi-category value, where we can take-- if we apply this, we can get a metric from multi-categories.
So this was very important. Because Revit doesn't allow us to do this. And we have also most complex formula, like for the framework. So we can have a really complex formula with addition, subtraction, and multiplication.
We can also group our filters with some condition here. So we have already all the flexibility to complex formula on this tool. So we define everything here.
And then we have another tool inside it that runs inside Revit, where we can assign object codification. So basically, in our custom template, all the codification are already assigned. So when we model a wall, it comes with all the codification.
But if you want to use it on another project-- so we can load this XML switcher before the codification and also formula. And then you can look again at the formula here in read only. And you can appraise the formula with a specific button on the specific Revit types.
Or also, it doesn't have to be applied to a specific Revit types. So basically, it will look-- if it's a multi-category codification, it will look at all the categories or only on specific set of categories. So we have all the flexibility here.
And once it's inside, it's assigned. So then we can launch another [INAUDIBLE] here-- so we'll adjust the [INAUDIBLE] to show you how fast is it. So we calculate everything. We can export the Excel file.
So it will reload the model, also calculated parameters, also caches. It will apply the formulas under specific categories where we specified. So demo-- it's ready.
MIROSLAV SCHONAUER: Oh, is it?
MERRI LAWAN: But I have the Excel file here.
MIROSLAV SCHONAUER: Yeah, Excel file. I must have missed this one.
MERRI LAWAN: So this is the resulting Excel file. So it exports everything on the format we want with the codification. And then we can import it directly in our customer's estimating tool and planning tool.
So this save us a huge time. Because to do this kind works, it will take us, like, two weeks-- very tedious task. And we can run it on-- it takes, on the real project, if we calculate all the parameters, all the caches, and we export, typically on this kind of project, it lasts only 20 minutes to do this.
And we have also-- we didn't talk so much about the room finishes. But is this really unique. I didn't see any such tool on the Autodesk Store. So Miro did a good job of generating automatically all the room finishes based on the room boundaries.
And we can get from this the net wall area for the paintings, for example, or the [? net linear ?] for the print. And basically, the plugin with cache all the value. And we can reuse this cache to our general BOM exports-- bit of material export.
So everything is well-integrated. We are able to get the most accurate quantity takeoff from Revit. And we are able to group everything under a very well [INAUDIBLE] way. So with this switch of tool, we were able to [INAUDIBLE] with our [INAUDIBLE] tool needs.
MIROSLAV SCHONAUER: And I think they completely eliminated external contractors working with Excel and numbers. They do everything in-house now with Revit. And this is always done on a one, single triangle adaptive component. So have a look in the link that's provided for the last year.
Because we had only 20 people. It was, I think, very odd time last year. But I hope some of you may find interested to have a look there, also.
OK, so apologies for running a little bit over. I think we try to squeeze a hour and a half in one hour and just give you as many hints and tips. Because we wanted to give you to start looking into these things a bit more and thinking open-mindedly. And yeah, anyway, it's lunchtime. So we are open for questions and discussions. Thank you.