说明
主要学习内容
- Learn how to connect Autodesk Tandem information to your favorite external applications.
- Learn about the power of the Autodesk Tandem REST API.
- Learn how to create Autodesk Tandem data flows using FME Workbench.
- Learn about automating workflows using FME Server.
讲师
DAVE CAMPANAS: Hello, and welcome to integrating Autodesk Tandem with Business Intelligence Data Flows. My name is Dave Campanas and I'm an applications expert at Safe Software.
OK, what we're going to be going over today is we're going to give you a quick introduction to both Tandem and FME. And then we're going to show you how to prepare Tandem for connecting to it with FME. And then we're going to do a couple of demos. We're just going to use FME to update tandem from an Excel spreadsheet. And then secondly, we're going to use Tandem in a real-time business intelligence data flow, where we're going to use the FME server automations to monitor and update tandem from IoT sensors. And then we're going to update a Power BI dashboard from the updated Tandem.
So let's start with Autodesk Tandem. Now Autodesk Tandem is Autodesk's Digital Twin platform. Its cloud based and you can populate it from Revit files or IFC models. And so let's take a quick look at Tandem. Now we can talk more about it here.
OK, so this is the Autodesk Tandem interface. You start off on the Facilities page here. And this shows you all the facilities you have access to, whether they're owned by you or whether they're being shared with you. You can create a new facility by clicking on this button here. That brings you up a dialogue. Then you just type the facility name. We'll just use test.
And you can pick a facility template. Now facility templates is like a schema for the facility. So I've got a custom one I've created. We'll just call that residence. You can set a project name, a facility owner, and a facility address if you like. We're just going to skip those and we're going to hit Create.
OK, so we have a new facility now and there's nothing in it. So what you want to do to your facility is you want to add some models. That brings up this screen where you can set a label for the model and you can drag and drop an IFC or a Revit file in here to kick off the model creation. You also have a setting here where you can choose the phase of the model to import.
Now, you can do this from a file upload or you can choose the file from the Autodesk Docs, any project files that are shared with you. So I'm going to cancel all of this because we don't really need a new facility. Go back to the Autodesk Tandem and there's our new facility created there. And since I've shown you how to use it, I'll just delete it. There we go.
OK, so let's kick into a real facility where we have a model loaded. We'll double click there. And it's a dormitory building supplied by Autodesk. And if we look at it, we've got a nice model that we can zoom around very similar to the Revit model. This was an import from Revit. If we click on any of the features we can see the properties come up on the right-hand side.
The basic properties here, we have the design properties that are all the information that is brought in from Revit. So a lot of this information is fixed. It's been brought in from the model and you can't modify it. Now we can add parameters later that we can modify.
So on the side here, we have some filters where you can, if you like, filter the data, the view of the data. So we can just choose certain floors to display. We can display certain categories. We can display just certain pieces of Revit. You can also save these filters. So I've saved a filter for this one and I've just called it rooms. And this just gives us a picture of all the room information on this that we can use later.
So that's pretty much the basics of the Tandem interface. Now we also-- Tandem also has a REST API, which we're going to be using, at least in the background. And the REST API, they have some documentation for it here and they have some samples. And this allows you to communicate with Tandem and to modify the model using REST calls, which is kind of cool. And we'll show you how that works a bit later.
OK, so this back to the slides. So that's Autodesk Tandem. Now, a few things about Autodesk Tandem is Autodesk currently considers it a Descriptive Twin in this Digital Twin Maturity Model. So it's the lowest level of Twin right now. Basically, it's stored all the data from your model, but it's not easily updatable at the moment. But what we can do is we can use FME to improve Tandem's data connectivity. We can use FME to move data in and out of Tandem, and thereby, boosting it up the scale a little bit.
So I've mentioned FME. Let's talk a little bit about the product. So FME is our Enterprise Integration platform. It allows you to basically migrate your data from a very large number of apps to any other large number of apps, or formats, or databases. There are two parts to FME. There's the FME Desktop, which is a desktop application that you use to build and test your data flows. You can get by, quite frankly, using FME Desktop to do a lot of the translations.
But if you want to maximize the value of your processes, you can then publish those up to FME Server. And FME Server is our Enterprise application. And it can run either in premise or in the cloud. And that allows anyone in your organization to run your data flows through a simple web interface.
This is just a little more information about FME. We connect data across 450-plus systems. We've got 500 of what we call transformers. These are little widgets we use to manipulate the data as it's going from one system to the other. And it lets you restructure your data to best fit the system you're going into. With FME Server, you can set up event-based and stream processing self-serve apps, et cetera.
This is a little bit about the company, Safe Software. We've been around for almost 30 years. There's 13,000 different organizations using our software in 128 different countries. So we're basically-- we like to think of ourselves as the leader in spatial data integration.
Now this is a fun, little chart showing where we started, as a GIS to CAD translator tool, and how we've grown over the years, adding different types of data, 3D, Raster, BIM, Internet of Things, Business Intelligence, Indoor Mapping, et cetera.
OK, so that was a brief rundown on FME. Let's have a look at Tandem and what we need to do to Tandem to get it ready for working, or for being updated through the FME process. So the first thing I did, I pointed out the parameters before they come from Revit. And those are pretty much fixed. What we need to do is add some new parameters to store the data that we're going to be bringing in. So let's sneak on over to Tandem and have a look at that.
So we'll go back into the dormitory sample. Actually, sorry, I'm skipping ahead of myself here. We're going to go to Manage first. Under Manage, there's a section called Parameters here. And we'll click on Parameters. This is where you can create your user parameters or custom parameters. And these are parameters that you want to store your own data in and attach the various features.
So you can do that by clicking on the Add Parameter button. And you just have a parameter name. You can choose the category, whether it's general, all disciplines, architecture, et cetera. And you can check the content-- sorry, the context. You can set the parameter on the element, or on the type, or on spaces, or facilities, whichever level you want to set it on. You can give it a nice description. And then, more importantly, you can set the data type. So we have a choice between text, number, count, Booleans, date, times, and URLs.
And I'll cancel out of that. I'll just show you some of them the parameters I have created here. We've got-- most of them are in general, but I have one in mechanical. That's just the operating status of that piece of equipment, with general occupancy status, name, et cetera. And most of them are text, except the operating status, which is a Boolean.
So now we've got these parameters, what we want to do is apply them to the model. But we've got to do that through another step. And that's called a facility template. We'll skip to that. I mentioned that before, when we were setting up the model. But a facility template is like a schema for the model.
So we have our different codes, a description of the codes. And then on the different codes, we can add these parameters. So to the mechanical equipment, I've added the parameter operating status and a parameter name. Because a lot of the stuff that comes from Revit is not individually named. And then on the rooms, I've added a room type, resident name, and an occupancy status. That's the sort of stuff we can fill in.
OK, let's switch back here. Now, the second thing we need to do to make Tandem ready to be modified from an outside source is we have to create a Forge app. And that sets up the whole API process, and sets up all the authentication, and everything you need to connect to Tandem through the REST API. So let's go see how we can do that.
So we go to our Forge page. And if you don't have a Forge account, I believe you can get one for free, just set one up. And then you can go to My Apps. Now, I've already created a Forge app to work with the Tandem data set here that my demo's going to use, but I'll create another one just to show you how it's done.
So we hit the Create App button. We give a simple name to the app. We'll just call it test app. You can give it a brief description. And you give it a callback URL. And that-- I think that is more relevant if you're doing some sort of user password authentication or anything, so it knows where to go back to once it's hit the authentication. But I just basically type in local host, kicks you back to the computer, and it's happy.
Website URL, that's optional, so we'll skip that. And then we have the choice of APIs you want to use in your app. And just to be sure everything was going to work, I grabbed them all. So let's hit the Create App button. Oops, I went into description. OK. And there you go. Create App button.
OK, now the app is created. And it's going to show you some very important information about your app here. And it's these three fields here, the Client ID, the Client Secret, and the App Name. Now, the Client ID is-- I'm going to make a copy of that-- that's the ID of this app. And there's a few places we're going to need that. The Client Secret is kind of like a password. So you definitely want to save this someplace safe, but you are going to need it later. And then the App Name, which we're also going to need.
So once we have these three pieces of information, we can switch back to Autodesk Tandem. And we are going to go back to our Facilities. And I'm going to open up the dormitory facility. And now that we've created this Forge app, we have to tell the Tandem that this Forge app is allowed to play with a particular model.
So we go down to the users. And you can see I have a couple of users for this Tandem model. One is me and one is my Tandem REST app. And we can add our new app to this by-- if we just Invite User. We'll click Service. Now here's where it wants that Service ID that I copied. So I Command B to paste that in. Service Name, we called it test app. And now another important part is Permission.
So if you want an app that's just going to extract information from Tandem, you can just read, you can read and write, or you can manage. We'll go for manage. We'll go for the whole system here. And if we go Add. And there we go. We have a new user up here. These down there as a manager. And if you're dealing with any of the REST APIs calls, you can then use this app for your authentication.
So that's ready to go. So we're all prepared. We've added the new parameters. We've created the Forge app to communicate with the Tandem REST API. So let's go look at our first demo.
So here we're going to update Tandem from an Excel file. So I have an Excel file with some room parameters in there. And I'll show you that here. Whoops, that was what we go to. Sorry. So now we have the Excel file and it's basically just a simple table. We have the room number here, room name, level, folder name, et cetera, and resident. So we're going to just move this data over into Tandem. And we're going to join on the room number, which is one of the attributes that did come in from Revit on the Tandem.
OK, so let's get into this. And we want-- there we go. So now, this is the FME workspace that is going to be doing the update for us. And I'm going to take this opportunity to explain a little bit about FME.
This is our desktop product, FME Workbench. And this allows you to create the data flows to manipulate your data. So this little tan widget we have here is a reader and it's reading the Excel file. And if we go to Navigator and open up, we can see that it's pointed to the Excel file I was just showing you. It's got on it a number of attributes that are taken from the column headers in Excel. And it's going to output each row as a separate piece of data or what we call a feature.
Now we have these blue widgets. These are what we call transformers. And these are designed to do single process to the data. So you string a bunch of them together through connections to create your process flow. And you can open up these transformers and adjust the settings on them as well.
So here, this is a tester. All we are testing is to make sure this identity data number, attribute that comes in, that it actually has a value. And that's going to allow us to separate the room features from all the other features that are going to be read in from Tandem.
Now these green transformers are what we call custom transformers. And they're essentially transformers that are made up of other transformers, macros, if you will. And if I pop this open, you can see that we've got a whole slew of things going on in here, a lot of which dealing with the HTTP caller, which is-- this is the main transformer we use to work with web data, and work with APIs, and stuff.
Now this is what works with the Tandem API, the Tandem REST API. And there's a lot going on. You've got to authenticate. You've got to download the schema. You've got to download the data. You've got to change it to the schema. But, quite frankly, I've created this custom transformer so you guys don't have to worry about any of that.
So we have-- this custom transform is quite simple. All you need to do is enter a few pieces of information here. So we have the Client ID, and that's the same ID that we had from the Forge app created. This one requires the Client Secret ID as a password. Because both of these are sensitive information, we password encoded them so other users can't see their value.
And we also need the model location or the model name. And you can get that by scooting back to Tandem. OK, where are we? There we go. You go to Tandem and you look at the URL on your Tandem interface, you have this section here. And that is the facility ID or the model ID that you want to work with. So you just copy that-- oops-- and paste that into this section here. And that way we know we're talking to the correct model.
OK, and then, finally, we have a section here where it says Tandem IDs. Now I have this blank. And if it's blank, we will extract all of the data from Tandem. But we can also fill in, if we want, and add Tandem IDs, if we know the Tandem ID, to just specify certain features we want to download. And that can be a bit faster, if necessary. In this case, we don't really know the IDs of the rooms, so we're just going to grab everything, and then we're going to use the tester here to sort out the ones we want from the ones we don't.
So I'm going to run this quickly right now, because it takes a while to run, and then just talk about the rest of it. So finally, at the end here, we have the Tandem Updater. This is another custom transformer. Again, it's got a whole lot going on inside that you don't need to know about, but if you want to dig in, you're perfectly welcome to go in and have a look. And the Tandem Updater, again, has a fairly simple interface. It wants the Client ID, the Client Secret ID, Tandem project name, again.
Now this is an updater, so here we're actually changing the parameters on a particular feature. So we need to know what that feature's name is, or the number. And that's the Tandem Key. Luckily, that Tandem Key is coming in from the source data, so it's kept along. We can just pick the attribute that has it. And then we also want the attributes to update. So we're not grabbing all the attributes on the feature. We're just going, well, which ones do you want to actually send to Tandem to update?
And these can be picked from a list. In general-- and you want to keep the same name as you have in Tandem, so you have the classification here and then you have the actual parameter name there. Oops, it turned them all off. That's not good. OK. And then once those go through, that will update the Tandem with that information.
Now the other transformer is here. The basic logic is we sort out the rooms. We are merging the room data in this feature merger. So we have a room number from Excel. We have the [INAUDIBLE] room number from Revit. And we're merging on those two fields to join the two data sets together. And then we have an attribute renamer here, which takes the Excel names and renames them into the appropriate Tandem names. This is kind of a simple example of how I said we're restructuring the data. We're actually federating the data as part of the translation process.
So let's skip back to Tandem. And after we do one of these updates, I find it's always best to go out and go back in again. Then if we click on one of the rooms, we see that the new parameters that we added to the rooms have now got data in them, whereas before they were empty. So we have successfully updated our Tandem data set from Excel.
Now, this is all well and good, but this workbench is run-- we've run this on the desktop. And you can use it and you create it, or you could share it with your fellow workers if they have FME and so forth. But that's not a really good way to make everybody in a company be able to use this. So that's where FME Server comes in.
So we can take this workspace-- and if we go to a file and we move to Publish to FME Server, then we can pick a connection to the FME Server I have set up for this demo. And we go Continue. It comes up with a little screen here and asks us, where do you want to publish this workspace to?
So it's got a repository and says repository name. The repository is kind of like a folder on a server. So there's a few folders already set up. You can create a new one here if you want. But I've already created one for Tandem. So I'm just going to throw it into Tandem Repository with some of the other transformers-- sorry-- with some of the other workbenches.
And then next it comes up and asks us to register this against the service. For most workspaces you'll just register it with the Job Submitter. And that's the basics-- it will run the job and let the workspace take care of everything. And that's what we want, where our output is. We're writing up to Tandem. We don't need anything sent out. So that's good.
But we have the data download as-- if say, we were outputting a CAD file, this would come back to the user and give them-- once the workspace is finished-- come back and give them a zip file or a link to a zip file that they could download. Or we have data streaming.
Data streaming is used if you've got a workspace that returns an image, like a PING, or a JPEG, or it returns like an HTML form. And you want that to stream directly back to the user. And so it's like a seamless sort of thing. You can set it up for the data streaming service as well, but we'll just stick with the Job Submitter.
So I'll publish that up. So now it's published. We want to skip back to here. We'll have a look at FME Server. So this is FME Server. It's a-- like I said, it's an Enterprise app. It's accessed through a web browser. We have a web interface here, whether we're dealing with cloud one, like I am, or an on premise one. There are a bunch of things you can do on the side here.
We've just published a workspace up. So we're going to look at-- we're going to go see if we can find it and make sure it's there. So we click on Workspaces. We can go to Tandem, Update Room, there's our workspace, cool. It's there. So how do we run it?
Well, we can click on it and we can run it through here if we want, just by dragging and dropping Excel file. But this is the FME Server interface. We have to log in. So this is a fairly restricted interface. And it's mostly not for people configuring it. So again, it's not as accessible to your entire firm as we'd like it to be.
We can take one more step and we go Create a Workspace App. And here is where we can create-- we give it a name, Update Rooms. We can give it a title so that looks a little prettier. We can give it a description, that's optional. And then here, we pick the repository. So it's like, where is the workspace we want to create an app from? We've picked the Update Room. We've got that already. Service, if we registered with more than one service, we'll have a pick list here. But we only want with the Job Submitter, so that's all that's available.
Now, the expiration, this is the expiration of the token. So these workspace apps are designed to be used by an outside user, basically anyone. So it's given a token to run-- that allows them just to run this workspace, a login token. And you can just pick the expiration date. The default is 10 years, which means it's pretty much never going to expire. But if you want to, say, only make it available for a short period of time, you could then just have a shorter token date, say, for a week, or two weeks, or a month, or something.
We have Require Authentication. We can turn on or off. And then set the allowed users. But in this case, again, company wide we don't want it to authenticate. And then User Can Upload, we definitely want to turn that on, because we are going to be uploading that Excel file to use to update the Tandem with.
And there's another series of things down here that you can pick. And if you want to customize the web page that this is going to be displayed on, you can put in browser icons, or backgrounds, and headings, and make it-- give it the look and feel of your corporate website if you like. But what I'm going to do is hit that. So I'm going to click OK.
Now it's created the workspace app and it's given me a URL. So if I copy this URL and I paste it in another browser window, hit return. And wait a little bit. There we go, Update Rooms. Now we're ready to run.
So if I drag and drop the Excel file into there it automatically uploads it to the server. I hit OK. And now it's run off. And now the FME Server is going to be updating those rooms again. And that's-- there we go. So let's go back here.
So that was our first demo. We saw how we can quickly update through FME the Tandem data. And we also were reading the Tandem data as well. So we got to read, we got to write. So now let's try something a little bit more ambitious. And we're going to try to use Tandem with our real-time Business Intelligence dashboard.
Now, the scenario here is we want to update Tandem from IoT sensors. So let me just show you the Tandem side of things here. So we'll skip out of that facility. I've created another facility here. My first Revit file, so don't judge me too hard. But it's basically modeled after Vancouver Airport. And let's just go to the equipment view here, filter.
We have equipment here, elevators, escalators, people movers. And they've got on them those new parameters I showed you. They've got a name on them and operating status, yes or no, so we can see what pieces of equipment are and whether they're running or not. Now, this data has all being pre-populated by me. So they're all running and they're properly named.
So what we want to do is get some IoT information to update this. And then we want to have a second process that takes that update and pushes it up to a Power BI dashboard so you can see in real time what pieces of equipment are working and aren't working. And meanwhile, we're keeping all that data stored in Tandem. And the reason for that is there's this little history thing on Tandem where we can look at each piece of equipment and-- as you can tell, I've run this demo a few times, but we can test-- we can see when it was working and when it wasn't working. So Tandem gives us a repository of the history that we can go then and analyze further afterwards.
So next slide. So this shows you the data flow that we're going to be doing. We're going to start with an IoT hub, whether it's AWS IoT or IBM's Watson. it's going to push up to a webhook that's going to be intercepted by an FME workspace and server, which, in turn, is then going to update the Tandem with the status information that's being pushed from here. And then we're going to have another FME workspace that has is going to pull the Tandem and get the equipment. And then push that status up to the Power BI dashboard.
And speaking of Power BI, maybe we should look at that as well. So here's the Power BI set up. So I've just created-- this is fairly simple. I've just created a real-time streaming data set and then a dashboard to display it on. So if I show you this data set, it's got the API info. So the real-time streaming is basically giving us a URL to hit. And it's given us a little sample of what it's expecting to see in its package. So it's a simple JSON package with the equipment name and the equipment status. And that's numerical value.
Now, one thing, getting back to this, is because our Tandem model is fictitious, it's not real, I just made it up, we don't actually have any sensors. So in place of the AWS IoT or the IBM Watson, these are core tools that can be used to collate your IoT data and push any changes up using a tool, webhook, using an HTTP call.
So what I'm going to do, instead of that, is I have another workspace that basically it's going to simulate it. We have a creator, creates about 1,000 features. It spaces them out, so one feature pops out every five seconds. It uses random numbers to pick a random piece of equipment. And then it uses the HTTP call to send up the information to the webhook with the sensor name and the sensor state. So it's going to turn them off. It's going to wait a few seconds, then it's going to turn them back on.
So I'm going to run this workspace. Let's get the simulation started. And we switch back. OK, so we switch back to Power BI and we go to the Equipment Status dashboard. There we go. So this is the real-time data stream that's being displayed on your board. And you can see, now that I've started the simulation we're turning some things off. That's when they go all white. And we're turning them back on. That's when the bar goes green again.
This isn't the most snazzy display, but it was what I could do with the limits of Power Bi's real-time data streaming. So we can see this working in action there. But the one thing we really haven't covered is how this all works through the FME Server. So let's go take a peek at that.
So if we go to FME Server-- we'll go to the server apps, go back to the main interface. Now, we have a tool called Automations. And Automations is kind of cool. So if we Manage Automations-- and this is one I've built to essentially handle this process.
So I am going to quickly-- let's see, we want to stop the simulation because I want to stop the automation for that second, take a look and talk about it. So all automations start with what we call a trigger. Now, the trigger here is what's going to be used to kick off the automation. And we have quite a few things that we can use.
In this case, I've used a webhook. So a webhook is just a URL that is published. And any time anything is pushed to that URL, say-- and that's what we would-- that's what the simulator does and that's what we would set the IoT core to do-- any time that anything is pushed to that, this will kick off.
But we can also set the triggers to all sorts of things. We can have emails coming in. We can have S&S topics. We can have queuings We can keep an eye on S3 buckets. Or we can keep an eye on FTP servers or even local directories, if you will. There's all sorts of things that can kick off this automation.
Now once the automation is kicked off, the first thing it does is it runs a workspace called the Update Tandem. And that workspace essentially grabs the message from the webhook sent by the IoT core and passes it onto this workspace. And that's the one that's going to update Tandem. So let's go take a look and see how that works.
Here we go, we'll open and update Tandem. There we go. No, Don't say changes there. OK. So, again, a fairly simple workspace. It's just got a trigger feature that kicks off. It extracts the message that's being passed along to it from the webhook. That's a bit of JSON. From that message, it extracts the sensor name and the state. So if it gets an off message or if it gets an on message, it'll extract that.
The next thing it does there is it maps the sensor name to the Tandem ID of the equipment that it needs to update. So we've gone through and we've looked up these IDs for the Tandem equipment. We put them all in this lookup table here. And then it uses the Tandem Updater to update that Tandem Key with the change, the new value of the mechanical operating status. And that's pretty much it. That's all it does. And that is going to get kicked off any time the IoT core sends off an update message.
Now, after that's been done, we have a second workspace. And these-- the way this is set up, these are run in sequence. We can run things in parallel too if you want. This is run in sequence. And this is Update Power BI, so after the workspace is finished updating Tandem with the new state, this is going to run. And this workspace we will look at.
OK, this uses a Tandem Feature Extractor. And here we have a list of Tandem IDs. And now we've basically grabbed the IDs of all the equipment. So we're not just reading one piece of equipment that's been updated, we're reading them all. And the reason for this is if I just read one-- read the one piece of equipment and updated the Power BI, it kind of scrolls down and the order doesn't stay the same. So by reading all the equipment, running them through a sorter to sort them alphabetically.
And then I create-- using this JSON templator, I can create a little JSON package, which merges all of the pieces of equipment together. And then we post that up using the HTTP caller. We post that up to the URL that the Power BI had set for pushing to the streaming data set.
And we can see that here. I don't know if I showed that yet. In case, I didn't, there we go. We can go back to test. There we go. Yeah, it's streaming data set, API info. Yeah, I think I showed this before. So we're good.
So now that we've set up this automation, we can start it again. There we go. And then if we go back to running the simulator again-- OK, there we go. Run the simulator again, bring up the dashboard. And our updates are happening and we can see that.
So that pretty much wraps up the two demos I wanted to show you. They're not meant to be definitive ways you can update Tandem and work with Tandem, I just wanted to show you a wide range of things we could do with FME, and FME Server, and Tandem. I'm sure you guys all have your own problems that you want to solve. Now maybe you can use some of these techniques.
So in conclusion, we know that Tandem Twins can be set up for Revit or IFC. FME can use to extend Tandem with external data. We've seen that. And then you can use FME Server to enable complex automated data flows with Tandem.
So resources, if you have any questions about this presentation, please feel free to contact me. That's my email address here. If you want any more information on FME or you'd like a free trial of FME Desktop or Server, please go to our website at www.safe.com.
If you are an FME user and you need any assistance using FME, or you are looking for frequently asked questions, or you want to talk to other FME users in a community, we have community.safe.com. All that stuff can be accessed there, as well as our documentation.
Now, if you want more information on Tandem, that's the link for the Tandem Help Page. And finally, at the bottom, we have the link for the Tandem REST API documentation.
That brings us to the end of my presentation. Thank you, guys, all so much for attending. And I hope you have a wonderful day. Thank you.
Downloads

Introducing the Autodesk Tandem API: Building Your First Digital Twin
