• Getting Started
  • Tutorials
  • Api Documentation
Show / Hide Table of Contents
  • Introduction
    • Getting Started
      • Application
      • Commands
      • Views and MVC
    • Main Concepts
      • Inversion of Control
      • Separation of Concerns
      • Modularity
      • Immutability
      • Testability
      • Versioning
    • IOC Container
      • Container Registration
      • Container Resolve
      • Container Scopes
      • Container Scopes
    • Mapping and Cloning
    • Http Client
    • Logging
    • Messaging
    • Json Serialization
    • Progress Indication
    • MVC
    • State Management
    • Extensible Storage

Getting Started - Creating your first app

On this getting started guide we will help you explore how to create a simple Revit Application using Onbox framework, we will launch the app and explore its main components while showing you some the main concepts and how it differs from regular Revit API programming.

This guide assumes that you have installed:

  • Revit >= 2019
  • .NetStandard >= 2.0
  • .Net Framework >= 4.7.2
  • Visual Studio 2019

Download Visual Studio Templates

Click here to download the templates for the version of the framwork you are using.

Install the Templates

  1. First, make sure Visual Studio is not running, then unzip the contents on %userprofile%\Documents\Visual Studio 2019 folder.

alt text

  1. The resulting folder structure will be something like this for the ProjectTemplates folder:

alt text

Launch Visual Studio

  1. Launch Visual Studio and click on "Create a new project"

alt text

  1. On Platform drop down menu, choose Revit and then pick "Onbox MVC - APP"

alt text

  1. Type your project name and click "Create"

alt text

Launch your App

⚠️ Heads Up: Sometimes Visual Studio will complain when you try to build the solution for the first time, this happens, apperently because of a bug on PropertyChanged.Fody when referenced by Nuget. If you get build errors in the next step, click on Build -> Clean Solution and try to Run the Solution again. Once the packages are downloaded you should not have this issue anymore.

  1. This step also assumes that your Revit is installed on the default C:/Program Files/ Revit folder, if not, please change this patch on Visual Studio: Project Properties -> Debug tab.

  2. Choose a Revit Version on the Solution Configuration Drop down menu and hit "Start"

alt text

  1. Accept the loading of the Addin:

alt text

  1. After Launching Revit, open or create a project and you will see a new Ribbon tab with two buttons:

alt text

  1. Clicking in the button "Hello WPF" this dialog will pop up: alt text

Conclusion

Congratulations! ou have your first application up and running, now it is time to dive deeper and undestand what is going on on the background. Click here to continue this tutorial.

  • Improve this Doc
Back to top Generated by DocFX