├── .gitignore ├── LICENSE ├── README.md ├── VisualStudioRevitAddinWizard.sln ├── cs ├── App.cs ├── Command.cs ├── Properties │ └── launchSettings.json ├── RegisterAddin.addin ├── TemplateIcon.ico ├── TemplateRevitCs.csproj └── TemplateRevitCs.vstemplate ├── img ├── vs_2019_project_template_location.png └── vs_2022_project_template_location.png ├── install.bat ├── vb ├── AdskApplication.vb ├── AdskCommand.vb ├── My Project │ └── AssemblyInfo.vb ├── RegisterAddin.addin ├── TemplateIcon.ico ├── TemplateRevitVb.vbproj └── TemplateRevitVb.vstemplate └── zip ├── LICENSE └── zip.exe /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studo 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding addin-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | # TODO: Comment the next line if you want to checkin your web deploy settings 133 | # but database connection strings (with potential passwords) will be unencrypted 134 | *.pubxml 135 | *.publishproj 136 | 137 | # NuGet Packages 138 | *.nupkg 139 | # The packages folder can be ignored because of Package Restore 140 | **/packages/* 141 | # except build/, which is used as an MSBuild target. 142 | !**/packages/build/ 143 | # Uncomment if necessary however generally it will be regenerated when needed 144 | #!**/packages/repositories.config 145 | 146 | # Windows Azure Build Output 147 | csx/ 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | *.[Cc]ache 155 | ClientBin/ 156 | [Ss]tyle[Cc]op.* 157 | ~$* 158 | *~ 159 | *.dbmdl 160 | *.dbproj.schemaview 161 | *.pfx 162 | *.publishsettings 163 | node_modules/ 164 | bower_components/ 165 | 166 | # RIA/Silverlight projects 167 | Generated_Code/ 168 | 169 | # Backup & report files from converting an old project file 170 | # to a newer Visual Studio version. Backup files are not needed, 171 | # because we have git ;-) 172 | _UpgradeReport_Files/ 173 | Backup*/ 174 | UpgradeLog*.XML 175 | UpgradeLog*.htm 176 | 177 | # SQL Server files 178 | *.mdf 179 | *.ldf 180 | 181 | # Business Intelligence projects 182 | *.rdl.data 183 | *.bim.layout 184 | *.bim_*.settings 185 | 186 | # Microsoft Fakes 187 | FakesAssemblies/ 188 | 189 | # Node.js Tools for Visual Studio 190 | .ntvs_analysis.dat 191 | 192 | # Visual Studio 6 build log 193 | *.plg 194 | 195 | # Visual Studio 6 workspace options file 196 | *.opt 197 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-Current Jeremy Tammik 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Visual Studio Revit Add-in Templates 2 | 3 | ![Revit API](https://img.shields.io/badge/Revit%20API-2025-blue.svg) 4 | ![Platform](https://img.shields.io/badge/platform-Windows-lightgray.svg) 5 | ![.NET](https://img.shields.io/badge/.NET-8.0-blue.svg) 6 | [![License](http://img.shields.io/:license-mit-blue.svg)](http://opensource.org/licenses/MIT) 7 | 8 | The Visual Studio Revit add-in wizard provides a Visual Studio template for generating C# .NET Revit add-ins. 9 | 10 | It enables the instantaneous and automatic generation, installation and debugging of a new C# Revit add-in skeleton with one single click. 11 | 12 | Obsolete VB.NET templates are still included, but no longer updated or maintained. 13 | 14 | Ample documentation is provided in [The Building Coder](http://thebuildingcoder.typepad.com) topic group 15 | on [Visual Studio Revit add-in templates](http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.20). 16 | 17 | 18 | ## Installation 19 | 20 | Installation can be accomplished by cloning this repository and running the installer batch 21 | file [install.bat](install.bat) as described in The Building Coder discussion of 22 | the [Revit Add-In Wizards on GitHub and Installer](http://thebuildingcoder.typepad.com/blog/2015/08/revit-add-in-wizard-github-installer.html). 23 | 24 | ``` 25 | install.bat [Visual Studio Year - 2022, 2019, 2017, 2015] 26 | ``` 27 | 28 | ### User Project Template Location 29 | 30 | Ensure that the destination path specified in `install.bat` matches your user project template location. 31 | You can change the known location for user templates in Tools > Options > Projects and Solutions > Locations, cf., 32 | [how to locate and organize project and item templates](https://learn.microsoft.com/en-us/visualstudio/ide/how-to-locate-and-organize-project-and-item-templates?source=recommendations&view=vs-2022): 33 | 34 | User project template location 35 | 36 | ## Alternatives 37 | 38 | Several alternative Revit add-in templates have been published. 39 | 40 | They are all more complex and full-fledged than this minimalistic one, taking advantage of .NET configuration functionality, providing support for multiple Revit releases, WPF, languages, build systems, installers, Autodesk AppStore support, etc. 41 | 42 | Here are some of them: 43 | 44 | - [Revit2017AddInTemplateSet](https://github.com/Andrey-Bushman/Revit2017AddInTemplateSet) 45 | by [Andrey Bushman](https://github.com/Andrey-Bushman); 46 | for a full discussion of that and comparison of the two, please refer to the article 47 | on [new Visual Studio templates for Revit add-ins](http://thebuildingcoder.typepad.com/blog/2017/02/new-visual-studio-2015-templates-for-revit-add-ins.html) 48 | - [Revit2018AddInTemplateSet](https://thebuildingcoder.typepad.com/blog/2017/09/revit-20181-nuget-packages-rooms-and-views-in-forge.html#3) 49 | - [Multi-Version Revit Add-In Template](https://thebuildingcoder.typepad.com/blog/2018/07/vacation-and-multi-version-revit-add-in-template.html#2) 50 | by Yaroslav Zhmayev 51 | - [Revit WPF Template](https://thebuildingcoder.typepad.com/blog/2020/01/revit-wpf-add-ins-and-template.html#3) 52 | by Petr Mitev 53 | - [Hellpie dotnet Revit add-in template](https://thebuildingcoder.typepad.com/blog/2020/11/bim360-management-dotnet-template-and-prism-goodies.html#4) 54 | by Diego Rossi 55 | - [Multiversion Revit plugins explained](https://www.matterlab.co/post/multiversion-revit-plugins-explained) 56 | by Alvaro Ortega [@alvpickmans](https://github.com/alvpickmans) Pickmans of [matterlab](https://www.matterlab.co) 57 | including a comprehensive [multiversion-revit-plugin-sample](https://github.com/alvpickmans/multiversion-revit-plugin-sample) 58 | - Manual approach 59 | to [maintain a multi-version add-in in multiple projects in single `SLN`](https://thebuildingcoder.typepad.com/blog/2021/10/dll-as-resource-and-multi-version-add-ins.html#4.2) 60 | by Pablo Derendinger 61 | 62 | ## Author 63 | 64 | Jeremy Tammik, 65 | [The 3D Web Coder](http://the3dwebcoder.typepad.com) and 66 | [The Building Coder](http://thebuildingcoder.typepad.com), 67 | [ADN](http://www.autodesk.com/adn) 68 | [Open](http://www.autodesk.com/adnopen), 69 | [Autodesk Inc.](http://www.autodesk.com) 70 | 71 | 72 | ## License 73 | 74 | This sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). 75 | Please see the [LICENSE](LICENSE) file for full details. 76 | -------------------------------------------------------------------------------- /VisualStudioRevitAddinWizard.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.5.002.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TemplateRevitCs", "cs\TemplateRevitCs.csproj", "{0582A571-14E3-4C6E-8BC6-F6B5FE745251}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {0582A571-14E3-4C6E-8BC6-F6B5FE745251}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {0582A571-14E3-4C6E-8BC6-F6B5FE745251}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {0582A571-14E3-4C6E-8BC6-F6B5FE745251}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {0582A571-14E3-4C6E-8BC6-F6B5FE745251}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {FBFEB63E-D74A-4B1F-A232-A9DC303221F0} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /cs/App.cs: -------------------------------------------------------------------------------- 1 | #region Namespaces 2 | using System; 3 | using System.Collections.Generic; 4 | using Autodesk.Revit.ApplicationServices; 5 | using Autodesk.Revit.Attributes; 6 | using Autodesk.Revit.DB; 7 | using Autodesk.Revit.UI; 8 | #endregion 9 | 10 | namespace $safeprojectname$ 11 | { 12 | class App : IExternalApplication 13 | { 14 | public Result OnStartup( UIControlledApplication a ) 15 | { 16 | return Result.Succeeded; 17 | } 18 | 19 | public Result OnShutdown( UIControlledApplication a ) 20 | { 21 | return Result.Succeeded; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /cs/Command.cs: -------------------------------------------------------------------------------- 1 | #region Namespaces 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using Autodesk.Revit.ApplicationServices; 6 | using Autodesk.Revit.Attributes; 7 | using Autodesk.Revit.DB; 8 | using Autodesk.Revit.UI; 9 | using Autodesk.Revit.UI.Selection; 10 | #endregion 11 | 12 | namespace $safeprojectname$ 13 | { 14 | [Transaction(TransactionMode.Manual)] 15 | public class Command : IExternalCommand 16 | { 17 | public Result Execute( 18 | ExternalCommandData commandData, 19 | ref string message, 20 | ElementSet elements) 21 | { 22 | UIApplication uiapp = commandData.Application; 23 | UIDocument uidoc = uiapp.ActiveUIDocument; 24 | Application app = uiapp.Application; 25 | Document doc = uidoc.Document; 26 | 27 | // Access current selection 28 | 29 | Selection sel = uidoc.Selection; 30 | 31 | // Retrieve elements from database 32 | 33 | FilteredElementCollector col 34 | = new FilteredElementCollector( doc ) 35 | .WhereElementIsNotElementType() 36 | .OfCategory( BuiltInCategory.INVALID ) 37 | .OfClass( typeof( Wall ) ); 38 | 39 | // Filtered element collector is iterable 40 | 41 | foreach( Element e in col ) 42 | { 43 | Debug.Print( e.Name ); 44 | } 45 | 46 | // Modify document within a transaction 47 | 48 | using( Transaction tx = new Transaction( doc ) ) 49 | { 50 | tx.Start( "Transaction Name" ); 51 | tx.Commit(); 52 | } 53 | 54 | return Result.Succeeded; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /cs/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "$safeprojectname$": { 4 | "commandName": "Executable", 5 | "executablePath": "C:\\Program Files\\Autodesk\\Revit 2025\\Revit.exe" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /cs/RegisterAddin.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Command $projectname$ 5 | Some description for $projectname$ 6 | $projectname$.dll 7 | $safeprojectname$.Command 8 | $guid1$ 9 | com.typepad.thebuildingcoder 10 | The Building Coder, http://thebuildingcoder.typepad.com 11 | 12 | 13 | Application $projectname$ 14 | $projectname$.dll 15 | $safeprojectname$.App 16 | $guid2$ 17 | com.typepad.thebuildingcoder 18 | The Building Coder, http://thebuildingcoder.typepad.com 19 | 20 | 21 | -------------------------------------------------------------------------------- /cs/TemplateIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremytammik/VisualStudioRevitAddinWizard/5e9f9b2a3e1638d2105c2a42472f2423f76a5c79/cs/TemplateIcon.ico -------------------------------------------------------------------------------- /cs/TemplateRevitCs.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0-windows 5 | enable 6 | warnings 7 | true 8 | true 9 | $safeprojectname$ 10 | $safeprojectname$ 11 | 12 | 13 | 14 | 1701;1702;MSB3277 15 | 16 | 17 | 18 | 1701;1702;MSB3277 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | $(ProgramW6432)\Autodesk\Revit 2025\RevitAPI.dll 33 | 34 | 35 | $(ProgramW6432)\Autodesk\Revit 2025\RevitAPIUI.dll 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /cs/TemplateRevitCs.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | Revit 2025 Addin 4 | Class library template for a Revit 2025 C# .NET add-in project 5 | TemplateIcon.ico 6 | CSharp 7 | C# 8 | windows 9 | extension 10 | desktop 11 | true 12 | RevitAddin 13 | true 14 | Enabled 15 | true 16 | true 17 | 18 | 19 | 20 | 21 | launchSettings.json 22 | 23 | 24 | RegisterAddin.addin 25 | App.cs 26 | Command.cs 27 | 28 | 29 | -------------------------------------------------------------------------------- /img/vs_2019_project_template_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremytammik/VisualStudioRevitAddinWizard/5e9f9b2a3e1638d2105c2a42472f2423f76a5c79/img/vs_2019_project_template_location.png -------------------------------------------------------------------------------- /img/vs_2022_project_template_location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremytammik/VisualStudioRevitAddinWizard/5e9f9b2a3e1638d2105c2a42472f2423f76a5c79/img/vs_2022_project_template_location.png -------------------------------------------------------------------------------- /install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | pushd "%~dp0" 3 | if exist cs (goto okcs) else (echo "No cs folder found." && goto exit) 4 | :okcs 5 | if exist vb (goto okvb) else (echo "No vb folder found." && goto exit) 6 | :okvb 7 | 8 | if [%1]==[] ( 9 | echo Please specify Visual Studio version, e.g. 2022 10 | goto exit 11 | ) else ( 12 | echo Using version %1 13 | ) 14 | 15 | set "D=C:\Users\%USERNAME%\Documents\Visual Studio %1\Templates\ProjectTemplates" 16 | 17 | set "F=%TEMP%\Revit2025AddinWizardCs0.zip" 18 | echo Creating C# wizard archive %F%... 19 | cd cs 20 | ..\zip\zip.exe -r "%F%" * 21 | cd .. 22 | echo Copying C# wizard archive to %D%\Visual C#... 23 | xcopy "%F%" "%D%\Visual C#\" 24 | 25 | set "F=%TEMP%\Revit2025AddinWizardVb0.zip" 26 | echo Creating VB wizard archive %F%... 27 | cd vb 28 | ..\zip\zip.exe -r "%F%" * 29 | cd .. 30 | echo Copying VB wizard archive to %D%\Visual Basic... 31 | xcopy "%F%" "%D%\Visual Basic\" 32 | 33 | :exit 34 | -------------------------------------------------------------------------------- /vb/AdskApplication.vb: -------------------------------------------------------------------------------- 1 | #Region "Imported Namespaces" 2 | Imports Autodesk.Revit.ApplicationServices 3 | Imports Autodesk.Revit.Attributes 4 | Imports Autodesk.Revit.DB 5 | Imports Autodesk.Revit.UI 6 | #End Region 7 | 8 | Class AdskApplication 9 | Implements IExternalApplication 10 | ''' 11 | ''' This method is called when Revit starts up before a 12 | ''' document or default template is actually loaded. 13 | ''' 14 | ''' An object passed to the external 15 | ''' application which contains the controlled application. 16 | ''' Return the status of the external application. 17 | ''' A result of Succeeded means that the external application started successfully. 18 | ''' Cancelled can be used to signify a problem. If so, Revit informs the user that 19 | ''' the external application failed to load and releases the internal reference. 20 | ''' 21 | Public Function OnStartup( 22 | ByVal app As UIControlledApplication) _ 23 | As Result Implements IExternalApplication.OnStartup 24 | 25 | 'TODO: Add your code here 26 | 27 | 'Must return some code 28 | Return Result.Succeeded 29 | End Function 30 | 31 | ''' 32 | ''' This method is called when Revit is about to exit. 33 | ''' All documents are closed before this method is called. 34 | ''' 35 | ''' An object passed to the external 36 | ''' application which contains the controlled application. 37 | ''' Return the status of the external application. 38 | ''' A result of Succeeded means that the external application successfully shutdown. 39 | ''' Cancelled can be used to signify that the user cancelled the external operation 40 | ''' at some point. If false is returned then the Revit user should be warned of the 41 | ''' failure of the external application to shut down correctly. 42 | Public Function OnShutdown( 43 | ByVal app As UIControlledApplication) _ 44 | As Result Implements IExternalApplication.OnShutdown 45 | 46 | 'TODO: Add your code here 47 | 48 | 'Must return some code 49 | Return Result.Succeeded 50 | End Function 51 | End Class 52 | -------------------------------------------------------------------------------- /vb/AdskCommand.vb: -------------------------------------------------------------------------------- 1 | #Region "Imported Namespaces" 2 | Imports System 3 | Imports System.Collections.Generic 4 | Imports Autodesk.Revit.ApplicationServices 5 | Imports Autodesk.Revit.Attributes 6 | Imports Autodesk.Revit.DB 7 | Imports Autodesk.Revit.UI 8 | Imports Autodesk.Revit.UI.Selection 9 | #End Region 10 | 11 | 12 | Public Class AdskCommand 13 | Implements IExternalCommand 14 | 15 | ''' 16 | ''' The one and only method required by the IExternalCommand interface, the main entry point for every external command. 17 | ''' 18 | ''' Input argument providing access to the Revit application, its documents and their properties. 19 | ''' Return argument to display a message to the user in case of error if Result is not Succeeded. 20 | ''' Return argument to highlight elements on the graphics screen if Result is not Succeeded. 21 | ''' Cancelled, Failed or Succeeded Result code. 22 | Public Function Execute( 23 | ByVal commandData As ExternalCommandData, 24 | ByRef message As String, 25 | ByVal elements As ElementSet) _ 26 | As Result Implements IExternalCommand.Execute 27 | 28 | Dim uiapp As UIApplication = commandData.Application 29 | Dim uidoc As UIDocument = uiapp.ActiveUIDocument 30 | Dim app As Application = uiapp.Application 31 | Dim doc As Document = uidoc.Document 32 | 33 | Dim sel As Selection = uidoc.Selection 34 | 35 | 'TODO: Add your code here 36 | 37 | Using tx As New Transaction(doc) 38 | tx.Start("$projectname$") 39 | tx.Commit() 40 | End Using 41 | 42 | 'Must return some code 43 | Return Result.Succeeded 44 | End Function 45 | End Class 46 | -------------------------------------------------------------------------------- /vb/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | ' General Information about an assembly is controlled through the following 6 | ' set of attributes. Change these attribute values to modify the information 7 | ' associated with an assembly. 8 | 9 | ' Review the values of the assembly attributes 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 21 | 22 | 23 | ' Version information for an assembly consists of the following four values: 24 | ' 25 | ' Major Version 26 | ' Minor Version 27 | ' Build Number 28 | ' Revision 29 | ' 30 | ' You can specify all the values or you can default the Build and Revision Numbers 31 | ' by using the '*' as shown below: 32 | ' 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /vb/RegisterAddin.addin: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Command $projectname$ 5 | Some description for $projectname$ 6 | $projectname$.dll 7 | $safeprojectname$.AdskCommand 8 | $guid1$ 9 | com.typepad.thebuildingcoder 10 | The Building Coder, http://thebuildingcoder.typepad.com 11 | 12 | 13 | Application $projectname$ 14 | $projectname$.dll 15 | $guid2$ 16 | $safeprojectname$.AdskApplication 17 | com.typepad.thebuildingcoder 18 | The Building Coder, http://thebuildingcoder.typepad.com 19 | 20 | 21 | -------------------------------------------------------------------------------- /vb/TemplateIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremytammik/VisualStudioRevitAddinWizard/5e9f9b2a3e1638d2105c2a42472f2423f76a5c79/vb/TemplateIcon.ico -------------------------------------------------------------------------------- /vb/TemplateRevitVb.vbproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | None 6 | 7 | 8 | 9 | 10 | Debug 11 | AnyCPU 12 | 13 | 14 | {00000000-0000-0000-0000-000000000000} 15 | Library 16 | $safeprojectname$ 17 | 512 18 | Windows 19 | v4.8 20 | On 21 | Binary 22 | On 23 | On 24 | 25 | 26 | true 27 | full 28 | true 29 | true 30 | bin\Debug\ 31 | 32 | 33 | 34 | Program 35 | $(ProgramW6432)\Autodesk\Revit 2024\Revit.exe 36 | false 37 | 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 38 | 39 | 40 | pdbonly 41 | false 42 | true 43 | true 44 | bin\Release\ 45 | 46 | 47 | 48 | Program 49 | $(ProgramW6432)\Autodesk\Revit 2024\Revit.exe 50 | false 51 | 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 52 | 53 | 54 | 55 | $(ProgramW6432)\Autodesk\Revit 2024\RevitAPI.dll 56 | False 57 | 58 | 59 | $(ProgramW6432)\Autodesk\Revit 2024\RevitAPIUI.dll 60 | False 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | copy "$(ProjectDir)$projectname$.addin" "$(AppData)\Autodesk\REVIT\Addins\2024" 92 | copy "$(ProjectDir)bin\debug\$projectname$.dll" "$(AppData)\Autodesk\REVIT\Addins\2024" 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /vb/TemplateRevitVb.vstemplate: -------------------------------------------------------------------------------- 1 | 3 | 4 | Revit 2024 Addin 5 | Class library template for a Revit 2024 Visual Basic .NET add-in project 6 | TemplateIcon.ico 7 | VisualBasic 8 | Visual Basic 9 | windows 10 | extension 11 | desktop 12 | true 13 | RevitAddin 14 | true 15 | Enabled 16 | true 17 | 18 | 19 | 20 | RegisterAddin.addin 21 | AdskApplication.vb 22 | AdskCommand.vb 23 | My Project\AssemblyInfo.vb 24 | 25 | 26 | -------------------------------------------------------------------------------- /zip/LICENSE: -------------------------------------------------------------------------------- 1 | This is version 2007-Mar-4 of the Info-ZIP license. 2 | The definitive version of this document should be available at 3 | ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely and 4 | a copy at http://www.info-zip.org/pub/infozip/license.html. 5 | 6 | 7 | Copyright (c) 1990-2007 Info-ZIP. All rights reserved. 8 | 9 | For the purposes of this copyright and license, "Info-ZIP" is defined as 10 | the following set of individuals: 11 | 12 | Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, 13 | Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, 14 | Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, 15 | David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, 16 | Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, 17 | Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, 18 | Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, 19 | Rich Wales, Mike White. 20 | 21 | This software is provided "as is," without warranty of any kind, express 22 | or implied. In no event shall Info-ZIP or its contributors be held liable 23 | for any direct, indirect, incidental, special or consequential damages 24 | arising out of the use of or inability to use this software. 25 | 26 | Permission is granted to anyone to use this software for any purpose, 27 | including commercial applications, and to alter it and redistribute it 28 | freely, subject to the above disclaimer and the following restrictions: 29 | 30 | 1. Redistributions of source code (in whole or in part) must retain 31 | the above copyright notice, definition, disclaimer, and this list 32 | of conditions. 33 | 34 | 2. Redistributions in binary form (compiled executables and libraries) 35 | must reproduce the above copyright notice, definition, disclaimer, 36 | and this list of conditions in documentation and/or other materials 37 | provided with the distribution. The sole exception to this condition 38 | is redistribution of a standard UnZipSFX binary (including SFXWiz) as 39 | part of a self-extracting archive; that is permitted without inclusion 40 | of this license, as long as the normal SFX banner has not been removed 41 | from the binary or disabled. 42 | 43 | 3. Altered versions--including, but not limited to, ports to new operating 44 | systems, existing ports with new graphical interfaces, versions with 45 | modified or added functionality, and dynamic, shared, or static library 46 | versions not from Info-ZIP--must be plainly marked as such and must not 47 | be misrepresented as being the original source or, if binaries, 48 | compiled from the original source. Such altered versions also must not 49 | be misrepresented as being Info-ZIP releases--including, but not 50 | limited to, labeling of the altered versions with the names "Info-ZIP" 51 | (or any variation thereof, including, but not limited to, different 52 | capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the 53 | explicit permission of Info-ZIP. Such altered versions are further 54 | prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP 55 | e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP 56 | will provide support for the altered versions. 57 | 58 | 4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," 59 | "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its 60 | own source and binary releases. -------------------------------------------------------------------------------- /zip/zip.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremytammik/VisualStudioRevitAddinWizard/5e9f9b2a3e1638d2105c2a42472f2423f76a5c79/zip/zip.exe --------------------------------------------------------------------------------