説明
主な学習内容
- Discover the basics of Forge
- Learn how to create your first app based on Forge
- Learn how to use OAuth and Data Management
- Learn about Viewer
スピーカー
- MJMona JalilzadehMona Jalilzadeh is a Technical Consultant with Autodesk Global Consulting. Mona has an Engineering background and has empowered Autodesk Enterprise customers for last five years. She works with Autodesk Cloud Technology and her primary focus is Autodesk Forge. Mona helps Autodesk high profile customers by understanding their business needs, designing, developing and delivering detailed solutions including innovative custom applications, automation, and cloud-based integrations.
- Augusto GoncalvesAugusto Goncalves has been an API evangelist at Autodesk, Inc., since 2008. He works with all sorts of technologies, from classic desktop to modern mobile and web platforms, including .NET for AutoCAD software and Revit software, and JavaScript application programming interface for NodeJS.
- DPDimitrii PokrovskiiAutodesk Consulting
MONA JALIZADEH: Hello, everyone. I know you didn't have enough break. But one hour is very short time, so I really want to go ahead and get started. I think most of you already were in the first class. That's going to be easy to follow, some of this structure. There are a lot of similarity between this class and the previous one. I'm going to explain the differences, so you can decide if there is any value for you to stay on the class or not.
So this is a little bit about me. I have a technical background, and I work with Autodesk Enterprise customers to use Forge API to create custom solution, custom dashboard, integration. So basically, my background is software engineering, and I do development with Forge. And Dimitrii?
DIMITRII POKROVSKII: [INAUDIBLE]
MONA JALIZADEH: See if this is going to work.
DIMITRII POKROVSKII: So I work with [INAUDIBLE], so I do Forge integrations all day long. And I'm here to help you guys out when the lab is going on. And we actually have more members from our team here, that are here to help out when we get into the lab.
MONA JALIZADEH: Sounds good. Thank you. So all the gentlemen standing at the back of the room, they're here to help you. So just raise your hand, if you have any question. So just a little bit background of what we're going to do. This is very similar as far as the outcome that you're going to be able to see a model and Forge viewer in a browser. The main difference is where the model is sitting-- where does the model live. In previous exercise, your model was living in a bucket that you created.
So you launch your app. You created a bucket or a folder-- a placeholder-- and you uploaded your model in there, and you viewed that model. But in this exercise, you're going to look at the model that exists in your BiM 360 or Fusion Team-- or BiM 360 Team, if you're using BiM 360 Team.
So this is a very common use case. And this is some of the examples of the requests we get from customers, and why they want to do what they want to do. Once you're in a business, you don't want to constantly creating data that they're not connected. So if you're using already BiM 360 and you already have your files-- your project files, your models, and everything there-- and you decide that you want to create a dashboard that you want to now have some visualization-- or which we're going to have a class today on how to create a visual dashboard. Or if you want to bring in data from third-party and integrate it.
So if you want to build something custom, you don't have to move your model to another database or another source. They're already sitting in BiM 360 and going through the whole workflow that they're going. And you can connect that and read that model and display it in different source. And then there are some automation, about if you want to automate a large task-- if there are things that you want to do in bulk, you can use data management API, which we're going to cover.
We're not going to show you how you can do that, but data management is the service that we're going to use today as part of this exercise. And data management APIs also are used to automate a lot of repetitive work, or if you want to do things in bulk. And data visualization and analysis is another thing, again. So your model is sitting in your Fusion Team or your BiM 360. And you want to take it down. You want to display it in Power BI. You want to display in your custom app. And you're going to use data management API to do that.
So the main point of this exercise is just to show you how to access your model in BiM 360. But the easiest way for us to show you is just to create a very simple app, to show you how you can view it. But once you have access to that model, you can do everything. You can do the visualization. You can do integration. You can do anything that makes sense to your business.
So these are some of the most important outcome of this class. You're going to learn how to use three-legged authentication. That's one of the differences between this class and the previous one. We used two-legged in the first class, and you needed your client ID, your client secret, and that was it. So you can authenticate using those two and get a token and access things. With three-legged, we are adding additional layer of security. And now we're going to also have callback URL. A lot of you didn't really use your callback URL the first round. You just use a fake URL. But for this exercise, we're going to actually use it.
And we're going to use data management API. And that's usually any activities around BiM 360 docs, Fusion team, or BiM 360 team. So if you want to create a folder in any of these, or if you want to get some information from any of these modules, data management API is what you use. And Viewer API, that you're already familiar with from exercise 1-- and if you are not part of the exercise 1, that's absolutely fine. We're going to go through it again.
So for the setup, these are the three steps you need. You need to have Autodesk account. You need to have Forge app. And if you're using BiM 360, you need to have access to BiM 360, and you need to provision [INAUDIBLE] in BiM 360. If you're using Fusion Team, you need to have access to a Fusion Team. But today, because we want to save time-- we have only one hour-- so I went ahead and I created a test account.
This is like a ForgeDevCon2019@gmail.com. And everything is already set up. It already has Autodesk account. It already has Forge app. So what you can do, you can just log into your Forge.Autodesk.com, later when we need it, to just capture the client ID, client secret. Everything, all the information is already there. But I provided the link here.
So in case you were not part of the first class, if you are interested in learning how the setup works, you, can just follow those links and step by step it explains how to do it. And also, we have a BiM 360 Sandbox account, that this email address has access to it. So you can log in to BiM 360 using this email address. And the client ID and secret is provisioned there, so you can use Forge API to access the information. And there is a Fusion trial account, that is linked to this email address. When we get to it, I'll show you the password. So please just make a note of the password-- ForgeIsAwesome2019! and the first letter of each word is caps.
And you have access to this username and BiM 360 by end of today. We may delete the username tomorrow. So if there's anything that you need to store after today, just make sure to store it, so you're not going to lose any information that you need.
So now go to Forge.Autodesk.com and log-in using that username and password and make a copy of the client ID and secret that is pointed out there. Let's see if my laser works. It's right here. Or you can just leave it open. So when you need it, you can copy it directly to your code-- or you can just make a note of it in a notepad and close the tab. Let me actually bring up both of them, so you can see. This is the ID and this is the password. Does anyone have any problem accessing the account?
So this is just for your information. If you get lost at any point, or for some reason you fall behind or the class run out and you're not done or anything happens, you already have access to the completed version of the exercise. So you can always get the source code. And you have access to this PowerPoint, so you can download it from handout. And there's also an about 60 pages PDF, step-by-step explaining everything.
So you have all the material. You don't have to worry about making any notes. But if you get lost, the source code is there. You can always download the source code and just run it, or you can compare it with your code. And also the tutorial link is there, that you can click on it. And if you don't mind navigating to that right now, because we're going to use that tutorial online step-by-step to go through the exercise.
If it is easier, you can just navigate to LearnForge.Autodesk.io, and then I'll show you how to navigate to the tab that is for our exercise. So if you go to LearnForge.Autodesk.io, this is what you see. And there are a bunch of exercises here. Just make sure that you're not going to start from the beginning. Look for the title of our class-- "View BiM 360 in Fusion Models." This is where we're going to start.
So we need to create a server, and you have three options. You can use Node.js, .NETFramework4.7.2, or .NETCore3.0. If you're Node.js, use visuals to do your code. That is on your machine. It's easier. It's faster. And it looks more like with the screenshots that we have in our tutorial. But if you're using .NETFramework, .NETCore, use Visual Studio Professional, that is installed on your machine. Whatever you choose, which Augusto recommended as part of the first class, if you're choosing between .NET and you want to stay with .NET, we recommend using .NETCore instead of .NETFramework, just because it's newer. But we have exercises step-by-step for all three. So if you're better in one, choose the one that you're more comfortable with-- and the one that you're going to be using in the future.
So we're going to have five steps. We are going to be creating a server. We're going to authorize with three-legged authentication. We're going to list hubs and projects. So depending on if you want to use Fusion or BiM 360, the terminology is a little bit different. But we're going to learn how to get that list-- the hubs, the accounts, or the projects-- the folder structure, all of that. And then you're going to learn how to get the user information. So you want to see what is the user first name, last name, their profile picture, and all of that. And then you're going to show it in the viewer.
Just a note of how you can navigate through this. So we're going to be focusing only on this part right here. And again, these are the five steps. Every top that you go, it asks you what framework, and you always continue with the framework you chose. So if you choose to use Node.js, you just continue clicking on Node.js every time that you are given the option to.
So now let's get started. Start by creating a server. I recommend using the same naming for the project, for controllers, for files. Because if you use the same spelling, same name, you can just copy-paste the block of code from the tutorial and replacing the entire code in your file. So I'm just going to bring up this. And then I'm going to just step down and walk around and answer any questions you may have. So I'm just going to choose .NETCore, but you can choose anything.
Just go through line-by-line. See how you have to create your project. What are the dependencies you have to download-- how to set your environment variables. Once you get to set your environment valuables, your client ID and client secret, that's when you want to go back to Forge.Autodesk.com. Then you log in and copy the values from there. And depending on what framework you're using, you have to copy it in different file. So in .NETCore, you're just adding those values to the property of the project.
How many of you are using Node.js? Is there anyone that is using .NETFramework? Just as a reminder, we are following exercises right here. There are multiple tabs saying Create Server, but they're under different exercises. So we have one Create Server up here. Creating a server is really not that important. But when we go to authorize it's very important, because we're going to use three-legged authentication. If you already created your project and you set up your project, you can just go to Authorize-- and again, choose the framework or the language that you're using and follow the structure.
So again, if you use the same naming, you can just copy the entire code and replace your existing code with it. Just make sure you're not missing creating folders. Because if you just try to copy-paste and not read, you're going to miss some of the dependencies or folders that has to be created. Did anyone to finish creating the server? So I'll just put it back here, because a lot of you are working on this.
The .NETCore documentation has one small mistake, that asks you to create the controller folders twice. Just follow the first one, that is Controllers, and just ignore the second one that says Create A New Folder Called Controller-- the one.
We have about 10 minutes left. So what I'm going to do in the meanwhile that you're working on your stuff, I'm going to try to launch the end product and application and show it to you how it's going to look like-- in case you're not going to be able to see yours, at least you know how it's going to look like, and I can explain something on that.
So if I can just get your attention for a few moments, just to show you what you're going to see. Once you're done, if you launch it, this is what you're going to see. It's going to promise to log-in. With three-legged authentication you have to log-in using Autodesk ID. And we're going to use that ForgeDevCon2019 gmail address to log-in. What that helps, it's going to identify who you are and what you can see in BiM 360 and Fusion.
So if I am on BiM 360 and I have access to five projects out of hundreds, once I log-in Autodesk recognized who I am and what I can see and what I can do. And it's going to only show me those projects, those models that I have access to. So that's pretty neat. Basically, Autodesk is taking care of identification and authorization for you. You don't have to worry about it. And that's as long as your model and your data sits on Autodesk server. It's similar process for other third-party. Like, Microsoft also has its own authentication, but it only can manage Microsoft files. And Autodesk can manage files that you have, or projects you have in BiM 360, Fusion Team, and so on.
So I'm going to go ahead and click on Sign In. So it already remembers that logged in with ForgeDevCon. It's just telling me that this app is going to have this access to your BiM 360. I confirm it. And this is what's going to happen. On the left-hand side, it's going to load all my projects, my folder structure and everything. And this one, that started with the letter V-- let me make this a little bit larger. This is the BiM 360 account. All of you have access to it today-- an entire week. Basically, if we go to BiM 360-- let me go here-- and we try to log-in with the same account and same password. Is there anyone here using Fusion Team?
So I'll just explain the BiM 360. So if I log-in to BiM 360 account using the same username password, this is my account name-- AutodeskForgeDevCon2019. And if you look back here, that's exactly the same name. So you're seeing your account. If you have access to many accounts, you're going to see many accounts here. The one below that you don't see here and has a different icon is my Fusion Team. So I have a Fusion Team. And the name of that hub is ForgeDevCon.
So right here, because now I have BiM 360 open, I'm going to show you. I'm going to expand this account. I see my projects. I have only one project called ForgeDemo. Coming here, looking at my projects, I have ForgeDemo. It's not showing me sample projects. Why? Because I'm not assigned to it. So if I click on it, you can see that only me, as Mona, is assigned to that project, not the user ForgeDevCon. And that's the beauty of it, that it identifies your ForegeDevCon, and it doesn't show you projects that you're not assigned to it.
So going back here now, I'm going to expand ForgeDemo. These are my folders within the projects. I'm going to expand my project files. And I just uploaded some samples for you there-- different file extension. But you can also go upload different models and try it. So you can click on this one and choose the version, if there are multiple versions. And now that's when it's going to start launching it. And you can see your model.
But the beauty of this is that this is the same model that is sitting here. So if someone make any changes to this design and upload it back to BiM 360, your application now is going to see the new version. And you can see the same new, latest model in your custom app-- basically, having one data center, one common data environment.
So we're going to Document Management. And this is the same folder structure that you see on the left. I navigated to Revit. And this is the urban house, sitting right here-- and very similar to Fusion, as well.
We are running out of time. So we are going to assume that we did it, just because I have a nice slide for it. But again, you have access to the PowerPoint. You have access to the 60 pages PDF-- very well written, all accessible for you to download. You have access to the link. Always that link is going to be public. It's not only for AU. So you can always work on it. The rest of the week, also, we're going to be here. We have answer boards. And anytime you see any of us and you recognize our face and you have any question, just flag us down and ask your question. We'd be happy to sit down with you. If you have any question about this, or your own application, we would be happy to answer.
So this was just in case if you have additional time, but we didn't. There are some resources for you. There are some samples. There are some open-source samples, that if you want to just reuse or not start from scratch-- have a starting point-- the documentation for Forge is there. The link to the tutorials is there. Forge Blog, I strongly recommend. And if you have any questions, these are places that you go for questions. These are the list of Accelerator that is coming up. If you identify anything close to you, I think you definitely should take advantage of it.
So with that, we also have three more classes right after here. You're going to learn how to extend your viewer, and then you're going to learn how to create a nice dashboard to visualize your data in a graph. And then the last class today we have is modifying file using design automation. With that, thank you, and let me know if you have any question. I'll be staying around for the next class as well. Thank you.
[APPLAUSE]