├── .gitignore ├── LICENSE ├── README.md ├── Revit Template.sln ├── Revit Template ├── App.cs ├── EntryCommand.cs ├── EntryCommandSeparateThread.cs ├── License.txt ├── Methods.cs ├── MethodsWrapped.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── building.png │ ├── building.svg │ ├── chart-bar.svg │ ├── chart_bar.png │ ├── chevron-right.png │ ├── chevron-right.svg │ ├── cloud-small.png │ ├── code-small.png │ ├── code-small2.png │ ├── code.png │ ├── code.svg │ ├── flask.png │ ├── flask.svg │ ├── icon.png │ ├── revit-wire.ico │ ├── revit-wire.png │ ├── revitIcon.ico │ ├── stethoscope.png │ ├── stethoscope.svg │ ├── terminal-small.png │ ├── terminal.png │ ├── terminal.svg │ ├── vial.png │ └── vial.svg ├── Revit Template.csproj ├── RevitEventWrapper.cs ├── RevitTemplate.addin ├── UI.xaml ├── UI.xaml.cs └── Util.cs ├── assets ├── refactor-instructions Page 001.png ├── refactor-instructions Page 002.png ├── refactor-instructions Page 003.png ├── refactor-instructions Page 004.png ├── refactor-instructions Page 005.png ├── refactor-instructions Page 006.png ├── refactor-instructions.pdf ├── ribbon.png ├── window1.png ├── window2.png └── window3.png └── docs ├── Help ├── HelpLibraryManagerLauncher.exe ├── Install_Revit WPF Template Documentation.bat ├── Remove_Revit WPF Template Documentation.bat ├── Revit WPF Template Documentation.chm ├── Revit WPF Template Documentation.msha ├── Revit WPF Template Documentation.mshc ├── SearchHelp.aspx ├── Web.Config ├── WebKI.xml ├── WebTOC.xml ├── index.html └── search.html ├── RefactorInstructions.md └── RevitTemplate.shfbproj /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # docs 13 | 14 | docs/Help/fti 15 | docs/Help/html 16 | docs/Help/icons 17 | docs/Help/scripts 18 | docs/Help/styles 19 | docs/Help/toc 20 | docs/Help/*.php 21 | 22 | # User-specific files (MonoDevelop/Xamarin Studio) 23 | *.userprefs 24 | 25 | # Build results 26 | [Dd]ebug/ 27 | [Dd]ebugPublic/ 28 | [Rr]elease/ 29 | [Rr]eleases/ 30 | x64/ 31 | x86/ 32 | bld/ 33 | [Bb]in/ 34 | [Oo]bj/ 35 | [Ll]og/ 36 | 37 | # Visual Studio 2015/2017 cache/options directory 38 | .vs/ 39 | # Uncomment if you have tasks that create the project's static files in wwwroot 40 | #wwwroot/ 41 | 42 | # Visual Studio 2017 auto generated files 43 | Generated\ Files/ 44 | 45 | # MSTest test Results 46 | [Tt]est[Rr]esult*/ 47 | [Bb]uild[Ll]og.* 48 | 49 | # NUNIT 50 | *.VisualState.xml 51 | TestResult.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | **/Properties/launchSettings.json 66 | 67 | # StyleCop 68 | StyleCopReport.xml 69 | 70 | # Files built by Visual Studio 71 | *_i.c 72 | *_p.c 73 | *_i.h 74 | *.ilk 75 | *.meta 76 | *.obj 77 | *.pch 78 | *.pdb 79 | *.pgc 80 | *.pgd 81 | *.rsp 82 | *.sbr 83 | *.tlb 84 | *.tli 85 | *.tlh 86 | *.tmp 87 | *.tmp_proj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # JustCode is a .NET coding add-in 131 | .JustCode 132 | 133 | # TeamCity is a build add-in 134 | _TeamCity* 135 | 136 | # DotCover is a Code Coverage Tool 137 | *.dotCover 138 | 139 | # AxoCover is a Code Coverage Tool 140 | .axoCover/* 141 | !.axoCover/settings.json 142 | 143 | # Visual Studio code coverage results 144 | *.coverage 145 | *.coveragexml 146 | 147 | # NCrunch 148 | _NCrunch_* 149 | .*crunch*.local.xml 150 | nCrunchTemp_* 151 | 152 | # MightyMoose 153 | *.mm.* 154 | AutoTest.Net/ 155 | 156 | # Web workbench (sass) 157 | .sass-cache/ 158 | 159 | # Installshield output folder 160 | [Ee]xpress/ 161 | 162 | # DocProject is a documentation generator add-in 163 | DocProject/buildhelp/ 164 | DocProject/Help/*.HxT 165 | DocProject/Help/*.HxC 166 | DocProject/Help/*.hhc 167 | DocProject/Help/*.hhk 168 | DocProject/Help/*.hhp 169 | DocProject/Help/Html2 170 | DocProject/Help/html 171 | 172 | # Click-Once directory 173 | publish/ 174 | 175 | # Publish Web Output 176 | *.[Pp]ublish.xml 177 | *.azurePubxml 178 | # Note: Comment the next line if you want to checkin your web deploy settings, 179 | # but database connection strings (with potential passwords) will be unencrypted 180 | *.pubxml 181 | *.publishproj 182 | 183 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 184 | # checkin your Azure Web App publish settings, but sensitive information contained 185 | # in these scripts will be unencrypted 186 | PublishScripts/ 187 | 188 | # NuGet Packages 189 | *.nupkg 190 | # The packages folder can be ignored because of Package Restore 191 | **/[Pp]ackages/* 192 | # except build/, which is used as an MSBuild target. 193 | !**/[Pp]ackages/build/ 194 | # Uncomment if necessary however generally it will be regenerated when needed 195 | #!**/[Pp]ackages/repositories.config 196 | # NuGet v3's project.json files produces more ignorable files 197 | *.nuget.props 198 | *.nuget.targets 199 | 200 | # Microsoft Azure Build Output 201 | csx/ 202 | *.build.csdef 203 | 204 | # Microsoft Azure Emulator 205 | ecf/ 206 | rcf/ 207 | 208 | # Windows Store app package directories and files 209 | AppPackages/ 210 | BundleArtifacts/ 211 | Package.StoreAssociation.xml 212 | _pkginfo.txt 213 | *.appx 214 | 215 | # Visual Studio cache files 216 | # files ending in .cache can be ignored 217 | *.[Cc]ache 218 | # but keep track of directories ending in .cache 219 | !*.[Cc]ache/ 220 | 221 | # Others 222 | ClientBin/ 223 | ~$* 224 | *~ 225 | *.dbmdl 226 | *.dbproj.schemaview 227 | *.jfm 228 | *.pfx 229 | *.publishsettings 230 | orleans.codegen.cs 231 | 232 | # Including strong name files can present a security risk 233 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 234 | #*.snk 235 | 236 | # Since there are multiple workflows, uncomment next line to ignore bower_components 237 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 238 | #bower_components/ 239 | 240 | # RIA/Silverlight projects 241 | Generated_Code/ 242 | 243 | # Backup & report files from converting an old project file 244 | # to a newer Visual Studio version. Backup files are not needed, 245 | # because we have git ;-) 246 | _UpgradeReport_Files/ 247 | Backup*/ 248 | UpgradeLog*.XML 249 | UpgradeLog*.htm 250 | ServiceFabricBackup/ 251 | 252 | # SQL Server files 253 | *.mdf 254 | *.ldf 255 | *.ndf 256 | 257 | # Business Intelligence projects 258 | *.rdl.data 259 | *.bim.layout 260 | *.bim_*.settings 261 | 262 | # Microsoft Fakes 263 | FakesAssemblies/ 264 | 265 | # GhostDoc plugin setting file 266 | *.GhostDoc.xml 267 | 268 | # Node.js Tools for Visual Studio 269 | .ntvs_analysis.dat 270 | node_modules/ 271 | 272 | # Visual Studio 6 build log 273 | *.plg 274 | 275 | # Visual Studio 6 workspace options file 276 | *.opt 277 | 278 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 279 | *.vbw 280 | 281 | # Visual Studio LightSwitch build output 282 | **/*.HTMLClient/GeneratedArtifacts 283 | **/*.DesktopClient/GeneratedArtifacts 284 | **/*.DesktopClient/ModelManifest.xml 285 | **/*.Server/GeneratedArtifacts 286 | **/*.Server/ModelManifest.xml 287 | _Pvt_Extensions 288 | 289 | # Paket dependency manager 290 | .paket/paket.exe 291 | paket-files/ 292 | 293 | # FAKE - F# Make 294 | .fake/ 295 | 296 | # JetBrains Rider 297 | .idea/ 298 | *.sln.iml 299 | 300 | # CodeRush 301 | .cr/ 302 | 303 | # Python Tools for Visual Studio (PTVS) 304 | __pycache__/ 305 | *.pyc 306 | 307 | # Cake - Uncomment if you are using it 308 | # tools/** 309 | # !tools/packages.config 310 | 311 | # Tabs Studio 312 | *.tss 313 | 314 | # Telerik's JustMock configuration file 315 | *.jmconfig 316 | 317 | # BizTalk build output 318 | *.btp.cs 319 | *.btm.cs 320 | *.odx.cs 321 | *.xsd.cs 322 | 323 | # OpenCover UI analysis results 324 | OpenCover/ 325 | 326 | # Azure Stream Analytics local run output 327 | ASALocalRun/ 328 | 329 | # MSBuild Binary and Structured Log 330 | *.binlog 331 | 332 | # Windows image file caches 333 | Thumbs.db 334 | ehthumbs.db 335 | 336 | # OS generated files # 337 | ###################### 338 | .DS_Store 339 | .DS_Store? 340 | ._* 341 | .Spotlight-V100 342 | .Trashes 343 | ehthumbs.db 344 | Thumbs.db 345 | 346 | .vscode/* 347 | !.vscode/settings.json 348 | !.vscode/tasks.json 349 | !.vscode/launch.json 350 | !.vscode/extensions.json 351 | 352 | # Misc # 353 | ###################### 354 | .vs 355 | **/.vs 356 | .sqlite 357 | .suo 358 | **/.idea 359 | **/v15 360 | *.ide 361 | 362 | *.cache 363 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Petr Mitev 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Revit WPF Template 2 | 3 | ![GitHub issues](https://img.shields.io/github/issues/mitevpi/revit-wpf-template) 4 | ![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/mitevpi/revit-wpf-template) 5 | ![GitHub contributors](https://img.shields.io/github/contributors/mitevpi/revit-wpf-template) 6 | 7 | ![GitHub last commit](https://img.shields.io/github/last-commit/mitevpi/revit-wpf-template) 8 | ![GitHub Release Date](https://img.shields.io/github/release-date/mitevpi/revit-wpf-template) 9 | ![GitHub All Releases](https://img.shields.io/github/downloads/mitevpi/revit-wpf-template/total) 10 | 11 | ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/mitevpi/revit-wpf-template) 12 | ![GitHub repo size](https://img.shields.io/github/repo-size/mitevpi/revit-wpf-template) 13 | ![GitHub](https://img.shields.io/github/license/mitevpi/revit-wpf-template) 14 | 15 | WPF Template for Revit Add-Ins including wrapped external methods for execution in a "Valid Revit API Context" 16 | 17 | ![Window A](assets/window1.png) 18 | ![Window B](assets/window2.png) 19 | ![Window C](assets/window3.png) 20 | ![Revit Ribbon](assets/ribbon.png) 21 | 22 | ## Usage 23 | 24 | ### Build 25 | 26 | 1. Clone/download this repository and open the `.sln` at the root of the repository with Microsoft Visual Studio. 27 | 2. Re-link references to `RevitAPI.dll` and others which may be missing. 28 | 3. Build the solution - Building the solution will automatically create and copy the add-in files to the folder for Revit 2019. 29 | 4. Open Revit - Upon opening Revit 2019, there should be a tab called "Template" in Revit, with a button to launch the WPF add-in. 30 | 31 | ### Customize 32 | 33 | In order to use this as a starter for your application, make sure you first refactor the content in the application files (namespace, assembly name, classes, GUID, etc.) and remove the [assets](/assets) folder in this repository. 34 | 35 | A guide to refactoring can be found in the [docs](/docs/RefactorInstructions.md) folder. 36 | 37 | ## Documentation 38 | 39 | Documentation is created using [Sandcastle Help File Builder](https://github.com/EWSoftware/SHFB) by compiling the docstrings from the compiled `.dll` and `.xml` files generated by Visual Studio upon build. The Sandcastle project can be launched through the [`RevitTemplate.shfbproj`](/docs/RevitTemplate.shfbproj) file in the `docs` folder. 40 | 41 | The documentation can be found in the [docs](/docs) folder in the root of this repository. The following documentation sources are created by [Sandcastle Help File Builder](https://github.com/EWSoftware/SHFB): 42 | 43 | 1. [`.chm`](./docs/Help/Revit%20WPF%20Template%20Documentation.chm) - This is an interactive help file which can be launched by double-clicking on any Windows machine. 44 | 2. [`index.html`](./docs/Help/index.html) - This is the documentation compiled for web deployment. Please note that many of the supporting files needed to deploy the documentation to the web have been git-ignored due to their size and count. Make sure to compile documentation yourself using [Sandcastle Help File Builder](https://github.com/EWSoftware/SHFB) prior to trying to use/deploy the web version of the documentation. A preview of what this looks like can be [found here](https://revit-wpf-template-docs.now.sh). 45 | -------------------------------------------------------------------------------- /Revit Template.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29020.237 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F10DBF23-064F-49F9-A269-E72863FC1FC2}" 7 | ProjectSection(SolutionItems) = preProject 8 | README.md = README.md 9 | EndProjectSection 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Revit Template", "Revit Template\Revit Template.csproj", "{80671941-95DE-4707-9C40-758E89CBD063}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Release|Any CPU = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {80671941-95DE-4707-9C40-758E89CBD063}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {80671941-95DE-4707-9C40-758E89CBD063}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {80671941-95DE-4707-9C40-758E89CBD063}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {80671941-95DE-4707-9C40-758E89CBD063}.Release|Any CPU.Build.0 = Release|Any CPU 23 | EndGlobalSection 24 | GlobalSection(SolutionProperties) = preSolution 25 | HideSolutionNode = FALSE 26 | EndGlobalSection 27 | GlobalSection(ExtensibilityGlobals) = postSolution 28 | SolutionGuid = {5F24138E-22D9-44D1-A17F-C95146396D9C} 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /Revit Template/App.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Threading; 6 | using System.Windows.Media.Imaging; 7 | using System.Windows.Threading; 8 | using Autodesk.Revit.UI; 9 | using Autodesk.Revit.UI.Events; 10 | 11 | namespace RevitTemplate 12 | { 13 | /// 14 | /// This is the main class which defines the Application, and inherits from Revit's 15 | /// IExternalApplication class. 16 | /// 17 | class App : IExternalApplication 18 | { 19 | // class instance 20 | public static App ThisApp; 21 | 22 | // ModelessForm instance 23 | private Ui _mMyForm; 24 | 25 | // Separate thread to run Ui on 26 | private Thread _uiThread; 27 | 28 | public Result OnStartup(UIControlledApplication a) 29 | { 30 | _mMyForm = null; // no dialog needed yet; the command will bring it 31 | ThisApp = this; // static access to this application instance 32 | 33 | // Method to add Tab and Panel 34 | RibbonPanel panel = RibbonPanel(a); 35 | string thisAssemblyPath = Assembly.GetExecutingAssembly().Location; 36 | 37 | // BUTTON FOR THE SINGLE-THREADED WPF OPTION 38 | if (panel.AddItem( 39 | new PushButtonData("WPF Template", "WPF Template", thisAssemblyPath, 40 | "RevitTemplate.EntryCommand")) is PushButton button) 41 | { 42 | // defines the tooltip displayed when the button is hovered over in Revit's ribbon 43 | button.ToolTip = "Visual interface for debugging applications."; 44 | // defines the icon for the button in Revit's ribbon - note the string formatting 45 | Uri uriImage = new Uri("pack://application:,,,/RevitTemplate;component/Resources/code-small.png"); 46 | BitmapImage largeImage = new BitmapImage(uriImage); 47 | button.LargeImage = largeImage; 48 | } 49 | 50 | // BUTTON FOR THE MULTI-THREADED WPF OPTION 51 | if (panel.AddItem( 52 | new PushButtonData("WPF Template\nMulti-Thread", "WPF Template\nMulti-Thread", thisAssemblyPath, 53 | "RevitTemplate.EntryCommandSeparateThread")) is PushButton button2) 54 | { 55 | button2.ToolTip = "Visual interface for debugging applications."; 56 | Uri uriImage = new Uri("pack://application:,,,/RevitTemplate;component/Resources/code-small.png"); 57 | BitmapImage largeImage = new BitmapImage(uriImage); 58 | button2.LargeImage = largeImage; 59 | } 60 | 61 | 62 | // listeners/watchers for external events (if you choose to use them) 63 | a.ApplicationClosing += a_ApplicationClosing; //Set Application to Idling 64 | a.Idling += a_Idling; 65 | 66 | return Result.Succeeded; 67 | } 68 | 69 | /// 70 | /// What to do when the application is shut down. 71 | /// 72 | public Result OnShutdown(UIControlledApplication a) 73 | { 74 | return Result.Succeeded; 75 | } 76 | 77 | /// 78 | /// This is the method which launches the WPF window, and injects any methods that are 79 | /// wrapped by ExternalEventHandlers. This can be done in a number of different ways, and 80 | /// implementation will differ based on how the WPF is set up. 81 | /// 82 | /// The Revit UIApplication within the add-in will operate. 83 | public void ShowForm(UIApplication uiapp) 84 | { 85 | // If we do not have a dialog yet, create and show it 86 | if (_mMyForm != null && _mMyForm == null) return; 87 | //EXTERNAL EVENTS WITH ARGUMENTS 88 | EventHandlerWithStringArg evStr = new EventHandlerWithStringArg(); 89 | EventHandlerWithWpfArg evWpf = new EventHandlerWithWpfArg(); 90 | 91 | // The dialog becomes the owner responsible for disposing the objects given to it. 92 | _mMyForm = new Ui(uiapp, evStr, evWpf); 93 | _mMyForm.Show(); 94 | } 95 | 96 | /// 97 | /// This is the method which launches the WPF window in a separate thread, and injects any methods that are 98 | /// wrapped by ExternalEventHandlers. This can be done in a number of different ways, and 99 | /// implementation will differ based on how the WPF is set up. 100 | /// 101 | /// The Revit UIApplication within the add-in will operate. 102 | public void ShowFormSeparateThread(UIApplication uiapp) 103 | { 104 | // If we do not have a thread started or has been terminated start a new one 105 | if (!(_uiThread is null) && _uiThread.IsAlive) return; 106 | //EXTERNAL EVENTS WITH ARGUMENTS 107 | EventHandlerWithStringArg evStr = new EventHandlerWithStringArg(); 108 | EventHandlerWithWpfArg evWpf = new EventHandlerWithWpfArg(); 109 | 110 | _uiThread = new Thread(() => 111 | { 112 | SynchronizationContext.SetSynchronizationContext( 113 | new DispatcherSynchronizationContext( 114 | Dispatcher.CurrentDispatcher)); 115 | // The dialog becomes the owner responsible for disposing the objects given to it. 116 | _mMyForm = new Ui(uiapp, evStr, evWpf); 117 | _mMyForm.Closed += (s, e) => Dispatcher.CurrentDispatcher.InvokeShutdown(); 118 | _mMyForm.Show(); 119 | Dispatcher.Run(); 120 | }); 121 | 122 | _uiThread.SetApartmentState(ApartmentState.STA); 123 | _uiThread.IsBackground = true; 124 | _uiThread.Start(); 125 | } 126 | 127 | #region Idling & Closing 128 | 129 | /// 130 | /// What to do when the application is idling. (Ideally nothing) 131 | /// 132 | void a_Idling(object sender, IdlingEventArgs e) 133 | { 134 | } 135 | 136 | /// 137 | /// What to do when the application is closing.) 138 | /// 139 | void a_ApplicationClosing(object sender, ApplicationClosingEventArgs e) 140 | { 141 | } 142 | 143 | #endregion 144 | 145 | #region Ribbon Panel 146 | 147 | public RibbonPanel RibbonPanel(UIControlledApplication a) 148 | { 149 | string tab = "Template"; // Tab name 150 | // Empty ribbon panel 151 | RibbonPanel ribbonPanel = null; 152 | // Try to create ribbon tab. 153 | try 154 | { 155 | a.CreateRibbonTab(tab); 156 | } 157 | catch (Exception ex) 158 | { 159 | Util.HandleError(ex); 160 | } 161 | 162 | // Try to create ribbon panel. 163 | try 164 | { 165 | RibbonPanel panel = a.CreateRibbonPanel(tab, "Develop"); 166 | } 167 | catch (Exception ex) 168 | { 169 | Util.HandleError(ex); 170 | } 171 | 172 | // Search existing tab for your panel. 173 | List panels = a.GetRibbonPanels(tab); 174 | foreach (RibbonPanel p in panels.Where(p => p.Name == "Develop")) 175 | { 176 | ribbonPanel = p; 177 | } 178 | 179 | //return panel 180 | return ribbonPanel; 181 | } 182 | 183 | #endregion 184 | } 185 | } -------------------------------------------------------------------------------- /Revit Template/EntryCommand.cs: -------------------------------------------------------------------------------- 1 | #region Namespaces 2 | 3 | using System; 4 | using Autodesk.Revit.DB; 5 | using Autodesk.Revit.UI; 6 | 7 | #endregion 8 | 9 | 10 | namespace RevitTemplate 11 | { 12 | /// 13 | /// This is the ExternalCommand which gets executed from the ExternalApplication. In a WPF context, 14 | /// this can be lean, as it just needs to show the WPF. Without a UI, this could contain the main 15 | /// order of operations for executing the business logic. 16 | /// 17 | [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] 18 | public class EntryCommand : IExternalCommand 19 | { 20 | public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) 21 | { 22 | try 23 | { 24 | App.ThisApp.ShowForm(commandData.Application); 25 | return Result.Succeeded; 26 | } 27 | catch (Exception ex) 28 | { 29 | message = ex.Message; 30 | return Result.Failed; 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Revit Template/EntryCommandSeparateThread.cs: -------------------------------------------------------------------------------- 1 | #region Namespaces 2 | 3 | using System; 4 | using Autodesk.Revit.DB; 5 | using Autodesk.Revit.UI; 6 | 7 | #endregion 8 | 9 | 10 | namespace RevitTemplate 11 | { 12 | /// 13 | /// This is the ExternalCommand which gets executed from the ExternalApplication. In a WPF context, 14 | /// this can be lean, as it just needs to show the WPF. Without a UI, this could contain the main 15 | /// order of operations for executing the business logic. 16 | /// 17 | [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] 18 | public class EntryCommandSeparateThread : IExternalCommand 19 | { 20 | public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) 21 | { 22 | try 23 | { 24 | App.ThisApp.ShowFormSeparateThread(commandData.Application); 25 | return Result.Succeeded; 26 | } 27 | catch (Exception ex) 28 | { 29 | message = ex.Message; 30 | return Result.Failed; 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Revit Template/License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Petar Mitev - All Rights Reserved 2 | 3 | Unauthorized copying of this file, project, or any associated files, via any medium is strictly prohibited. 4 | Proprietary and confidential. 5 | Written by Petar Mitev , December 2019 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 8 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Revit Template/Methods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Autodesk.Revit.DB; 6 | 7 | namespace RevitTemplate 8 | { 9 | /// 10 | /// Create methods here that need to be wrapped in a valid Revit Api context. 11 | /// Things like transactions modifying Revit Elements, etc. 12 | /// 13 | internal class Methods 14 | { 15 | /// 16 | /// Method for collecting sheets as an asynchronous operation on another thread. 17 | /// 18 | /// The Revit Document to collect sheets from. 19 | /// A list of collected sheets, once the Task is resolved. 20 | private static async Task> GetSheets(Document doc) 21 | { 22 | return await Task.Run(() => 23 | { 24 | Util.LogThreadInfo("Get Sheets Method"); 25 | return new FilteredElementCollector(doc) 26 | .OfClass(typeof(ViewSheet)) 27 | .Select(p => (ViewSheet) p).ToList(); 28 | }); 29 | } 30 | 31 | /// 32 | /// Rename all the sheets in the project. This opens a transaction, and it MUST be executed 33 | /// in a "Valid Revit API Context", otherwise the add-in will crash. Because of this, we must 34 | /// wrap it in a ExternalEventHandler, as we do in the App.cs file in this template. 35 | /// 36 | /// An instance of our UI class, which in this template is the main WPF 37 | /// window of the application. 38 | /// The Revit Document to rename sheets in. 39 | public static void SheetRename(Ui ui, Document doc) 40 | { 41 | Util.LogThreadInfo("Sheet Rename Method"); 42 | 43 | // get sheets - note that this may be replaced with the Async Task method above, 44 | // however that will only work if we want to only PULL data from the sheets, 45 | // and executing a transaction like below from an async collection, will crash the app 46 | List sheets = new FilteredElementCollector(doc) 47 | .OfClass(typeof(ViewSheet)) 48 | .Select(p => (ViewSheet) p).ToList(); 49 | 50 | // report results - push the task off to another thread 51 | Task.Run(() => 52 | { 53 | Util.LogThreadInfo("Sheet Rename Show Results"); 54 | 55 | // report the count 56 | string message = $"There are {sheets.Count} Sheets in the project"; 57 | ui.Dispatcher.Invoke(() => 58 | ui.TbDebug.Text += "\n" + (DateTime.Now).ToLongTimeString() + "\t" + message); 59 | }); 60 | 61 | // rename all the sheets, but first open a transaction 62 | using (Transaction t = new Transaction(doc, "Rename Sheets")) 63 | { 64 | Util.LogThreadInfo("Sheet Rename Transaction"); 65 | 66 | // start a transaction within the valid Revit API context 67 | t.Start("Rename Sheets"); 68 | 69 | // loop over the collection of sheets using LINQ syntax 70 | foreach (string renameMessage in from sheet in sheets 71 | let renamed = sheet.LookupParameter("Sheet Name")?.Set("TEST") 72 | select $"Renamed: {sheet.Title}, Status: {renamed}") 73 | { 74 | ui.Dispatcher.Invoke(() => 75 | ui.TbDebug.Text += "\n" + (DateTime.Now).ToLongTimeString() + "\t" + renameMessage); 76 | } 77 | 78 | t.Commit(); 79 | t.Dispose(); 80 | } 81 | 82 | // invoke the UI dispatcher to print the results to report completion 83 | ui.Dispatcher.Invoke(() => 84 | ui.TbDebug.Text += "\n" + (DateTime.Now).ToLongTimeString() + "\t" + "SHEETS HAVE BEEN RENAMED"); 85 | } 86 | 87 | /// 88 | /// Print the Title of the Revit Document on the main text box of the WPF window of this application. 89 | /// 90 | /// An instance of our UI class, which in this template is the main WPF 91 | /// window of the application. 92 | /// The Revit Document to print the Title of. 93 | public static void DocumentInfo(Ui ui, Document doc) 94 | { 95 | ui.Dispatcher.Invoke(() => ui.TbDebug.Text += "\n" + (DateTime.Now).ToLongTimeString() + "\t" + doc.Title); 96 | } 97 | 98 | /// 99 | /// Count the walls in the Revit Document, and print the count 100 | /// on the main text box of the WPF window of this application. 101 | /// 102 | /// An instance of our UI class, which in this template is the main WPF 103 | /// window of the application. 104 | /// The Revit Document to count the walls of. 105 | public static void WallInfo(Ui ui, Document doc) 106 | { 107 | Task.Run(() => 108 | { 109 | Util.LogThreadInfo("Wall Count Method"); 110 | 111 | // get all walls in the document 112 | ICollection walls = new FilteredElementCollector(doc) 113 | .OfCategory(BuiltInCategory.OST_Walls).WhereElementIsNotElementType() 114 | .Select(p => (Wall) p).ToList(); 115 | 116 | // format the message to show the number of walls in the project 117 | string message = $"There are {walls.Count} Walls in the project"; 118 | 119 | // invoke the UI dispatcher to print the results to the UI 120 | ui.Dispatcher.Invoke(() => 121 | ui.TbDebug.Text += "\n" + (DateTime.Now).ToLongTimeString() + "\t" + message); 122 | }); 123 | } 124 | } 125 | } -------------------------------------------------------------------------------- /Revit Template/MethodsWrapped.cs: -------------------------------------------------------------------------------- 1 | using Autodesk.Revit.DB; 2 | using Autodesk.Revit.UI; 3 | 4 | namespace RevitTemplate 5 | { 6 | /// 7 | /// This is an example of of wrapping a method with an ExternalEventHandler using a string argument. 8 | /// Any type of argument can be passed to the RevitEventWrapper, and therefore be used in the execution 9 | /// of a method which has to take place within a "Valid Revit API Context". 10 | /// 11 | public class EventHandlerWithStringArg : RevitEventWrapper 12 | { 13 | /// 14 | /// The Execute override void must be present in all methods wrapped by the RevitEventWrapper. 15 | /// This defines what the method will do when raised externally. 16 | /// 17 | public override void Execute(UIApplication uiApp, string args) 18 | { 19 | // Do your processing here with "args" 20 | TaskDialog.Show("External Event", args); 21 | } 22 | } 23 | 24 | /// 25 | /// This is an example of of wrapping a method with an ExternalEventHandler using an instance of WPF 26 | /// as an argument. Any type of argument can be passed to the RevitEventWrapper, and therefore be used in 27 | /// the execution of a method which has to take place within a "Valid Revit API Context". This specific 28 | /// pattern can be useful for smaller applications, where it is convenient to access the WPF properties 29 | /// directly, but can become cumbersome in larger application architectures. At that point, it is suggested 30 | /// to use more "low-level" wrapping, as with the string-argument-wrapped method above. 31 | /// 32 | public class EventHandlerWithWpfArg : RevitEventWrapper 33 | { 34 | /// 35 | /// The Execute override void must be present in all methods wrapped by the RevitEventWrapper. 36 | /// This defines what the method will do when raised externally. 37 | /// 38 | public override void Execute(UIApplication uiApp, Ui ui) 39 | { 40 | // SETUP 41 | UIDocument uiDoc = uiApp.ActiveUIDocument; 42 | Document doc = uiDoc.Document; 43 | 44 | bool cbDocumentDataIsChecked = false; 45 | ui.Dispatcher.Invoke(() => cbDocumentDataIsChecked = ui.CbDocumentData.IsChecked.GetValueOrDefault()); 46 | 47 | bool cbSheetDataIsChecked = false; 48 | ui.Dispatcher.Invoke(() => cbSheetDataIsChecked = ui.CbSheetData.IsChecked.GetValueOrDefault()); 49 | 50 | bool cbWallDataIsChecked = false; 51 | ui.Dispatcher.Invoke(() => cbWallDataIsChecked = ui.CbWallData.IsChecked.GetValueOrDefault()); 52 | 53 | // METHODS 54 | if (cbDocumentDataIsChecked) 55 | { 56 | Methods.DocumentInfo(ui, doc); 57 | } 58 | 59 | if (cbSheetDataIsChecked) 60 | { 61 | Methods.SheetRename(ui, doc); 62 | } 63 | 64 | if (cbWallDataIsChecked) 65 | { 66 | Methods.WallInfo(ui, doc); 67 | } 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Revit Template/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("DebugApp")] 8 | [assembly: AssemblyDescription("GUI for Revit app debugging.")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("Petar Mitev")] 11 | [assembly: AssemblyProduct("DebugApp")] 12 | [assembly: AssemblyCopyright("Copyright 2019 © Petar Mitev")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("8c2b7de1-d2a5-4439-9b26-0748433aadd7")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("2019.1")] 35 | [assembly: AssemblyFileVersion("2019.1")] 36 | -------------------------------------------------------------------------------- /Revit Template/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace RevitTemplate.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RevitTemplate.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized string similar to Error. 65 | /// 66 | internal static string _Error { 67 | get { 68 | return ResourceManager.GetString("_Error", resourceCulture); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Revit Template/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | Error 123 | The title of TaskDialog window when it notifies about an exception. 124 | 125 | -------------------------------------------------------------------------------- /Revit Template/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace RevitTemplate.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.ApplicationScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] 29 | [global::System.Configuration.DefaultSettingValueAttribute("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\Quarry.mdf;In" + 30 | "tegrated Security=True")] 31 | public string QuarryConnectionString { 32 | get { 33 | return ((string)(this["QuarryConnectionString"])); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Revit Template/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | <?xml version="1.0" encoding="utf-16"?> 7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 | <ConnectionString>Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Quarry.mdf;Integrated Security=True</ConnectionString> 9 | <ProviderName>System.Data.SqlClient</ProviderName> 10 | </SerializableConnectionString> 11 | Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Quarry.mdf;Integrated Security=True 12 | 13 | 14 | -------------------------------------------------------------------------------- /Revit Template/Resources/building.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/building.png -------------------------------------------------------------------------------- /Revit Template/Resources/building.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Revit Template/Resources/chart-bar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Revit Template/Resources/chart_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/chart_bar.png -------------------------------------------------------------------------------- /Revit Template/Resources/chevron-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/chevron-right.png -------------------------------------------------------------------------------- /Revit Template/Resources/chevron-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Revit Template/Resources/cloud-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/cloud-small.png -------------------------------------------------------------------------------- /Revit Template/Resources/code-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/code-small.png -------------------------------------------------------------------------------- /Revit Template/Resources/code-small2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/code-small2.png -------------------------------------------------------------------------------- /Revit Template/Resources/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/code.png -------------------------------------------------------------------------------- /Revit Template/Resources/code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Revit Template/Resources/flask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/flask.png -------------------------------------------------------------------------------- /Revit Template/Resources/flask.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Revit Template/Resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/icon.png -------------------------------------------------------------------------------- /Revit Template/Resources/revit-wire.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/revit-wire.ico -------------------------------------------------------------------------------- /Revit Template/Resources/revit-wire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/revit-wire.png -------------------------------------------------------------------------------- /Revit Template/Resources/revitIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/revitIcon.ico -------------------------------------------------------------------------------- /Revit Template/Resources/stethoscope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/stethoscope.png -------------------------------------------------------------------------------- /Revit Template/Resources/stethoscope.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Revit Template/Resources/terminal-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/terminal-small.png -------------------------------------------------------------------------------- /Revit Template/Resources/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/terminal.png -------------------------------------------------------------------------------- /Revit Template/Resources/terminal.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Revit Template/Resources/vial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/Revit Template/Resources/vial.png -------------------------------------------------------------------------------- /Revit Template/Resources/vial.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Revit Template/Revit Template.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | None 7 | 8 | 9 | false 10 | publish\ 11 | true 12 | Disk 13 | false 14 | Foreground 15 | 7 16 | Days 17 | false 18 | false 19 | true 20 | 0 21 | 1.0.0.%2a 22 | false 23 | true 24 | 25 | 26 | Debug 27 | AnyCPU 28 | {80671941-95DE-4707-9C40-758E89CBD063} 29 | Library 30 | Properties 31 | RevitTemplate 32 | RevitTemplate 33 | v4.7.2 34 | 512 35 | 36 | 37 | true 38 | full 39 | false 40 | bin\Debug\ 41 | DEBUG;TRACE 42 | prompt 43 | 4 44 | Program 45 | C:\Program Files\Autodesk\Revit 2018\Revit.exe 46 | /language ENU 47 | false 48 | bin\Debug\RevitTemplate.xml 49 | 50 | 51 | pdbonly 52 | true 53 | bin\$(Configuration)\ 54 | TRACE 55 | prompt 56 | 4 57 | Program 58 | C:\Program Files\Autodesk\Revit 2018\Revit.exe 59 | 60 | 61 | RevitTemplate.addin 62 | 63 | 64 | 65 | 66 | 67 | 68 | False 69 | ..\..\..\..\..\..\..\..\Program Files (x86)\IronPython 2.7\Microsoft.Dynamic.dll 70 | False 71 | 72 | 73 | False 74 | ..\..\..\..\..\..\..\..\Program Files (x86)\IronPython 2.7\Microsoft.Scripting.dll 75 | False 76 | 77 | 78 | False 79 | ..\..\..\..\..\..\..\..\Program Files (x86)\IronPython 2.7\Microsoft.Scripting.Metadata.dll 80 | False 81 | 82 | 83 | ..\..\..\..\..\..\..\Program Files\Autodesk\Revit 2019\RevitAPI.dll 84 | False 85 | 86 | 87 | ..\..\..\..\..\..\..\Program Files\Autodesk\Revit 2019\RevitAPIUI.dll 88 | False 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | True 112 | True 113 | Resources.resx 114 | 115 | 116 | True 117 | True 118 | Settings.settings 119 | 120 | 121 | 122 | UI.xaml 123 | 124 | 125 | 126 | 127 | 128 | Always 129 | 130 | 131 | Always 132 | 133 | 134 | 135 | Always 136 | 137 | 138 | Always 139 | 140 | 141 | Always 142 | 143 | 144 | Always 145 | 146 | 147 | Always 148 | 149 | 150 | Always 151 | 152 | 153 | Always 154 | 155 | 156 | Always 157 | 158 | 159 | Always 160 | 161 | 162 | Always 163 | 164 | 165 | Always 166 | 167 | 168 | Always 169 | 170 | 171 | Always 172 | 173 | 174 | 175 | 176 | ResXFileCodeGenerator 177 | Resources.Designer.cs 178 | 179 | 180 | 181 | 182 | Always 183 | 184 | 185 | SettingsSingleFileGenerator 186 | Settings.Designer.cs 187 | 188 | 189 | 190 | 191 | Designer 192 | MSBuild:Compile 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | False 201 | Microsoft .NET Framework 4.7.2 %28x86 and x64%29 202 | true 203 | 204 | 205 | False 206 | .NET Framework 3.5 SP1 207 | false 208 | 209 | 210 | 211 | 212 | Copy "$(TargetDir)RevitTemplate.dll" "$(AppData)\Autodesk\Revit\Addins\2019" 213 | Copy "$(TargetDir)RevitTemplate.addin" "$(AppData)\Autodesk\Revit\Addins\2019" 214 | 215 | -------------------------------------------------------------------------------- /Revit Template/RevitEventWrapper.cs: -------------------------------------------------------------------------------- 1 | using Autodesk.Revit.UI; 2 | 3 | namespace RevitTemplate 4 | { 5 | /// 6 | /// Class for creating Argument (Wrapped) External Events 7 | /// 8 | /// The Class type being wrapped for the External Event Handler. 9 | public abstract class RevitEventWrapper : IExternalEventHandler 10 | { 11 | private readonly object _lock; 12 | private TType _savedArgs; 13 | private readonly ExternalEvent _revitEvent; 14 | 15 | /// 16 | /// Class for wrapping methods for execution within a "valid" Revit API context. 17 | /// 18 | protected RevitEventWrapper() 19 | { 20 | _revitEvent = ExternalEvent.Create(this); 21 | _lock = new object(); 22 | } 23 | 24 | /// 25 | /// Wraps the "Execution" method in a valid Revit API context. 26 | /// 27 | /// Revit UI Application to use as the "wrapper" API context. 28 | public void Execute(UIApplication app) 29 | { 30 | TType args; 31 | 32 | lock (_lock) 33 | { 34 | args = _savedArgs; 35 | _savedArgs = default; 36 | } 37 | 38 | Execute(app, args); 39 | } 40 | 41 | /// 42 | /// Get the name of the operation. 43 | /// 44 | /// Operation Name. 45 | public string GetName() 46 | { 47 | return GetType().Name; 48 | } 49 | 50 | /// 51 | /// Execute the wrapped external event in a valid Revit API context. 52 | /// 53 | /// Arguments that could be passed to the execution method. 54 | public void Raise(TType args) 55 | { 56 | lock (_lock) 57 | { 58 | _savedArgs = args; 59 | } 60 | 61 | _revitEvent.Raise(); 62 | } 63 | 64 | /// 65 | /// Override void which wraps the "Execution" method in a valid Revit API context. 66 | /// 67 | /// Revit UI Application to use as the "wrapper" API context. 68 | /// Arguments that could be passed to the execution method. 69 | public abstract void Execute(UIApplication app, TType args); 70 | } 71 | } -------------------------------------------------------------------------------- /Revit Template/RevitTemplate.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Revit Template Application 5 | RevitTemplate.dll 6 | 604b1052-f742-4127-8576-c821d1193102 7 | RevitTemplate.App 8 | Petr Mitev 9 | https://github.com/mitevpi 10 | 11 | -------------------------------------------------------------------------------- /Revit Template/UI.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 30 | 31 | 32 | 33 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 45 | 46 | 47 | 48 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 58 | 60 | 61 | 62 | 83 | 84 | 85 | 86 | 87 | 89 | 91 | 92 | 93 | 94 | 95 | 97 | 99 | 100 | 101 | 103 | 105 | 106 | 107 | 123 | 124 | 125 | 127 | 128 | 129 | 131 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 146 | 148 | 150 | 152 | 153 | 154 | 156 | 157 | 158 | 160 | 162 | 163 | 164 | 179 | 193 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | -------------------------------------------------------------------------------- /Revit Template/UI.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using Autodesk.Revit.DB; 4 | using Autodesk.Revit.UI; 5 | 6 | namespace RevitTemplate 7 | { 8 | /// 9 | /// Interaction logic for UI.xaml 10 | /// 11 | public partial class Ui : Window 12 | { 13 | private readonly Document _doc; 14 | 15 | //private readonly UIApplication _uiApp; 16 | //private readonly Autodesk.Revit.ApplicationServices.Application _app; 17 | private readonly UIDocument _uiDoc; 18 | 19 | private readonly EventHandlerWithStringArg _mExternalMethodStringArg; 20 | private readonly EventHandlerWithWpfArg _mExternalMethodWpfArg; 21 | 22 | public Ui(UIApplication uiApp, EventHandlerWithStringArg evExternalMethodStringArg, 23 | EventHandlerWithWpfArg eExternalMethodWpfArg) 24 | { 25 | _uiDoc = uiApp.ActiveUIDocument; 26 | _doc = _uiDoc.Document; 27 | //_app = _doc.Application; 28 | //_uiApp = _doc.Application; 29 | Closed += MainWindow_Closed; 30 | 31 | InitializeComponent(); 32 | _mExternalMethodStringArg = evExternalMethodStringArg; 33 | _mExternalMethodWpfArg = eExternalMethodWpfArg; 34 | } 35 | 36 | 37 | private void MainWindow_Closed(object sender, EventArgs e) 38 | { 39 | Close(); 40 | } 41 | 42 | #region External Project Methods 43 | 44 | private void BExtString_Click(object sender, RoutedEventArgs e) 45 | { 46 | // Raise external event with a string argument. The string MAY 47 | // be pulled from a Revit API context because this is an external event 48 | _mExternalMethodStringArg.Raise($"Title: {_doc.Title}"); 49 | } 50 | 51 | private void BExternalMethod1_Click(object sender, RoutedEventArgs e) 52 | { 53 | // Raise external event with this UI instance (WPF) as an argument 54 | _mExternalMethodWpfArg.Raise(this); 55 | } 56 | 57 | #endregion 58 | 59 | #region Non-External Project Methods 60 | 61 | private void UserAlert() 62 | { 63 | //TaskDialog.Show("Non-External Method", "Non-External Method Executed Successfully"); 64 | MessageBox.Show("Non-External Method Executed Successfully", "Non-External Method"); 65 | 66 | //Dispatcher.Invoke(() => 67 | //{ 68 | // TaskDialog mainDialog = new TaskDialog("Non-External Method") 69 | // { 70 | // MainInstruction = "Hello, Revit!", 71 | // MainContent = "Non-External Method Executed Successfully", 72 | // CommonButtons = TaskDialogCommonButtons.Ok, 73 | // FooterText = "" 74 | // + "Click here for the Revit API Developer Center" 75 | // }; 76 | 77 | 78 | // TaskDialogResult tResult = mainDialog.Show(); 79 | // Debug.WriteLine(tResult.ToString()); 80 | //}); 81 | } 82 | 83 | private void BNonExternal3_Click(object sender, RoutedEventArgs e) 84 | { 85 | // the sheet takeoff + delete method won't work here because it's not in a valid Revit api context 86 | // and we need to do a transaction 87 | // Methods.SheetRename(this, _doc); <- WON'T WORK HERE 88 | UserAlert(); 89 | } 90 | 91 | private void BNonExternal1_Click(object sender, RoutedEventArgs e) 92 | { 93 | Methods.DocumentInfo(this, _doc); 94 | UserAlert(); 95 | } 96 | 97 | private void BNonExternal2_Click(object sender, RoutedEventArgs e) 98 | { 99 | Methods.WallInfo(this, _doc); 100 | UserAlert(); 101 | } 102 | 103 | #endregion 104 | } 105 | } -------------------------------------------------------------------------------- /Revit Template/Util.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Threading; 4 | 5 | namespace RevitTemplate 6 | { 7 | public static class Util 8 | { 9 | public static void LogThreadInfo(string name = "") 10 | { 11 | Thread th = Thread.CurrentThread; 12 | Debug.WriteLine($"Task Thread ID: {th.ManagedThreadId}, Thread Name: {th.Name}, Process Name: {name}"); 13 | } 14 | 15 | public static void HandleError(Exception ex) 16 | { 17 | Debug.WriteLine(ex.Message); 18 | Debug.WriteLine(ex.Source); 19 | Debug.WriteLine(ex.StackTrace); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /assets/refactor-instructions Page 001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/refactor-instructions Page 001.png -------------------------------------------------------------------------------- /assets/refactor-instructions Page 002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/refactor-instructions Page 002.png -------------------------------------------------------------------------------- /assets/refactor-instructions Page 003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/refactor-instructions Page 003.png -------------------------------------------------------------------------------- /assets/refactor-instructions Page 004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/refactor-instructions Page 004.png -------------------------------------------------------------------------------- /assets/refactor-instructions Page 005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/refactor-instructions Page 005.png -------------------------------------------------------------------------------- /assets/refactor-instructions Page 006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/refactor-instructions Page 006.png -------------------------------------------------------------------------------- /assets/refactor-instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/refactor-instructions.pdf -------------------------------------------------------------------------------- /assets/ribbon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/ribbon.png -------------------------------------------------------------------------------- /assets/window1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/window1.png -------------------------------------------------------------------------------- /assets/window2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/window2.png -------------------------------------------------------------------------------- /assets/window3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/assets/window3.png -------------------------------------------------------------------------------- /docs/Help/HelpLibraryManagerLauncher.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/docs/Help/HelpLibraryManagerLauncher.exe -------------------------------------------------------------------------------- /docs/Help/Install_Revit WPF Template Documentation.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CLS 3 | 4 | REM This is an example script to show how to use the Help Library Manager Launcher to install an MS Help Viewer 5 | REM file. You can use this as an example for creating a script to run from your product's installer. 6 | 7 | REM NOTE: If not executed from within the same folder as the executable, a full path is required on the 8 | REM executable and the HelpContentSetup.msha file. 9 | 10 | IF "%1%"=="" GOTO MissingVersion 11 | IF "%1%"=="1.0" GOTO HelpViewer1 12 | 13 | GOTO HelpViewer2: 14 | 15 | :HelpViewer1 16 | 17 | REM Help Viewer 1.0 18 | REM Uninstall first in case it is already there. If not, it won't install below. We'll ignore any error output 19 | REM by redirecting it to NUL. 20 | HelpLibraryManagerLauncher.exe /product "VS" /version "100" /locale en-us /uninstall /silent /vendor "Vendor Name" /productName "Revit WPF Template" /mediaBookList "Revit WPF Template" > NUL 21 | 22 | REM For Help Viewer 1.0. the setup name must be HelpContentSetup.msha so make sure we copy the setup file to that 23 | REM name. SHFB names it after the help file so that multiple files can be deployed to the same output older at 24 | REM build time. 25 | IF EXIST "Revit WPF Template Documentation.msha" COPY /Y "Revit WPF Template Documentation.msha" HelpContentSetup.msha 26 | 27 | REM Install the new content. 28 | HelpLibraryManagerLauncher.exe /product "VS" /version "100" /locale en-us /sourceMedia "%CD%\HelpContentSetup.msha" 29 | 30 | GOTO Exit 31 | 32 | :HelpViewer2 33 | 34 | REM Help Viewer 2.x 35 | REM Uninstall first in case it is already there. If not, it won't install below. We'll ignore any error output 36 | REM by redirecting it to NUL. 37 | HelpLibraryManagerLauncher.exe /viewerVersion %1 /locale en-us /wait 0 /operation uninstall /vendor "Vendor Name" /productName "Revit WPF Template" /bookList "Revit WPF Template" > NUL 38 | 39 | REM Install the new content. 40 | HelpLibraryManagerLauncher.exe /viewerVersion %1 /locale en-us /wait 0 /operation install /sourceUri "%CD%\Revit WPF Template Documentation.msha" 41 | 42 | GOTO Exit 43 | 44 | :MissingVersion 45 | ECHO A help viewer version parameter is required 46 | 47 | :Exit 48 | -------------------------------------------------------------------------------- /docs/Help/Remove_Revit WPF Template Documentation.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CLS 3 | 4 | REM This is an example script to show how to use the Help Library Manager Launcher to remove an MS Help Viewer file. 5 | REM You can use this as an example for creating a script to run from your product's uninstaller. 6 | 7 | REM NOTE: If not executed from within the same folder as the executable, a full path is required on the executable. 8 | 9 | IF "%1%"=="" GOTO MissingVersion 10 | IF "%1%"=="1.0" GOTO HelpViewer1 11 | 12 | GOTO HelpViewer2 13 | 14 | :HelpViewer1 15 | 16 | REM Help Viewer 1.0 17 | HelpLibraryManagerLauncher.exe /product "VS" /version "100" /locale en-us /uninstall /silent /vendor "Vendor Name" /productName "Revit WPF Template" /mediaBookList "Revit WPF Template" 18 | 19 | GOTO Exit 20 | 21 | :HelpViewer2 22 | 23 | REM Help Viewer 2.x 24 | HelpLibraryManagerLauncher.exe /viewerVersion %1 /locale en-us /wait 0 /operation uninstall /vendor "Vendor Name" /productName "Revit WPF Template" /bookList "Revit WPF Template" 25 | 26 | GOTO Exit 27 | 28 | :MissingVersion 29 | ECHO A help viewer version parameter is required 30 | 31 | :Exit 32 | -------------------------------------------------------------------------------- /docs/Help/Revit WPF Template Documentation.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/docs/Help/Revit WPF Template Documentation.chm -------------------------------------------------------------------------------- /docs/Help/Revit WPF Template Documentation.msha: -------------------------------------------------------------------------------- 1 |  2 | 3 | Revit WPF Template 4 | 5 | 6 |
7 | Vendor Name 8 | en-us 9 | Revit WPF Template 10 | Revit WPF Template 11 |
12 |
13 |
14 | 15 | Revit WPF Template Documentation 16 | Revit WPF Template Documentation.mshc 17 |
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/Help/Revit WPF Template Documentation.mshc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitevpi/revit-wpf-template/58b0744fe0560ba2c59b4e1b0f1087c83ffac43c/docs/Help/Revit WPF Template Documentation.mshc -------------------------------------------------------------------------------- /docs/Help/SearchHelp.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" EnableViewState="False" %> 2 | 3 | 234 | -------------------------------------------------------------------------------- /docs/Help/Web.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /docs/Help/WebKI.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 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 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /docs/Help/WebTOC.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /docs/Help/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 9 | Revit WPF Template - Redirect 10 | 11 | 12 |

If you are not redirected automatically, follow this link to the default topic.

13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/Help/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Revit WPF Template - Search 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 |
16 |
17 |
18 |
19 | 20 | 22 |
23 |
24 |    25 | Sort by title 26 |
27 |
28 |
29 |
30 |

31 | Back

32 |
33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /docs/RefactorInstructions.md: -------------------------------------------------------------------------------- 1 | # Refactor Instructions 2 | 3 | ![1](../assets/refactor-instructions%20Page%20001.png) 4 | ![2](../assets/refactor-instructions%20Page%20002.png) 5 | ![3](../assets/refactor-instructions%20Page%20003.png) 6 | ![4](../assets/refactor-instructions%20Page%20004.png) 7 | ![5](../assets/refactor-instructions%20Page%20005.png) 8 | ![6](../assets/refactor-instructions%20Page%20006.png) -------------------------------------------------------------------------------- /docs/RevitTemplate.shfbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 6 | Debug 7 | AnyCPU 8 | 2.0 9 | {5e0e2b63-96a1-4b2b-a0c7-8097a8aa16a5} 10 | 2017.9.26.0 11 | 12 | Documentation 13 | Documentation 14 | Documentation 15 | 16 | .NET Framework 4.5 17 | .\Help\ 18 | Revit WPF Template Documentation 19 | en-US 20 | 21 | 22 | 23 | HtmlHelp1, MSHelpViewer, Website 24 | Standard 25 | VS2013 26 | True 27 | True 28 | False 29 | False 30 | OnlyWarningsAndErrors 31 | Revit WPF Template 32 | 1.0.0.0 33 | MemberName 34 | False 35 | False 36 | False 37 | Blank 38 | https://github.com/mitevpi 39 | p.mitevpi%40gmail.com 40 | InheritedMembers, InheritedFrameworkMembers, Privates, PrivateFields, Protected, ProtectedInternalAsProtected, NonBrowsable 41 | 42 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 64 | 65 | 66 | 67 | 68 | 69 | OnBuildSuccess 70 | 71 | 72 | 73 | ..\..\stenotype-internal\Stenotype\Revit Binaries\RevitAPI.dll 74 | 75 | 76 | ..\..\stenotype-internal\Stenotype\Revit Binaries\RevitAPIUI.dll 77 | 78 | 79 | --------------------------------------------------------------------------------