How to Update my Revit Plugin

How to Update my Revit Plugin

wsayle
Participant Participant
1,382 Views
5 Replies
Message 1 of 6

How to Update my Revit Plugin

wsayle
Participant
Participant

Hello,

 

I am going through the "My first plug in" from autodesk. I am in the lesson that add in exceptions to the project (lesson 5 --> https://knowledge.autodesk.com/search-result/caas/simplecontent/content/lesson-5-simple-selection-gr...). 

 

When I add changes, I'm not seeing them being updated in my revit plug in. For example I changed one line of code to see if my updates were being caught by adding in this code:

XYZ point = sel.PickPoint("Please pick a point to place groupjjjj");

 

But in revit when I get to this point in the code I still see "Please pick a point to place" with no "jjjj" on the end.

 

I'm using visual studio and coding in C#.

 

Thanks

0 Likes
Accepted solutions (1)
1,383 Views
5 Replies
Replies (5)
Message 2 of 6

smarente1
Enthusiast
Enthusiast
Accepted solution

You need to rebuild your .dll to see change. 

 

Alternatively, a useful tool for quicker development is the add-in manager found in the SDK:

 

https://github.com/jeremytammik/RevitSdkSamples/tree/master/SDK

 

Konrad made a very helpful guide to using it here:

 

https://archi-lab.net/debugging-revit-add-ins/ 

 

 

0 Likes
Message 3 of 6

matthew_taylor
Advisor
Advisor

Also, if the

XYZ point = sel.PickPoint("Please pick a point to place groupjjjj");

code is not in the same assembly as the IExternalCommand, you will need to restart Revit to see the changes. (This is due to how .NET works.)


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 4 of 6

wsayle
Participant
Participant

Completely new to this. How do you rebuild a dll??

 

Also, thank you for Konrad's guide. I followed it and made it to step 7 but nothing shows up for me in the loaded commands. I'm using Revit 2021 btw and the 2021.1 SDK (do I need to have 2021 SDK installed prior to the 2021.1??) from the autodesk website. 

 

wsayle_0-1635977577665.png

 

0 Likes
Message 5 of 6

smarente1
Enthusiast
Enthusiast

The .dll is loaded by Revit to run the code you are creating. 

 

Click build inside Visual Studios:

 

smarente1_1-1635980104261.png

 

Inside your project bin folder you will find the .dll you just built:

 

smarente1_0-1635980028167.png

 

With the add-in manger, click the "Load" button and navigate to this .dll file from the bin project folder. 

 

Each time you make changes to your code re build the .dll to see the changes within Revit. 

 

 

 

Message 6 of 6

wsayle
Participant
Participant

Thank you! This really did help. I appreciate it.