Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mitevpi committed Jan 27, 2020
1 parent 2da3ead commit 407d3f6
Show file tree
Hide file tree
Showing 21 changed files with 695 additions and 16 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
*.userosscache
*.sln.docstates

# docs

docs/Help/fti
docs/Help/html
docs/Help/icons
docs/Help/scripts
docs/Help/styles
docs/Help/toc
docs/Help/*.php

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

Expand Down
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,28 @@

WPF Template for Revit Add-Ins including wrapped external methods for execution in a "Valid Revit API Context"

![Window A](assets/window1.png)
![Window B](assets/window2.png)
![Window C](assets/window3.png)
![Revit Ribbon](assets/ribbon.png)

## Usage

Clone/download this repository and open the `.sln` at the root of the repository with Microsoft Visual Studio.
### Build

Clone/download this repository and open the `.sln` at the root of the repository with Microsoft Visual Studio.
Building the solution will automatically create and copy the add-in files to the folder for Revit 2019. Upon opening
Revit 2019, there should be a tab called "Template" in Revit, with a button to launch the WPF add-in.
Revit 2019, there should be a tab called "Template" in Revit, with a button to launch the WPF add-in.

### Customize

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.)

## Documentation

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.

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):

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.
2. [`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.
9 changes: 0 additions & 9 deletions Revit Debug App/Revit Template.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,10 @@
<Reference Include="System" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.XML" />
Expand Down Expand Up @@ -196,7 +188,6 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="RevitTemplate.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
5 changes: 0 additions & 5 deletions Revit Debug App/packages.config

This file was deleted.

Binary file added assets/ribbon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/window1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/window2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/window3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Help/HelpLibraryManagerLauncher.exe
Binary file not shown.
47 changes: 47 additions & 0 deletions docs/Help/Install_Revit WPF Template Documentation.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@ECHO OFF
CLS

REM This is an example script to show how to use the Help Library Manager Launcher to install an MS Help Viewer
REM file. You can use this as an example for creating a script to run from your product's installer.

REM NOTE: If not executed from within the same folder as the executable, a full path is required on the
REM executable and the HelpContentSetup.msha file.

IF "%1%"=="" GOTO MissingVersion
IF "%1%"=="1.0" GOTO HelpViewer1

GOTO HelpViewer2:

:HelpViewer1

REM Help Viewer 1.0
REM Uninstall first in case it is already there. If not, it won't install below. We'll ignore any error output
REM by redirecting it to NUL.
HelpLibraryManagerLauncher.exe /product "VS" /version "100" /locale en-us /uninstall /silent /vendor "Vendor Name" /productName "Revit WPF Template" /mediaBookList "Revit WPF Template" > NUL

REM For Help Viewer 1.0. the setup name must be HelpContentSetup.msha so make sure we copy the setup file to that
REM name. SHFB names it after the help file so that multiple files can be deployed to the same output older at
REM build time.
IF EXIST "Revit WPF Template Documentation.msha" COPY /Y "Revit WPF Template Documentation.msha" HelpContentSetup.msha

REM Install the new content.
HelpLibraryManagerLauncher.exe /product "VS" /version "100" /locale en-us /sourceMedia "%CD%\HelpContentSetup.msha"

GOTO Exit

:HelpViewer2

REM Help Viewer 2.x
REM Uninstall first in case it is already there. If not, it won't install below. We'll ignore any error output
REM by redirecting it to NUL.
HelpLibraryManagerLauncher.exe /viewerVersion %1 /locale en-us /wait 0 /operation uninstall /vendor "Vendor Name" /productName "Revit WPF Template" /bookList "Revit WPF Template" > NUL

REM Install the new content.
HelpLibraryManagerLauncher.exe /viewerVersion %1 /locale en-us /wait 0 /operation install /sourceUri "%CD%\Revit WPF Template Documentation.msha"

GOTO Exit

:MissingVersion
ECHO A help viewer version parameter is required

:Exit
31 changes: 31 additions & 0 deletions docs/Help/Remove_Revit WPF Template Documentation.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@ECHO OFF
CLS

REM This is an example script to show how to use the Help Library Manager Launcher to remove an MS Help Viewer file.
REM You can use this as an example for creating a script to run from your product's uninstaller.

REM NOTE: If not executed from within the same folder as the executable, a full path is required on the executable.

IF "%1%"=="" GOTO MissingVersion
IF "%1%"=="1.0" GOTO HelpViewer1

GOTO HelpViewer2

:HelpViewer1

REM Help Viewer 1.0
HelpLibraryManagerLauncher.exe /product "VS" /version "100" /locale en-us /uninstall /silent /vendor "Vendor Name" /productName "Revit WPF Template" /mediaBookList "Revit WPF Template"

GOTO Exit

:HelpViewer2

REM Help Viewer 2.x
HelpLibraryManagerLauncher.exe /viewerVersion %1 /locale en-us /wait 0 /operation uninstall /vendor "Vendor Name" /productName "Revit WPF Template" /bookList "Revit WPF Template"

GOTO Exit

:MissingVersion
ECHO A help viewer version parameter is required

:Exit
Binary file added docs/Help/Revit WPF Template Documentation.chm
Binary file not shown.
20 changes: 20 additions & 0 deletions docs/Help/Revit WPF Template Documentation.msha
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Revit WPF Template</title>
</head>
<body class="vendor-book">
<div class="details">
<span class="vendor">Vendor Name</span>
<span class="locale">en-us</span>
<span class="product">Revit WPF Template</span>
<span class="name">Revit WPF Template</span>
</div>
<div class="package-list">
<div class="package">
<!-- NOTE: The "name" span value cannot contain any periods! -->
<span class="name">Revit WPF Template Documentation</span>
<a class="current-link" href="Revit WPF Template Documentation.mshc">Revit WPF Template Documentation.mshc</a>
</div>
</div>
</body>
</html>
Binary file added docs/Help/Revit WPF Template Documentation.mshc
Binary file not shown.
Loading

0 comments on commit 407d3f6

Please sign in to comment.