Deploying/Updating Addin

Deploying/Updating Addin

will.wydock
Advocate Advocate
2,831 Views
17 Replies
Message 1 of 18

Deploying/Updating Addin

will.wydock
Advocate
Advocate

I am working on a creating a company plugin to deploy to my office, but i need to workout the best way to pushout any updates to user's computers. My thought had been to have a login script that robocopies and mirrors the addin manifest files to the computers. Does anyone know if this system would work or could recommend another way to push out updates to users?

 

 

Thanks

0 Likes
2,832 Views
17 Replies
Replies (17)
Message 2 of 18

Dale.Bartlett
Collaborator
Collaborator

These discussions may give you some ideas. As our corporate systems are locked down, I couldn't use login scripts etc. The AAA_... addin is working well for me.

http://forums.autodesk.com/t5/revit-api/running-add-ins-from-a-network-drive/m-p/4333715/highlight/t...

http://forums.autodesk.com/t5/revit-api/the-order-of-addins/m-p/5639038/highlight/true#M10004

 

Dale




______________
Yes, I'm Satoshi.
0 Likes
Message 3 of 18

MiguelGT17
Advocate
Advocate

I'm going through the same problem, We need to make sure everyone in the office has the latest version of a plugin. Any updates on this subject?

 

All the best,

0 Likes
Message 4 of 18

will.wydock
Advocate
Advocate

It took me a bit to find a process forward. What I ended up doing was creating an msi for the installs. Advanced Installer was what I used to create them

 

https://www.advancedinstaller.com

 

I make the version for the deployment the date(2022.07.06) so softwares like PDQ can group in a report.

Message 5 of 18

MiguelGT17
Advocate
Advocate

Thanks foy your prompt reply Will! I see https://www.advancedinstaller.com/ offers you an option to find updates for your application. I will read the documentation and thanks for sharing it!

0 Likes
Message 6 of 18

Kennan.Chen
Advocate
Advocate

I implemented such a thing in my company project.

 

revit addin updates.png

 

The key is to make your add-in dlls not being occupied by Revit, which enables you to replace them on the fly.

 

The entry.dll is the first file that Revit loads through .addin file, which means it is doomed to be occupied by Revit. To make it stable(dependency free, business code free) , the concept of IoC can be involved. I integrate a light-weight plugin system in the entry.dll, which enables the dll to discover my business plugins and load them into Revit.

Message 7 of 18

ricaun
Advisor
Advisor

@Kennan.ChenI created a similar solution for my company.

 

I have the same entry.dll file in my case I called Loader.dll, and instead of copying it to a temporary folder, I have a folder with the version of the plugin. The Loader is designed to only initialize the last version and I snick a Revit version sector as well.

 

Everything is inside the .bundle folder and the responsibility to update the plugin is the plugin itself. When Revit starts check for a new version and downloads it.

 

Now I found a way to remove the Loader entirely, the idea is to use the GitHub release to download automatic the new version, and then the plugin gonna auto-update itself. Gonna be cool to implement in open-source projects.

 

Here is a more detailed explanation: https://ricaun.com/update-revitaddin/

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 8 of 18

Kennan.Chen
Advocate
Advocate

Sounds really cool!

 

PackageContents.xml is new to me. Is it true that Autodesk softwares can load this file automatically? Can you provide documentations on it?

Message 9 of 18

ricaun
Advisor
Advisor

The best reference is this AU class.

And you can find the Guidelines in the Developer Network Revit.

 

or

 

3. Preparing Apps for the Store: Guidelines8:30Video, pdf

 

.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 10 of 18

MiguelGT17
Advocate
Advocate

How about company private add-ins. Do I need to submit the internal plugins to the autodesk store as well in order to use the PackageContents.xml benefits? So far I'm creating my own PackageContents.xml file but it's not loading the add-in to Revit.

 

 

 

Message 11 of 18

ricaun
Advisor
Advisor

Why you wanna submit an internal plugin to the Autodesk store to use the bundle structure, what?

 

Is really convenient to have a plugin for multiple versions of Revit in one folder.

 

Do you want to install that plugin just copy the bundle folder to %ProgramData%\Autodesk\ApplicationPlugins\ and done! Uninstall just remove the folder.

 

Here I have an old project for the RevitLookup that has a bundle structure.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 12 of 18

MiguelGT17
Advocate
Advocate

My bad, I was placing the bundle in the wrong folder. Now the application is loaded in Revit. Thank you for confirming this!

 

 

Message 13 of 18

MiguelGT17
Advocate
Advocate

Hi @ricaun, I've been watching you youtube series regarding the real-time update revit plugin. I'm having a hard time connecting with github API using a private repo. 

my research led me to use the following url to access my private repo

https://api.github.com/repos?access_token=["MyToken"]

However, I can not reach the private repo through that url:

MiguelGT17_0-1666972664506.png

 

Have you gone through anything similar by chance? I've make everything works (download files from github) for a public repo but It doesnt make sense to store the organization files in a public one.

 

All the best,

Miguel G.

 

 

 

Message 14 of 18

ricaun
Advisor
Advisor

Yes: https://youtu.be/KVVhb15DMrc

 

Looks like you are using the old GitHub API.

 

Need to use the Header with the Authorization or something like this.

 

curl \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  https://api.github.com/repos/OWNER/REPO/releases/latest

 

But I don't sure if is a good idea to add YOUR-TOKEN in the code or something.

 

In my case, I uploaded the release/bundle to my website using the GitHub action with Nuke.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 15 of 18

rhanzlick
Advocate
Advocate

I have watched some of your youtube videos on AppLoader, and am curious how it works. I saw the AppLoader attribute, and am wondering how it works. I have been able to achieve similar functionality in dynamically changing HOW buttons on the ribbon work, but not how to add/remove dynamically. If you are willing to share any more details, please PM me! Thanks.

0 Likes
Message 16 of 18

ricaun
Advisor
Advisor

The AppLoader attribute is just a way I found to force the plugin AppLoader to startup/shutdown the IExternalApplication.

 

And by default, Revit Api does not have any method to remove a RibbonPanel, that's why I have a library to add this method and others to make it easy to create buttons and other RibbonItems.

 

This video explains:

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 17 of 18

rhanzlick
Advocate
Advocate

I watched that video earlier this morning and saw that it does indeed work well! Are you willing to share how it forces startup/shut down, and any details on the library you made to remove the RibbonPanel?

0 Likes
Message 18 of 18

ricaun
Advisor
Advisor

I'm not loading the plugin using RevitAddin.addin file, basically, the AppLoader loads the RevitAddin.dll and uses some Reflection to find the IExtarnalApplication with the AppLoader attribute and execute the Startup/Shutdown the same way Revit does.

 

Basically, to remove a RibbonPanel you need to use some AdWindows methods to remove the Ribbon and some internal Revit API to remove it from the internal dictionary.

 

At the moment the project is private: https://www.nuget.org/packages/ricaun.Revit.UI and you can use if you what, still need to clean the project and add a better unit test and I gonna make it public.

 

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes