Skip to content

Package for RevitAddin to download bundle file from Github.

License

Notifications You must be signed in to change notification settings

ricaun-io/ricaun.Revit.Github

Repository files navigation

ricaun.Revit.Github

Revit 2017 Visual Studio 2022 Nuke License MIT Build Release

The ricaun.Revit.Github allows downloading bundle files in Autodesk format from Github and unpacking the zip in the installed bundle folder.

The bundle file is generated and released using the ricaun.Nuke.PackageBuilder build automation with Github Action.

This project was generated by the AppLoader Revit plugin.

GithubRequestService

The GithubRequestService(user, repo) contains all the logic to download and unpack the bundle files in the release section from the user and repo in Github.

var service = new GithubRequestService("ricaun-io", "ricaun.Revit.Github");

Initialize

The Initialize method starts the process to read the content in the release section in Github and find the last version that is greater than the current version of the plugin. This method only works if the plugin is installed using the bundle format.

var service = new GithubRequestService("ricaun-io", "ricaun.Revit.Github");
bool downloadedNewVersion = await service.Initialize();

ricaun.Revit.Github.Example

This is a simple RevitAddin project implementation to test the ricaun.Revit.Github library, the command force to download the last version in this repository.

Bundle Version Structure

The bundle should have the the version folder that matches the version of the plugin. Inside the version folder, there should be a folder for each version of Revit that the plugin supports. The PackageContents.xml should point to the correct addin files for each version of Revit.

revitaddin.bundle
|-- PackageContents.xml
|-- Contents
|   |-- 1.0.0
|   |   |-- 2024
|   |   |   |-- revitaddin.addin
|   |   |   |-- revitaddin.dll
|   |   |-- 2025
|   |   |   |-- revitaddin.addin
|   |   |   |-- revitaddin.dll

Bundle Updater

To update the bundle a new version is downloaded and unzipped in the same .bundle, this would replace the PackageContents.xml and add the new version folder.

revitaddin.bundle
|-- PackageContents.xml
|-- Contents
|   |-- 1.0.0
|   |   |-- 2024
|   |   |   |-- revitaddin.addin
|   |   |   |-- revitaddin.dll
|   |   |-- 2025
|   |   |   |-- revitaddin.addin
|   |   |   |-- revitaddin.dll
|   |-- 2.0.0
|   |   |-- 2024
|   |   |   |-- revitaddin.addin
|   |   |   |-- revitaddin.dll
|   |   |-- 2025
|   |   |   |-- revitaddin.addin
|   |   |   |-- revitaddin.dll

The next time the plugin is loaded, the PackageContents.xml is configured to load the new version.

Bundle Delete Version (not implemented in this project)

The plugin should be able to delete a version that is not been used. This can be done by deleting the version folder that is not been used by the plugin.

revitaddin.bundle
|-- PackageContents.xml
|-- Contents
|   |-- 2.0.0
|   |   |-- 2024
|   |   |   |-- revitaddin.addin
|   |   |   |-- revitaddin.dll
|   |   |-- 2025
|   |   |   |-- revitaddin.addin
|   |   |   |-- revitaddin.dll

The deletion of the version folder should be done by the plugin before the plugin update.

Release

Videos

Live videos in portuguese with the creation of this project.

VideoIma1 VideoIma2 VideoIma3 VideoIma4 VideoIma5

Videos in english about the this project.

VideoIma6

License

This project is licensed under the MIT Licence.


Do you like this project? Please star this project on GitHub!

About

Package for RevitAddin to download bundle file from Github.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project