Git Product home page Git Product logo

revit-wpf-template's Introduction

Revit WPF Template

Template in visual studio for creating Revit C# .net addin with WPF

WPF in Revit API maybe make some difficulties for the first times to work with it. As a beginner and a selt-touch developper, I waste many times to understand how does it works. So, I create this template to using in my future other projects.

About this template

In this template, I show how I use:

  • Organize project with MVVM pattern
  • Create and raise external event of Revit API with modeless form WPF
  • Binding command totally, not using event in code behind
  • Fix some problem with modeless forme: topmost, Window owner, minimize Window
  • Integrate type Window, Usercontrol in this template
  • Utils for image of icon of ribbon constrol Revit
  • Work with Json settings file

How to use it?

  • Clone/download this repository and open the .sln at the root of the repository with Microsoft Visual Studio.
  • Re-link references to RevitAPI.dll and others which may be missing and restore package from nuget package manager
  • Build the solution - Building the solution will automatically create and copy the add-in files to the folder for Revit 2019. Location -- C:\ProgramData\Autodesk\Revit\Addins\2019\TD.Bundle You can change it in Post-Built Event Command Line (Project --> Properties --> Build Event)

  • In order to use this as a starter for your application, make sure you first refactor the content in the application files (namespace, assembly name, classes, GUID, etc.).
  • You can create a template visual studio like the template Revit API of thebuildingcoder. Follow the guide: Create item template in Visual Studio

UI Addin Exemple in template:

Demo:

Visual studio project

Tree Project

Code behind:

Third Party

  • Newtonsoft.Json
  • System.Windows.Interactivity.WPF

Licences

MIT ยฉ Tien-Duy NGUYEN


Special thanks to TheBuildingCoder and HOKGroup for helping me to complete my solution.

I hope my solution will be useful for you. Any suggestion and contributions are highly appreciated. ๐Ÿ™

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.