Giter VIP home page Giter VIP logo

revitaddinmanager's Introduction

Revit Add-in Manager

Revit API Platform License: MIT

ReSharper Rider Visual Studio 2022 .NET Framework

Publish Github All Releases HitCount follow on Twitter

📋 Summary

Usually, when developing and debugging an addin with RevitAPI, user has to close & re-open Revit each time he/she modifies the addin code and wants to re-compile. But with Add-In Manager, user can modify and run the addin directly without closing & re-opening Revit again and again. With current technology, you can use Hot Reload to speed it up.But try this project it will be faster with any Addin.

The product will be expanded in the future in process to support mutiple platform :

📦 Some feature include:

  • Add-in tester(use Debug and Trace to test your add-in)
  • Add-in manager
    • AddInManagerFaceless
    • AddInManagerManual
    • AddInManagerReadOnly
    • Application
  • Startup manager
  • Bip Checker - Check Built-in Parameter of the Element
  • Bip Compare - Compare Built-in Parameter of two Element
  • Debug / Trace : Support Show result use Debug or Trace to show result in Revit
  • Quick create .addin and load to Revit
  • Clear Cache saved in temp folder
  • Quick remove an Add-in not used in working process
  • No depend on any library from outside RevitAPI.
  • A newbie can create new Add-in in a few minutes and easily explore Revit API.

  • F5 - Load fresh plugin don't need load again.
  • F1 - Go link open source report some error,bug or feature request.
  • Delete - Quick remove by use right click or use from keyboard.
  • Crt + MouseWheel - Zoom in/out by use mouse wheel in command plugin.
  • Arrow Up - Move from TreeView to search.
  • Arrow Down - Move from search to TreeView.
  • Esc - Quick Close Add-in Manager.
  • Enter - Quick Run Execute a command selected in Add-in Manager.
  • Alt + T - Change theme Default, Dark, Light.

📭 Add-In Manager

Command

  • AddInManagerManual
  • AddInManagerFaceless
  • AddInManagerReadOnly
  • Bip Checker
  • Bip Compare

Application

  • Preview
  • Save And Load Application .Addin

Startup

  • Show info all add-in installed in computer include all Add-in from Autodesk.
  • Enable or Disable Add-in.

Trace/Debug

  • Show/Hide result inside Dockpanel Revit.
  • Show Result history inside Revit Addin Manager.
  • Clear Result.
  • Show Result by color.


⚙️ Installation

Please follow last release at section Release

Version support : From Revit 2019 to Revit 2025.


⌨️Guideline

  • Quick Example to Execute a Command :
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
[Transaction(TransactionMode.Manual)]
public class TestCommand : IExternalCommand
{
    public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
    {
        //Code Something 
        return Result.Succeeded;
    }
}
  • Quick Example to Debug or Trace result output :
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
[Transaction(TransactionMode.Manual)]
public class TraceWriteLine : IExternalCommand
{
    public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
    {
        //Trace or Debug Something
        Debug.Write($"Message output");
        Debug.WriteLine($"Message output");
        Trace.Write($"Message output");
        Trace.WriteLine($"Message output");
        return Result.Succeeded;
    }
}

You can visit to wiki and read document or access by this link.

Some topic common:


✒️ Author

Originally implemented by Autodesk with platform Windows Forms and now it maintain by ChuongHo with platform WPF and add more feature to fit with the progressive development of modern technology. His focus is to work smarter and achieve the most effective practices to enhance data utilization and digital collaboration among AEC parties.


📄 License

This sample is licensed under the terms of the MIT License. Please see the License file for full details.

Credit to icons8.com for the Revit Add-in Manager icons.

© 2010 Autodesk, Inc. All rights reserved. All use of this Software is subject to the terms and conditions of the Autodesk End User License Agreement accepted upon installation of this Software and/or packaged with the Software.


🍚 Contribute

Add-In Manager is an open-source project and would be nothing without its community. You can make suggestions or track and submit bugs via Github issues. You can submit your own code to the Add-In Manager project via a Github pull request.

Many Thanks all contributors for this repository. Feel free to contribute! Please refer to the CONTRIBUTING for details.


🎁 Sponsors

Thanks for providing a free All product IDE for this project.


🖇️ Learning Resources

📌 Open Resource Recommend

I suggest you some of these projects, hope you will like it.

Star History Chart

revitaddinmanager's People

Contributors

chuongmep avatar leyarx avatar nice3point avatar ricaun avatar sapiens-code avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

revitaddinmanager's Issues

Newly compiled code cannot be loaded into revit

I used the latest version 1.44, the first load ran without problems, modified the code and re-run, the newly compiled code did not load into revit. Asked other colleagues, colleagues second run will prompt whether to copy the dll, mine did not. I need to close revit and re-open it to get the new code to load into revit. My environment is Windows 10, Revit 2021.
Origin :
我使用了最新1.44版本,第一次加载运行没有问题,修改代码后重新运行,新编译的代码并没有加载到revit。询问别的同事,同事二次运行会提示是否拷贝dll,我的没有。
这时候,我需要将revit关闭后重新打开,新的代码才会加载到revit。我用的环境是win10+revit2021

Trace/Debug Panel not show result when run in first time

Describe the bug
A bug see when user open add-in manager panel Trace/Debug in first time.

To Reproduce
Steps to reproduce the behavior:

  1. Go to add-in manager
  2. Open Trace/Debug Panel
  3. Execute Command Trace or Debug
  4. See error

#32 also relate by this bug.

Failing to load in Revit 2020

Describe the bug
Recently I have been unable to use the Add-In Manager in Revit 2020, works perfectly in other years but not 2020, happens when I click any button except Show/Hide Panel, this one loads fine.

To Reproduce
Open Revit 2020, click the button, or from the drop down select any item from list, Revit Blinks like it is trying to open, but then nothing shows up.

Expected behavior
The usual Dialog to open

Screenshots
image

Desktop (please complete the following information):
image
image

Additional context
I have uninstalled. reinstalled and repaired to no avail.

Not priority I can still work in a newer version, I just have all my baseline stuff in 2020 still so its just my normal oldest version I do my baseline testing in.

Could not load file or assembly

Describe the bug
System.IO.FileLoadException: Could not load file or assembly 'License, Version=1.1.8.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An argument was out of its legal range. (Exception from HRESULT: 0x80131502)
May be problem come from

//TODO : Assembly Can not load because some problem, need check again

To Reproduce
Steps to reproduce the behavior:

  1. Load Assembly
  2. Click Select Class Name in Assembly
  3. Click Run Button
  4. See error

Expected behavior
Assembly will be load to project

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 20H2

Using AIM with External dependencies

Hi @chuongmep
I've got a Visual Studio project wich has External Dependencies like DevisId.dll of Standard.Licensing wich permits me to manage licenses.
When I call my AddIn.dll, it do not works.
What's the pb? Do I nid to Merge dependencies in my AddIn.dll?

I've noticed that when I run Revit and click on my button loading via fil.addin, it works and after I can call my plugin via AIM (F6), strange do'nt you think?

RevitAddinManager Duplicate Log Control Debug/Trace

Describe the bug
RevitAddinManager Duplicate Log Control Debug/Trace

To Reproduce
Steps to reproduce the behavior:

  1. Go to AddinManager
  2. Open Log Trace DockPanel
  3. Execute Something
  4. See Error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Additional context
Add any other context about the problem here.

Correct usage of INotifyPropertyChanged

set => OnPropertyChanged(ref _commandItems, value);

The INotifyPropertyChanged interface provides a method: private void OnPropertyChanged([CallerMemberName] string propertyName = null)

Here is the correct use case for property with notification:

public string CommandItems  
{
    get => _commandItems;
    set
    {
        if (value == _commandItems) return;
        _commandItems = value;
        OnPropertyChanged();
    }
}

Using ref and other overloads is superfluous.

Problem With Windows protected your PC

Describe the bug

Problem cause when user use pc company blocked msi download by IT policy, can't click more and select run anyway

To Reproduce
Steps to reproduce the behavior:

  1. Go to relsease and download msi
  2. Click on install
  3. See error

Expected behavior
can install msi

Screenshots
ảnh

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Testing debug with a modeless form not working?

Hi @chuongmep

I've got an other pb with my solution and debugging with AIM.
I've got an IExternalCommand wich simply put a TextNote into a view and it works when I run it with the AIM.
But, I've got an other IExternalCommand wich call a method coded into IExternalApplication with make a Show of a window form.
And, in this case, it does'nt work.
Do you know why?

Milti version config

<PackageReference Include="Revit_All_Main_Versions_API_x64" Version="2022.1.0" />

The project only compiles under the 2022 version of Revit, the Readme says support until 2014, you need to add the solution and project configurations for this:
https://github.com/Nice3point/RevitTemplates/blob/main/Templates/Nice3point.Revit.AddIn/Nice3point.Revit.AddIn.csproj
https://github.com/Nice3point/RevitTemplates/wiki/Multiple-Revit-Versions

Scrolling bug

Scrolling bug
Scrollbar does not work when it is captured by the mouse.

Desktop:

  • Version [1.4.3]

IExternalApplication's are not being manager by AddInManager

Describe the bug
IExternalCommands are detected when the compiled dll file is selected, and commands execute as expected.

IExternalApplications are detected when the compiled dll file is selected, 'Run' option is obviosly disabled (looks like it only petrains to IExternalCommands, so reving this when the user is in the 'Load App' tab is clearer, also in the docs it is mentioned that there is a 'Notes' section that shows the path of the highligted .dll file, but there is no 'Notes' seciton.)

The main issue is that when the IExternalApplication is loaded by choosing the latest compiled dll file, and Revit is restarted ,the IExternalApplication is not running, i.e., the OnStartup and OnShutdown never gets executed as a result, the Ribon Item, Panel, and buttons on the panel are not shown.

I have cleared all previous .addin files that I copied into the addins folder, (both Roaming and ProgramData folders).
I reinstalled RevitAddInManager and tried again. I restarted windows and tried again.

But the only way it was working is when I create a manifest (.addin) file and copy that to the plugin folder, and the path value in the manifest file points to the latest dll file, but the issue now is that I cant Build Solution since Revit process has locked the 'dll' file, just like its explained in the read me file.

TLDR; I am trying use RevitAddInManager to manage my IExternalApplciation that was compiled in the dll file, but RAIM detects the IExternalApplication's and won't load these applications on the next Revit restart.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Load App
  2. Select the 'dll' file that has IExternalApplication
  3. Close RevitAddInManager, Restart Revit
  4. The chosed IExternalApplication wont load. But when a manifest file is created that points to the same dll file, on the next Revit restart, the IExternalAPplication works as expected.
  • RevitAddInManager: 1.5.2
  • OS: Windows11
  • Revit 2024.2

Dark mode font color

Is your feature request related to a problem? Please describe.
When in the new Dark mode, the font color of the Commands is Black and the background in Dark gray. The commands are barely visible
Untitled

Describe the solution you'd like
Make the Font color of the Commands light gray to make a better contrast. Not white, that would be too bright

Revit encountered a The component does have a resource identified by the uri

Describe the bug
Revit encountered a The component does have a resource identified by the uri
Post Relate : https://stackoverflow.com/questions/1453107/how-to-force-wpf-to-use-resource-uris-that-use-assembly-strong-name-argh/26689750#26689750
To Reproduce
Steps to reproduce the behavior:

  1. Load Add-in (Allway Load)
  2. Open Addin Manager(Loaded)
  3. Load new Add-in manager duplicate assembly
  4. Open again Add-in Manager(Loaded)
  5. See Error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 20H3
  • Revit : 2023

Error exited with code 1

I'm new to this so please excuse me if my question is basic. Here's the issue I'm having:
I open Revit 2024 and use the AIM to load a command. Then back in VS, I make some changes to the code. I click "Build Solution" and get the following error:
The command "copy "C:\Users\user\source\repos\MyRevitCommands\MyRevitCommands\bin\Debug"."" "C:\Users\user\AppData\Roaming\Autodesk\Revit\Addins\2024"" exited with code 1. MyRevitCommands

This error disappears if I build it after I close Revit.
Any help would be appreciated!

Edit: Sorry I figured out the solution. I had copy"$(TargetDir)"."""$(AppData)\Autodesk\Revit\Addins\2024\ in my post-build event command line, which I think was causing the issue. I deleted and it's all good.

Clearing Dockable Debug/Trace output

Hi @chuongmep
It could be nice to be able to Clear the Dockable Debug panel by codding.
You recomanded me to clear the txt file , ok but, when I do this , DockAble panel still with lines... Even if I close A re-open it.

Working if I close Revit but, it could be nice while Revit is in..

PS : I've noticed that I have to Remove App first if I I Want that the Debug.Trace Events works

Revit encountered a System.Exception: The component 'RevitAddinManager.View.FrmAddInManager' does not have a resource identified by the URI

Describe the bug
Revit encountered a System.Exception: The component 'RevitAddinManager.View.FrmAddInManager' does not have a resource identified by the URI '/RevitAddinManager;component/view/frmaddinmanager.xaml'.
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at RevitAddinManager.View.FrmAddInManager..ctor(AddInManagerViewModel vm)
at RevitAddinManager.Command.AddinManagerBase.ExecuteCommand(ExternalCommandData data, String& message, ElementSet elements, Boolean faceless)
at RevitAddinManager.Command.AddInManagerManual.Execute(ExternalCommandData commandData, String& message, ElementSet elements)
at apiManagedExecuteCommand(AString* assemblyName, AString* className, AString* vendorDescription, MFCApp* pMFCApp, DBView* pDBView, AString* message, Set<ElementId,std::less,tnallc >* ids, Map<AString,AString,std::less,tnallc<std::pair<AString const ,AString> > >* data, AString* exceptionName, AString* exceptionMessage)

To Reproduce
Steps to reproduce the behavior:

  1. Go to Addin Open Add-in Manager
  2. Click Load dll Add-in manager to Add-in Manager
  3. Run AddinManager loaded
  4. Open again Add-in Manager from ribbon
  5. See Error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser [e.g. chrome, safari]
  • Version Revit 2023

MissingMethodException at Revit2018 startup

RevitAddInManager/AddInManager/View/FrmDockablePanel.xaml.cs
line 18-19

MinimumWidth = 250,
MinimumHeight = 250,

Revit don't support those APIs until Revit2020.I still use Revit2018,so the exception is throw when Revit2018 is opening,
Please fix it.
Thanks

image

Command Failure for External Command

Describe the bug
this will be bug and fix in one:

i have got only Revit 2020&2021 installed and the C:\ProgramData\Autodesk\ApplicationPlugins was not present
had to create it manually for addin manager to work otherwise got this error:
bug

i guess this is legacy folder structure and its easy to omit.
probably the easiest way for addin would be to guard clause against presence of this folder and create it if necessary.

checked on versions 1.1.1, 1.1.2, 1.1.3
best regards

Michal

Cannot load .dll from an external source

I use Parallels to develop for Revit and I store my projects on my Mac partition (\\MAC\...). Loading compiled files from the MAC partition results in

System.NullRerefenceException as shown in the picture below
image

To Reproduce
Steps to reproduce the behavior:

  1. Create a Visual Studio project and store it in your MAC partition
  2. Compile the projec
  3. Load the .dll files from the MAC parition

Expected behavior
This should work or at least give a reasonable error so it is easier to debug.

It took me a very long time to figure this out. Part of the reason I'm leaving this here is to help others facing similar issues.

Windows doesn't shown

After installing and try to run dlls, the orders (Add-In Manager(Manual Mode)), (Add-In Manager(Manual Mode, Faceless)) and (Add-In Manager(Read Only Mode)) don't be shown, the windows don't appear.

image

Ability to run applications

Is your feature request related to a problem? Please describe.
My application has a lot of external commands. It would be much easier to run the whole application from the Loaded Applications tab.

Describe the solution you'd like
Let users run applications from the Loaded Applications tab.

Describe alternatives you've considered
I've tried running external commands, but it's just not as nice to test everything.

Could not load file or assembly ... or one of its dependencies. The parameter is incorrect

Describe the bug
Could not load file or assembly 'RoslynPad.Roslyn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

  • Problem cause when we load a dll depend on multiple assembly other.

To Reproduce
Steps to reproduce the behavior:

  • Load Assembly using reference to other assembly
  • Run to see error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser [e.g. chrome, safari]
  • Version Revit 2022
    Additional context
    Add any other context about the problem here.

Use Add-in Manager without loading a model.

Is your feature request related to a problem? Please describe.
I would like to be able to run add-ins without a model running. My goal is to automate the Navisworks exports and to do this I need to test this apps execution on a newly opened Revit application.

Describe the solution you'd like
Allow the button to work without a model opened.

Describe alternatives you've considered
While this has more features and I will use it for future development, for the moment i will stick to the official one for this current task.

Additional context
image

Debug/Trace shows no output

Describe the bug
First of all, thank you for this great piece of software, it helps a lot!
Today, I wanted to test the Trace/Debug feature, which would be so very useful - but sadly it did not work...
For testing i copied your ColorWriteLine command (see screenshot) and it ran without any errors.
After running the command though, neither Listener-window nor Debug/Trace Output Dockpanel had any content.
Is there anything else I might be missing? Any idea as to why it won't log anything?

Expected behavior
As per my understanding, there should be 5 colored lines of text put out on the Debug/Trace Output and the Listener-window.

Screenshots
Screenshot

Desktop (please complete the following information):
OS: Windows 10 Pro
Revit-Version: 2023.0 (23.0.11.19)
AddInManager-Version: 1.3.5 (the latest version as of today => https://github.com/chuongmep/RevitAddInManager/releases/latest)
.NET-Version of my AddIn: 4.8

Installation - Inno Setup Compiler + AppBundle + Github Action

Hello!

A long time ago I created this repo with the close source AddinManager.dll.

The idea is the same, compile the necessary files to create an AddinManager.bundle and create an Inno file to create an executable.

The past month I create the ricaun.Nuke.PackageBuilder to do exactly that using the Nuke Build

The Github Action Release the Executable file.

Check my repo: https://github.com/ricaun/RevitAddInManager

Still need to add the base images for the installer and a simple license then I gonna create a PR.

See yaa

File load is invalid

Describe the bug
Load DLL file display “File load is invalid”

To Reproduce

Expected behavior
Click to load the selected file, and this prompt box will appear.
DLL file address is"D:\03 其他\C#\revit\re_s_02\re_s_02\bin\Debug\net6.0\re_s_02.dll"

Screenshots
image

Desktop (please complete the following information):
win10 21H2
VS2022
.net 6.0
revit2020

Nothing appears in Debug/Trace dockable

Hi @chuongmep
The dockable panel Debug/Trace Event do not show nothing whereas txt file is not empty. Do you know what?
I've noticed that the Listener tab into Revit Add in Manager form works and display what the txt file content. But not the panel...
I've allready clear all the AddIn directory but does not work..
Thx for help.

Window Stuck Off Screen

Describe the bug
When using multiple monitors, the Add-In manager window was appearing on a different window than my Revit Instance, probably because I moved one of the windows between monitors.

I'm currently traveling, and have only my laptop - no external monitors. When I open the Add-In Manager Window, it seems to appear offscreen on a different 'monitor' window, even though I don't have another monitor open. I can't seem to use any of the shortcuts I know to get it to move back to the one screen I currently have, so I can't really use it.

To Reproduce

  1. On a laptop connected to a second monitor...
  2. Open Revit and then open Add-In Manager Window
  3. Move Add-In Manager to Second monitor, keep Revit on main Laptop monitor
  4. Close Revit and Add-In Manager. Disconnected external monitor.
  5. Restart Revit on just the laptop, try to oppen Add-In Manager from Ribbon.
  6. Note that in taskbar, you can see the Add-In manager is open, BUT you cannot move it to the main laptop screen.

Expected behavior
Be able to use the shortcut 'start button' + 'arrow keys' to move Add-In manager to a visible monitor, OR simply have Add-In reset it's starting position if it would appear on an 'phantom' monitor.

Desktop (please complete the following information):

  • OS: Windows 10

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.