Skip to content

Commit

Permalink
renamed folders
Browse files Browse the repository at this point in the history
  • Loading branch information
mitevpi committed Jan 27, 2020
1 parent 407d3f6 commit f2791a8
Show file tree
Hide file tree
Showing 47 changed files with 83 additions and 112 deletions.
20 changes: 0 additions & 20 deletions Revit Debug App/app.config

This file was deleted.

10 changes: 2 additions & 8 deletions Revit Template.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Revit Template", "Revit Debug App\Revit Template.csproj", "{80671941-95DE-4707-9C40-758E89CBD063}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F10DBF23-064F-49F9-A269-E72863FC1FC2}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Revit Template", "Revit Template\Revit Template.csproj", "{80671941-95DE-4707-9C40-758E89CBD063}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{80671941-95DE-4707-9C40-758E89CBD063}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80671941-95DE-4707-9C40-758E89CBD063}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80671941-95DE-4707-9C40-758E89CBD063}.Debug|x64.ActiveCfg = Debug|Any CPU
{80671941-95DE-4707-9C40-758E89CBD063}.Debug|x64.Build.0 = Debug|Any CPU
{80671941-95DE-4707-9C40-758E89CBD063}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80671941-95DE-4707-9C40-758E89CBD063}.Release|Any CPU.Build.0 = Release|Any CPU
{80671941-95DE-4707-9C40-758E89CBD063}.Release|x64.ActiveCfg = Release|Any CPU
{80671941-95DE-4707-9C40-758E89CBD063}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
62 changes: 0 additions & 62 deletions Revit Debug App/App.cs → Revit Template/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Reflection;
using System.Windows.Media.Imaging;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace RevitTemplate
Expand Down Expand Up @@ -137,65 +136,4 @@ public RibbonPanel RibbonPanel(UIControlledApplication a)

#endregion
}


#region Method-Specific External Events

/// <summary>
/// This is an example of of wrapping a method with an ExternalEventHandler using a string argument.
/// Any type of argument can be passed to the RevitEventWrapper, and therefore be used in the execution
/// of a method which has to take place within a "Valid Revit API Context".
/// </summary>
public class EventHandlerWithStringArg : RevitEventWrapper<string>
{
/// <summary>
/// The Execute override void must be present in all methods wrapped by the RevitEventWrapper.
/// This defines what the method will do when raised externally.
/// </summary>
public override void Execute(UIApplication uiApp, string args)
{
// Do your processing here with "args"
TaskDialog.Show("External Event", args);
}
}

/// <summary>
/// This is an example of of wrapping a method with an ExternalEventHandler using an instance of WPF
/// as an argument. Any type of argument can be passed to the RevitEventWrapper, and therefore be used in
/// the execution of a method which has to take place within a "Valid Revit API Context". This specific
/// pattern can be useful for smaller applications, where it is convenient to access the WPF properties
/// directly, but can become cumbersome in larger application architectures. At that point, it is suggested
/// to use more "low-level" wrapping, as with the string-argument-wrapped method above.
/// </summary>
public class EventHandlerWithWpfArg : RevitEventWrapper<Ui>
{
/// <summary>
/// The Execute override void must be present in all methods wrapped by the RevitEventWrapper.
/// This defines what the method will do when raised externally.
/// </summary>
public override void Execute(UIApplication uiApp, Ui ui)
{
// SETUP
UIDocument uiDoc = uiApp.ActiveUIDocument;
Document doc = uiDoc.Document;

// METHODS
if (ui.CbDocumentData.IsChecked == true)
{
Methods.DocumentInfo(ui, doc);
}

if (ui.CbSheetData.IsChecked == true)
{
Methods.SheetRename(ui, doc);
}

if (ui.CbWallData.IsChecked == true)
{
Methods.WallInfo(ui, doc);
}
}
}

#endregion
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Revit Debug App/License.txt → Revit Template/License.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019 Petar Mitev - All Rights Reserved
Copyright (c) 2020 Petar Mitev - All Rights Reserved

Unauthorized copying of this file, project, or any associated files, via any medium is strictly prohibited.
Proprietary and confidential.
Expand Down
File renamed without changes.
61 changes: 61 additions & 0 deletions Revit Template/MethodsWrapped.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace RevitTemplate
{
/// <summary>
/// This is an example of of wrapping a method with an ExternalEventHandler using a string argument.
/// Any type of argument can be passed to the RevitEventWrapper, and therefore be used in the execution
/// of a method which has to take place within a "Valid Revit API Context".
/// </summary>
public class EventHandlerWithStringArg : RevitEventWrapper<string>
{
/// <summary>
/// The Execute override void must be present in all methods wrapped by the RevitEventWrapper.
/// This defines what the method will do when raised externally.
/// </summary>
public override void Execute(UIApplication uiApp, string args)
{
// Do your processing here with "args"
TaskDialog.Show("External Event", args);
}
}

/// <summary>
/// This is an example of of wrapping a method with an ExternalEventHandler using an instance of WPF
/// as an argument. Any type of argument can be passed to the RevitEventWrapper, and therefore be used in
/// the execution of a method which has to take place within a "Valid Revit API Context". This specific
/// pattern can be useful for smaller applications, where it is convenient to access the WPF properties
/// directly, but can become cumbersome in larger application architectures. At that point, it is suggested
/// to use more "low-level" wrapping, as with the string-argument-wrapped method above.
/// </summary>
public class EventHandlerWithWpfArg : RevitEventWrapper<Ui>
{
/// <summary>
/// The Execute override void must be present in all methods wrapped by the RevitEventWrapper.
/// This defines what the method will do when raised externally.
/// </summary>
public override void Execute(UIApplication uiApp, Ui ui)
{
// SETUP
UIDocument uiDoc = uiApp.ActiveUIDocument;
Document doc = uiDoc.Document;

// METHODS
if (ui.CbDocumentData.IsChecked == true)
{
Methods.DocumentInfo(ui, doc);
}

if (ui.CbSheetData.IsChecked == true)
{
Methods.SheetRename(ui, doc);
}

if (ui.CbWallData.IsChecked == true)
{
Methods.WallInfo(ui, doc);
}
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
<Compile Include="App.cs" />
<Compile Include="EntryCommand.cs" />
<Compile Include="Methods.cs" />
<Compile Include="MethodsWrapped.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
Expand Down Expand Up @@ -187,7 +188,6 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="RevitTemplate.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Autodesk.Revit.UI;
using System;

namespace RevitTemplate
{
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion Revit Debug App/UI.xaml.cs → Revit Template/UI.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Windows;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
Expand Down
Binary file modified docs/Help/Revit WPF Template Documentation.chm
Binary file not shown.
Binary file modified docs/Help/Revit WPF Template Documentation.mshc
Binary file not shown.
32 changes: 16 additions & 16 deletions docs/Help/WebTOC.xml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<HelpTOC>

<HelpTOCNode Id="7c688c67-655e-4027-b407-3a1368d44ad9" Title="RevitTemplate" Url="html/N_RevitTemplate.htm">
<HelpTOCNode Id="85388e4d-fbe4-4daf-a4b4-3574a3286548" Title="EntryCommand Class" Url="html/T_RevitTemplate_EntryCommand.htm">
<HelpTOCNode Id="cc272b01-6ca5-488a-8cac-78bb5a0ea392" Title="RevitTemplate" Url="html/N_RevitTemplate.htm">
<HelpTOCNode Id="325f60cc-bd0a-49d0-8e8a-4de093f82282" Title="EntryCommand Class" Url="html/T_RevitTemplate_EntryCommand.htm">
<HelpTOCNode Title="EntryCommand Constructor " Url="html/M_RevitTemplate_EntryCommand__ctor.htm" />
<HelpTOCNode Id="05d3257b-6e3e-47ea-9508-fbb3ebe044a0" Title="EntryCommand Methods" Url="html/Methods_T_RevitTemplate_EntryCommand.htm">
<HelpTOCNode Id="2e4e1e2d-8cde-44e6-bf15-c6fb92c68ae2" Title="EntryCommand Methods" Url="html/Methods_T_RevitTemplate_EntryCommand.htm">
<HelpTOCNode Title="Execute Method " Url="html/M_RevitTemplate_EntryCommand_Execute.htm" />
</HelpTOCNode>
</HelpTOCNode>
<HelpTOCNode Id="2556268a-b1bf-459e-be0c-8499072e5a1a" Title="EventHandlerWithStringArg Class" Url="html/T_RevitTemplate_EventHandlerWithStringArg.htm">
<HelpTOCNode Id="cd8837aa-e4be-43b7-8e51-892cac0c06eb" Title="EventHandlerWithStringArg Class" Url="html/T_RevitTemplate_EventHandlerWithStringArg.htm">
<HelpTOCNode Title="EventHandlerWithStringArg Constructor " Url="html/M_RevitTemplate_EventHandlerWithStringArg__ctor.htm" />
<HelpTOCNode Id="df4deabd-b8a0-448f-9fbd-28dc923bb00d" Title="EventHandlerWithStringArg Methods" Url="html/Methods_T_RevitTemplate_EventHandlerWithStringArg.htm">
<HelpTOCNode Id="89290ddd-c65d-4054-9656-18c164618014" Title="Execute Method " Url="html/Overload_RevitTemplate_EventHandlerWithStringArg_Execute.htm">
<HelpTOCNode Id="17e419c9-8047-425f-96ab-6acf69495bd0" Title="EventHandlerWithStringArg Methods" Url="html/Methods_T_RevitTemplate_EventHandlerWithStringArg.htm">
<HelpTOCNode Id="d5fc38cc-293c-4d7d-a043-3deb46450576" Title="Execute Method " Url="html/Overload_RevitTemplate_EventHandlerWithStringArg_Execute.htm">
<HelpTOCNode Title="Execute Method (UIApplication, String)" Url="html/M_RevitTemplate_EventHandlerWithStringArg_Execute.htm" />
</HelpTOCNode>
</HelpTOCNode>
<HelpTOCNode Title="EventHandlerWithStringArg Fields" Url="html/Fields_T_RevitTemplate_EventHandlerWithStringArg.htm" />
</HelpTOCNode>
<HelpTOCNode Id="94ab1bb2-ecfa-4fdc-bc08-e26b70ed793c" Title="EventHandlerWithWpfArg Class" Url="html/T_RevitTemplate_EventHandlerWithWpfArg.htm">
<HelpTOCNode Id="5f272204-0f9c-4d46-b8c7-68cf21022358" Title="EventHandlerWithWpfArg Class" Url="html/T_RevitTemplate_EventHandlerWithWpfArg.htm">
<HelpTOCNode Title="EventHandlerWithWpfArg Constructor " Url="html/M_RevitTemplate_EventHandlerWithWpfArg__ctor.htm" />
<HelpTOCNode Id="c763f6d7-d6d8-4039-9b39-1ac7194b8c30" Title="EventHandlerWithWpfArg Methods" Url="html/Methods_T_RevitTemplate_EventHandlerWithWpfArg.htm">
<HelpTOCNode Id="43d33f61-88d9-4739-a96c-d4f362e94708" Title="Execute Method " Url="html/Overload_RevitTemplate_EventHandlerWithWpfArg_Execute.htm">
<HelpTOCNode Id="daa723b5-7ff7-4cff-b173-aae6c3378ced" Title="EventHandlerWithWpfArg Methods" Url="html/Methods_T_RevitTemplate_EventHandlerWithWpfArg.htm">
<HelpTOCNode Id="aeeb06de-b243-4d25-af4f-580de1d84978" Title="Execute Method " Url="html/Overload_RevitTemplate_EventHandlerWithWpfArg_Execute.htm">
<HelpTOCNode Title="Execute Method (UIApplication, Ui)" Url="html/M_RevitTemplate_EventHandlerWithWpfArg_Execute.htm" />
</HelpTOCNode>
</HelpTOCNode>
<HelpTOCNode Title="EventHandlerWithWpfArg Fields" Url="html/Fields_T_RevitTemplate_EventHandlerWithWpfArg.htm" />
</HelpTOCNode>
<HelpTOCNode Id="d692183d-abc4-43d7-9e1b-15ea5469bbbd" Title="RevitEventWrapper(TType) Class" Url="html/T_RevitTemplate_RevitEventWrapper_1.htm">
<HelpTOCNode Id="b639958c-4d50-46d0-807c-585377e1917f" Title="RevitEventWrapper(TType) Class" Url="html/T_RevitTemplate_RevitEventWrapper_1.htm">
<HelpTOCNode Title="RevitEventWrapper(TType) Constructor " Url="html/M_RevitTemplate_RevitEventWrapper_1__ctor.htm" />
<HelpTOCNode Id="680611e7-e07f-443e-beb4-abfbb0156e1e" Title="RevitEventWrapper(TType) Methods" Url="html/Methods_T_RevitTemplate_RevitEventWrapper_1.htm">
<HelpTOCNode Id="90aedf66-641f-44de-b972-4df8c1f80fd7" Title="Execute Method " Url="html/Overload_RevitTemplate_RevitEventWrapper_1_Execute.htm">
<HelpTOCNode Id="6ba72d8e-84e8-42b1-b242-0651dc3e11ae" Title="RevitEventWrapper(TType) Methods" Url="html/Methods_T_RevitTemplate_RevitEventWrapper_1.htm">
<HelpTOCNode Id="bcb96638-af2f-4c0f-9293-60f41a368cf0" Title="Execute Method " Url="html/Overload_RevitTemplate_RevitEventWrapper_1_Execute.htm">
<HelpTOCNode Title="Execute Method (UIApplication)" Url="html/M_RevitTemplate_RevitEventWrapper_1_Execute.htm" />
<HelpTOCNode Title="Execute Method (UIApplication, TType)" Url="html/M_RevitTemplate_RevitEventWrapper_1_Execute_1.htm" />
</HelpTOCNode>
<HelpTOCNode Title="GetName Method " Url="html/M_RevitTemplate_RevitEventWrapper_1_GetName.htm" />
<HelpTOCNode Title="Raise Method " Url="html/M_RevitTemplate_RevitEventWrapper_1_Raise.htm" />
</HelpTOCNode>
<HelpTOCNode Id="0ac6db5d-69f5-4b57-a639-622a0d13018d" Title="RevitEventWrapper(TType) Fields" Url="html/Fields_T_RevitTemplate_RevitEventWrapper_1.htm">
<HelpTOCNode Id="00fb83ee-c4d9-4ac9-9299-6b9eef25e7fa" Title="RevitEventWrapper(TType) Fields" Url="html/Fields_T_RevitTemplate_RevitEventWrapper_1.htm">
<HelpTOCNode Title="_lock Field" Url="html/F_RevitTemplate_RevitEventWrapper_1__lock.htm" />
<HelpTOCNode Title="_revitEvent Field" Url="html/F_RevitTemplate_RevitEventWrapper_1__revitEvent.htm" />
<HelpTOCNode Title="_savedArgs Field" Url="html/F_RevitTemplate_RevitEventWrapper_1__savedArgs.htm" />
</HelpTOCNode>
</HelpTOCNode>
<HelpTOCNode Id="9e7deb60-32b6-469b-bd25-6299086dfbbc" Title="Ui Class" Url="html/T_RevitTemplate_Ui.htm">
<HelpTOCNode Id="f3d94d74-323c-412a-93d4-4c9b21a050d3" Title="Ui Class" Url="html/T_RevitTemplate_Ui.htm">
<HelpTOCNode Title="Ui Constructor " Url="html/M_RevitTemplate_Ui__ctor.htm" />
<HelpTOCNode Title="Ui Properties" Url="html/Properties_T_RevitTemplate_Ui.htm" />
<HelpTOCNode Id="df5fdef8-2d9d-47d2-8575-43dc53861fd3" Title="Ui Methods" Url="html/Methods_T_RevitTemplate_Ui.htm">
<HelpTOCNode Id="72ed5574-f569-4ef5-ad56-9db6ffcbb1c7" Title="Ui Methods" Url="html/Methods_T_RevitTemplate_Ui.htm">
<HelpTOCNode Title="BExternalMethod1_Click Method " Url="html/M_RevitTemplate_Ui_BExternalMethod1_Click.htm" />
<HelpTOCNode Title="BNonExternal1_Click Method " Url="html/M_RevitTemplate_Ui_BNonExternal1_Click.htm" />
<HelpTOCNode Title="BNonExternal2_Click Method " Url="html/M_RevitTemplate_Ui_BNonExternal2_Click.htm" />
Expand All @@ -55,7 +55,7 @@
<HelpTOCNode Title="MainWindow_Closed Method " Url="html/M_RevitTemplate_Ui_MainWindow_Closed.htm" />
</HelpTOCNode>
<HelpTOCNode Title="Ui Events" Url="html/Events_T_RevitTemplate_Ui.htm" />
<HelpTOCNode Id="bc661dba-e9e2-4c5e-bd68-6db1af7a2740" Title="Ui Fields" Url="html/Fields_T_RevitTemplate_Ui.htm">
<HelpTOCNode Id="90cf99a4-a063-4bb5-a1c4-794373cb8a28" Title="Ui Fields" Url="html/Fields_T_RevitTemplate_Ui.htm">
<HelpTOCNode Title="_app Field" Url="html/F_RevitTemplate_Ui__app.htm" />
<HelpTOCNode Title="_contentLoaded Field" Url="html/F_RevitTemplate_Ui__contentLoaded.htm" />
<HelpTOCNode Title="_doc Field" Url="html/F_RevitTemplate_Ui__doc.htm" />
Expand Down
4 changes: 2 additions & 2 deletions docs/RevitTemplate.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<HtmlHelpName>Revit WPF Template Documentation</HtmlHelpName>
<Language>en-US</Language>
<DocumentationSources>
<DocumentationSource sourceFile="..\Revit Debug App\bin\Debug\RevitTemplate.dll" />
<DocumentationSource sourceFile="..\Revit Debug App\bin\Debug\RevitTemplate.xml" /></DocumentationSources>
<DocumentationSource sourceFile="..\Revit Template\bin\Debug\RevitTemplate.dll" />
<DocumentationSource sourceFile="..\Revit Template\bin\Debug\RevitTemplate.xml" /></DocumentationSources>
<HelpFileFormat>HtmlHelp1, MSHelpViewer, Website</HelpFileFormat>
<SyntaxFilters>Standard</SyntaxFilters>
<PresentationStyle>VS2013</PresentationStyle>
Expand Down

0 comments on commit f2791a8

Please sign in to comment.