
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I wonder if anyone else has had this kind of problem.
I am using the add-in manager to help me debug Revit .net applications and commands.
One of the things I am doing is adding Ribbon tab/panel/button combinations.
(I have tried it both in the startup() of the application, and also by making an external command for the purpose of ribbon-building).
The problem that I seem to have is that when I create a button on the ribbon, I have to supply it with the assembly to use. I have been using Assembly.GetExecutingAssembly to put the path on the assembly reference, and this does work. The problem is that when the add-in manager is used to re-load, it puts the new assembly in a different temporary location and the button on the ribbon no longer points to the current re-built assembly.
As a result, I get this sequence:
There are two commands - one for building the ribbon, and one to do an actual task (I will call it 'task_command')
1. Don't load the add-in when Revit starts.
2. Use Add-in Manager to run a command to build the ribbon panel and add a button pointing to the assembly and "task_command".
3. I can click on the button and it runs the task_command fine.
4. In Visual Studio, change the program to modify task_command and re-build.
5. Go back to add-in manager and run the task_command. This shows the new modified behaviour.
6. Click on the ribbon button for task_command, and it shows the old behaviour.
In the long run, I expect to simply build the ribbon once on startup, and the buttons will point to a stable assembly location.
But - for developing and debugging, I find this frustrating.
Perhaps I am just missing a more sensible way to set up the debugging environment.
thanks in advance for any help on this...
Solved! Go to Solution.