C# Chatbot using Revit API

C# Chatbot using Revit API

There are many advantages to using chatbots. With chatbots you get to collect valuable data and metrics about each user and optimizing their experience. The quick automated response that the chatbot generates helps the user save time and get a timely response to all their queries and questions.

There are two types of chatbots:

Fixed and AI powered

Though both have their advantages, AI powered chatbots offer a higher range of features and data handling capabilities. Fixed chatbots however are programs with fixed information, even with the limited help they offer, they are used to solve repetitive questions and are not as popular since they do not understand human behavior.

Below I cover how to build a fixed chatbot inside of Revit which tries to provide answers using the Revit API. This article is a basis of a follow-up AI powered chatbot article inside of Revit. I have implemented a WPF (Windows Presentation Foundation) form in Revit as shown below in figure 1.1

No alt text provided for this image

figure 1.1 - UI

I've added the following window properties ,a textbox for the user input and a textbox to display the user-chatbot interaction. An event handler click button was also added as shown below in figure 1.2

No alt text provided for this image

figure 1.2 - UI.xaml


Using the Revit API to create Chatbot Plugin:

To invoke the chatbot application inside of Revit a manifest file needs to be created with the assembly path which is the full path to the add-in assembly file as shown in figure 1.3. This is required for all external Applications.


No alt text provided for this image

figure 1.3 - Chatbot.addin


In order to access the chatbot UI a ribbon tab inside of Revit named chatbot was created with a panel button as shown in figure 1.4

No alt text provided for this image

figure 1.4 - Ribbon Tab


Using the Revit API and Revit API UI dll as references an AEC-DEV panel needs to be created with some of the code as shown below in figure 1.5

No alt text provided for this image

figure 1.5 - Ribbon Panel


This chatbot is used as a query tool allowing the user to query a fixed number of information which is tedious and time consuming.

This Chatbot is fixed to perform only a few commands as shown in the video below, we can see as the chatbot attempts to duplicate multiple views based on the user input provided. The bot first filters for all the views in the active Revit Project and this is a very useful feature since the duplication of views in Revit is a tedious task. Despite it's limitations the chatbot can still automate these time-consuming tasks.

No alt text provided for this image

figure 1.5 - View Filter

This article sums the basis of a chatbot, following this is an article featuring how to set up a WPF plugin in Revit and adding the External Event Chatbot commands.

No alt text provided for this image


can this help the designer look for building codes outside the model?

Like
Reply

Very excited about this Musa 😁

Like
Reply

To view or add a comment, sign in

More articles by MJ Mthimunye

  • Automating Beam Rebar Detailing in Revit from Tekla Structural Designer

    Structural engineers and BIM teams have long faced the same friction: the design is done in one platform, and the…

  • GameStudio Pinball Viewer Proof of Concept

    Pinball machines have maintained a steady level of popularity over the years, appealing to a diverse audience across…

  • Automated Wall Finishes in Revit

    Wall finishes in a building model are materials or treatments applied to wall surfaces. They serve to enhance the…

  • Connect Revit to Power BI using SQL

    In today's data-driven world, the use of dashboards has become increasingly popular due to their numerous advantages…

  • React Native and 3D BIM

    3D BIM has been used for many years now and is recently being integrated with new BIM workflow processes. Being able to…

    2 Comments
  • AI Chatbot in Revit using Python

    Following my previous article on the C# Chatbot using the Revit API, I’ve decided to elaborate more on the fixed…

    6 Comments

Others also viewed

Explore content categories