diff --git a/SDK/Add-In Manager/Autodesk.AddInManager.Command.dll b/SDK/Add-In Manager/Autodesk.AddInManager.Command.dll index b9d9368a..c4b71796 100644 Binary files a/SDK/Add-In Manager/Autodesk.AddInManager.Command.dll and b/SDK/Add-In Manager/Autodesk.AddInManager.Command.dll differ diff --git a/SDK/Autodesk Icon Guidelines.pdf b/SDK/Autodesk Icon Guidelines.pdf deleted file mode 100644 index 42490ea2..00000000 Binary files a/SDK/Autodesk Icon Guidelines.pdf and /dev/null differ diff --git a/SDK/Getting Started with the Revit API.docx b/SDK/Getting Started with the Revit API.docx index b7ee9d70..ebf952f5 100644 Binary files a/SDK/Getting Started with the Revit API.docx and b/SDK/Getting Started with the Revit API.docx differ diff --git a/SDK/Macro Samples/GetTimeElapsed/Addin/GetTimeElapsed.dat b/SDK/Macro Samples/GetTimeElapsed/Addin/GetTimeElapsed.dat new file mode 100644 index 00000000..ae21dfd3 Binary files /dev/null and b/SDK/Macro Samples/GetTimeElapsed/Addin/GetTimeElapsed.dat differ diff --git a/SDK/Macro Samples/GetTimeElapsed/Addin/GetTimeElapsed.dll b/SDK/Macro Samples/GetTimeElapsed/Addin/GetTimeElapsed.dll new file mode 100644 index 00000000..0c51de0c Binary files /dev/null and b/SDK/Macro Samples/GetTimeElapsed/Addin/GetTimeElapsed.dll differ diff --git a/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/.vscode/extensions.json b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/.vscode/extensions.json new file mode 100644 index 00000000..61ae8a27 --- /dev/null +++ b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-dotnettools.csharp", + ] +} \ No newline at end of file diff --git a/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/.vscode/launch.json b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/.vscode/launch.json new file mode 100644 index 00000000..a19a9b99 --- /dev/null +++ b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Revit", + "type": "coreclr", + "request": "attach", + "processName": "revit.exe", + "justMyCode": true + } + ] +} diff --git a/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/.vscode/tasks.json b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/.vscode/tasks.json new file mode 100644 index 00000000..ca683426 --- /dev/null +++ b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/.vscode/tasks.json @@ -0,0 +1,14 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build" + ], + "problemMatcher": "$msCompile" + }, + ] +} diff --git a/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/GetTimeElapsed.csproj b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/GetTimeElapsed.csproj new file mode 100644 index 00000000..87a139a4 --- /dev/null +++ b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/GetTimeElapsed.csproj @@ -0,0 +1,38 @@ + + + net8.0-windows + enable + enable + + + x64 + false + false + False + True + Portable + ..\..\Addin\ + GetTimeElapsed + obj\ + DEBUG;TRACE + obj\Debug + false + false + false + false + false + false + false + + + + False + + + False + + + + + + \ No newline at end of file diff --git a/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/Properties/AssemblyInfo.cs b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..7f4a7cce --- /dev/null +++ b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NewModule")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NewModule")] +[assembly: AssemblyCopyright("Copyright 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/ThisApplication.Designer.cs b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/ThisApplication.Designer.cs new file mode 100644 index 00000000..c88feb7f --- /dev/null +++ b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/ThisApplication.Designer.cs @@ -0,0 +1,54 @@ +namespace GetTimeElapsed +{ + + public sealed partial class ThisApplication : Autodesk.Revit.UI.Macros.ApplicationEntryPoint + { + + public event System.EventHandler Startup; + + public event System.EventHandler Shutdown; + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void OnStartup() + { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void FinishInitialization() + { + base.FinishInitialization(); + this.OnStartup(); + this.InternalStartup(); + if ((this.Startup != null)) + { + this.Startup(this, System.EventArgs.Empty); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void OnShutdown() + { + if ((this.Shutdown != null)) + { + this.Shutdown(this, System.EventArgs.Empty); + } + base.OnShutdown(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override string PrimaryCookie + { + get + { + return "ThisApplication"; + } + } + } +} diff --git a/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/ThisApplication.cs b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/ThisApplication.cs new file mode 100644 index 00000000..ebe83fe5 --- /dev/null +++ b/SDK/Macro Samples/GetTimeElapsed/Source/GetTimeElapsed/ThisApplication.cs @@ -0,0 +1,139 @@ +using System; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Events; +using Autodesk.Revit.UI.Selection; +using System.Collections.Generic; +using System.Collections; +using System.Linq; +using Autodesk.Revit.DB.ExtensibleStorage; + +namespace GetTimeElapsed +{ + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.DB.Macros.AddInId("4FD02D8C-2CDD-4FA8-89E0-0D03B812A398")] + public partial class ThisApplication + { + Dictionary m_dicLastSaved = new Dictionary(); + private void Module_Startup(object? sender, EventArgs e) + { + InitializeDicLastSaved(); + this.Application.DocumentSaved += new EventHandler(ThisApplication_DocumentSaved); + this.Application.DocumentOpened += new EventHandler(ThisApplication_DocumentOpened); + this.Application.DocumentCreated += new EventHandler(ThisApplication_DocumentCreated); + this.Application.DocumentClosing += new EventHandler(ThisApplication_DocumentClosing); + } + + private void Module_Shutdown(object? sender, EventArgs e) + { + this.Application.DocumentSaved -= new EventHandler(ThisApplication_DocumentSaved); + this.Application.DocumentOpened -= new EventHandler(ThisApplication_DocumentOpened); + this.Application.DocumentCreated -= new EventHandler(ThisApplication_DocumentCreated); + this.Application.DocumentClosing -= new EventHandler(ThisApplication_DocumentClosing); + } + + #region Revit Macros generated code + private void InternalStartup() + { + this.Startup += new System.EventHandler(Module_Startup); + this.Shutdown += new System.EventHandler(Module_Shutdown); + } + #endregion + + /// + /// Initialize + /// + private void InitializeDicLastSaved() + { + foreach (Document document in this.Application.Documents) + { + m_dicLastSaved.Add(document, DateTime.MaxValue); + } + } + + /// + /// DocumentCreated event, add the created document into m_dicLastSaved + /// + /// sender + /// DocumentCreatedEventArgs + public void ThisApplication_DocumentCreated(object? sender, DocumentCreatedEventArgs args) + { + m_dicLastSaved.Add(args.Document, DateTime.MaxValue); + } + + /// + /// DocumentClosing event, remove the closing document from m_dicLastSaved + /// + /// sender + /// DocumentClosingEventArgs + public void ThisApplication_DocumentClosing(object? sender, DocumentClosingEventArgs args) + { + m_dicLastSaved.Remove(args.Document); + } + + /// + /// DocumentOpened event, add the opened document into m_dicLastSaved + /// + /// sender + /// DocumentOpenedEventArgs + public void ThisApplication_DocumentOpened(object? sender, DocumentOpenedEventArgs args) + { + m_dicLastSaved.Add(args.Document, DateTime.MaxValue); + } + + /// + /// DocumentSaved event, record the current DataTime for the saved document + /// + /// sender + /// DocumentSavedEventArgs + public void ThisApplication_DocumentSaved(object? sender, DocumentSavedEventArgs args) + { + this.m_dicLastSaved[args.Document] = DateTime.Now; + } + + /// + /// FormatTimeSpan + /// + /// TimeSpan + /// the string of TimeSpan + public String FormatTimeSpan(TimeSpan elapse) + { + String elapseStr = elapse.ToString(); + int lastIndexOfDot = elapseStr.LastIndexOf('.'); + return elapseStr.Substring(0, lastIndexOfDot); + } + + /// + /// GetTimeElapsedSinceLastSave + /// + public void GetTimeElapsedSinceLastSave() + { + String text = String.Format("{0,-30}{1,-30}", + "Document Full Name", + "Elapse Time Since Last Save(day.hh:mm:ss)") + + "\n"; + foreach (KeyValuePair pair in m_dicLastSaved) + { + String strElapsed = String.Empty; + if (pair.Value == DateTime.MaxValue) + { + strElapsed = "Never"; + } + else + { + strElapsed = FormatTimeSpan(DateTime.Now - pair.Value); + } + + String fileName = System.IO.Path.GetFileName(pair.Key.PathName); + if (String.IsNullOrEmpty(fileName)) + { + fileName = "*New*"; + } + + text += String.Format("{0,-30}{1,-30}", fileName, strElapsed) + "\n"; + } + + TaskDialog.Show("Macro GetTimeElapsedSinceLastSave", text); + } + } +} diff --git a/SDK/Macro Samples/Macro Samples Readme.doc b/SDK/Macro Samples/Macro Samples Readme.doc index ca7f6ecb..ac2cb136 100644 Binary files a/SDK/Macro Samples/Macro Samples Readme.doc and b/SDK/Macro Samples/Macro Samples Readme.doc differ diff --git a/SDK/Macro Samples/MacroSamples_MEP/Addin/MacroSamples_MEP.dat b/SDK/Macro Samples/MacroSamples_MEP/Addin/MacroSamples_MEP.dat new file mode 100644 index 00000000..f2790674 Binary files /dev/null and b/SDK/Macro Samples/MacroSamples_MEP/Addin/MacroSamples_MEP.dat differ diff --git a/SDK/Macro Samples/MacroSamples_MEP/Addin/MacroSamples_MEP.dll b/SDK/Macro Samples/MacroSamples_MEP/Addin/MacroSamples_MEP.dll new file mode 100644 index 00000000..43b7e3ed Binary files /dev/null and b/SDK/Macro Samples/MacroSamples_MEP/Addin/MacroSamples_MEP.dll differ diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/.vscode/extensions.json b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/.vscode/extensions.json new file mode 100644 index 00000000..61ae8a27 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-dotnettools.csharp", + ] +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/.vscode/launch.json b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/.vscode/launch.json new file mode 100644 index 00000000..a19a9b99 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Revit", + "type": "coreclr", + "request": "attach", + "processName": "revit.exe", + "justMyCode": true + } + ] +} diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/.vscode/tasks.json b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/.vscode/tasks.json new file mode 100644 index 00000000..ca683426 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/.vscode/tasks.json @@ -0,0 +1,14 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build" + ], + "problemMatcher": "$msCompile" + }, + ] +} diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Detector.cs b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Detector.cs new file mode 100644 index 00000000..6e13ee56 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Detector.cs @@ -0,0 +1,161 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Collections.Generic; +using System.Text; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Mechanical; + +using Element = Autodesk.Revit.DB.Element; + +namespace CS_AvoidObstruction +{ + /// + /// This class is used to detect the obstructions of a Line or a ray. + /// + class Detector + { + /// + /// Revit Document. + /// + private Document m_rvtDoc; + + /// + /// Revit 3D view. + /// + private View3D? m_view3d; + + /// + /// Constructor, initialize all the fields. + /// + /// Revit Document + public Detector(Document rvtDoc) + { + m_rvtDoc = rvtDoc; + ElementArray views = new ElementArray(); + ElementFilter view3DElementFilter = new ElementClassFilter(typeof(View3D)); + FilteredElementCollector collector = new FilteredElementCollector(m_rvtDoc); + collector.WherePasses(view3DElementFilter); + m_view3d = collector.ToElements()[0] as View3D; + } + + /// + /// Return all the obstructions which intersect with a ray given by an origin and a direction. + /// + /// Ray's origin + /// Ray's direction + /// Obstructions intersected with the given ray + public List Obstructions(XYZ origin, XYZ dir) + { + List result = new List(); + ReferenceIntersector referenceIntersector = new ReferenceIntersector(m_view3d); + referenceIntersector.TargetType = FindReferenceTarget.Face; + var obstructionsOnUnboundLine = referenceIntersector.Find(origin, dir); + foreach (ReferenceWithContext gRef in obstructionsOnUnboundLine) + { + if (!InArray(result, gRef)) + { + result.Add(gRef); + } + } + result.Sort(CompareReferences); + return result; + } + + /// + /// Return all the obstructions which intersect with a bound line. + /// + /// Bound line + /// Obstructions intersected with the bound line + public List Obstructions(Line boundLine) + { + List result = new List(); + XYZ startPt = boundLine.GetEndPoint(0); + XYZ endPt = boundLine.GetEndPoint(1); + XYZ dir = (endPt.Subtract(startPt)).Normalize(); + ReferenceIntersector referenceIntersector = new ReferenceIntersector(m_view3d); + referenceIntersector.TargetType = FindReferenceTarget.Face; + var obstructionsOnUnboundLine = referenceIntersector.Find(startPt, dir); + foreach (ReferenceWithContext gRef in obstructionsOnUnboundLine) + { + Reference refr = gRef.GetReference(); + // Judge whether the point is in the bound line or not, if the distance between the point and line + // is Zero, then the point is in the bound line. + if (boundLine.Distance(refr.GlobalPoint) < 1e-9) + { + if (!InArray(result, gRef)) + { + result.Add(gRef); + } + } + } + result.Sort(CompareReferences); + return result; + } + + /// + /// Judge whether a given Reference is in a ReferenceWithContext list. + /// Give two ReferenceWithContexts, if their Proximitys and Element Ids are equal, + /// we say the two ReferenceWithContexts are equal. + /// + /// ReferenceWithContext Array + /// ReferenceWithContext + /// True of false + private bool InArray(List arr, ReferenceWithContext entry) + { + foreach (ReferenceWithContext tmp in arr) + { + if (tmp.Proximity == entry.Proximity && + tmp.GetReference().ElementId.Value == entry.GetReference().ElementId.Value) + { + return true; + } + } + return false; + } + + /// + /// Used to compare two ReferenceWithContexts, just compare their Proximitys. + /// + /// First ReferenceWithContext to compare + /// Second ReferenceWithContext to compare + /// -1, 0, or 1 + private int CompareReferences(ReferenceWithContext a, ReferenceWithContext b) + { + if (a.Proximity > b.Proximity) + { + return 1; + } + + if (a.Proximity < b.Proximity) + { + return -1; + } + + return 0; + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/MacroSamples_MEP.csproj b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/MacroSamples_MEP.csproj new file mode 100644 index 00000000..20b19e60 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/MacroSamples_MEP.csproj @@ -0,0 +1,38 @@ + + + net8.0-windows + enable + enable + + + x64 + false + false + False + True + Portable + ..\..\Addin\ + MacroSamples_MEP + obj\ + DEBUG;TRACE + obj\Debug + false + false + false + false + false + false + false + + + + False + + + False + + + + + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Properties/AssemblyInfo.cs b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..7f4a7cce --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NewModule")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NewModule")] +[assembly: AssemblyCopyright("Copyright 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Resolver.cs b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Resolver.cs new file mode 100644 index 00000000..f57d3a04 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Resolver.cs @@ -0,0 +1,542 @@ +// +// (C) Copyright 2003-2017 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Collections.Generic; +using System.Text; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit; +using Autodesk.Revit.ApplicationServices; +using Autodesk.Revit.DB.Plumbing; +using Autodesk.Revit.DB.Mechanical; +using System.Diagnostics; +using Element = Autodesk.Revit.DB.Element; +using System.Collections; + +namespace CS_AvoidObstruction +{ + /// + /// This class implement the algorithm to detect the obstruction and resolve it. + /// + class Resolver + { + /// + /// Revit Document. + /// + private Document? m_rvtDoc; + + /// + /// Detector to detect the obstructions. + /// + private Detector m_detector; + + + PipingSystemType? m_pipingSystemType; + + /// + /// Constructor, initialize all the fields of this class. + /// + /// Revit ExternalCommandData from external command entrance + public Resolver(Document doc) + { + m_rvtDoc = doc; + m_detector = new Detector(m_rvtDoc); + + FilteredElementCollector collector = new FilteredElementCollector(m_rvtDoc); + var pipingSystemTypes = collector.OfClass(typeof(PipingSystemType)).ToElements(); + foreach (PipingSystemType pipingSystemType in pipingSystemTypes) + { + if (pipingSystemType.SystemClassification == MEPSystemClassification.SupplyHydronic || + pipingSystemType.SystemClassification == MEPSystemClassification.ReturnHydronic) + { + m_pipingSystemType = pipingSystemType; + break; + } + } + } + + /// + /// Detect and resolve the obstructions of all Pipes. + /// + public void Resolve() + { + List pipes = new List(); + FilteredElementCollector collector = new FilteredElementCollector(m_rvtDoc); + pipes.AddRange(collector.OfClass(typeof(Pipe)).ToElements()); + foreach (Element pipe in pipes) + { + Resolve(pipe as Pipe); + } + } + + /// + /// Calculate the uniform perpendicular directions with inputting direction "dir". + /// + /// Direction to calculate + /// How many perpendicular directions will be calculated + /// The calculated perpendicular directions with dir + private List PerpendicularDirs(Autodesk.Revit.DB.XYZ dir, int count) + { + List dirs = new List(); + Plane plane = Plane.CreateByNormalAndOrigin(dir, Autodesk.Revit.DB.XYZ.Zero); + Arc arc = Arc.Create(plane, 1.0, 0, 6.28); + + double delta = 1.0 / (double)count; + for (int i = 1; i <= count; i++) + { + Autodesk.Revit.DB.XYZ pt = arc.Evaluate(delta * i, true); + dirs.Add(pt); + } + + return dirs; + } + + /// + /// Detect the obstructions of pipe and resolve them. + /// + /// Pipe to resolve + private void Resolve(Pipe? pipe) + { + if (pipe == null || m_pipingSystemType == null || m_rvtDoc == null) + return; + var parameter = pipe.get_Parameter(BuiltInParameter.RBS_START_LEVEL_PARAM); + var levelId = parameter.AsElementId(); + var systemTypeId = m_pipingSystemType.Id; + // Get the centerline of pipe. + + Line? pipeLine = (pipe.Location as LocationCurve)?.Curve as Line; + + // Calculate the intersection references with pipe's centerline. + if (pipeLine == null) + return; + List obstructionRefArr = m_detector.Obstructions(pipeLine); + + // Filter out the references, just allow Pipe, Beam, and Duct. + Filter(pipe, obstructionRefArr); + + if (obstructionRefArr.Count == 0) + { + // There are no intersection found. + return; + } + + // Calculate the direction of pipe's centerline. + Autodesk.Revit.DB.XYZ dir = pipeLine.GetEndPoint(1) - pipeLine.GetEndPoint(0); + + // Build the sections from the intersection references. + List
sections = Section.BuildSections(obstructionRefArr, dir.Normalize()); + + // Merge the neighbor sections if the distance of them is too close. + for (int i = sections.Count - 2; i >= 0; i--) + { + Autodesk.Revit.DB.XYZ detal = sections[i].End - sections[i + 1].Start; + if (detal.GetLength() < pipe.Diameter * 3) + { + sections[i].Refs.AddRange(sections[i + 1].Refs); + sections.RemoveAt(i + 1); + } + } + + // Resolve the obstructions one by one. + foreach (Section sec in sections) + { + Resolve(pipe, sec); + } + + // Connect the neighbor sections with pipe and elbow fittings. + // + for (int i = 1; i < sections.Count; i++) + { + // Get the end point from the previous section. + Autodesk.Revit.DB.XYZ start = sections[i - 1].End; + + // Get the start point from the current section. + Autodesk.Revit.DB.XYZ end = sections[i].Start; + + // Create a pipe between two neighbor section. + Pipe tmpPipe = Pipe.Create(m_rvtDoc, systemTypeId, pipe.PipeType.Id, levelId, start, end); + + // Copy pipe's parameters values to tmpPipe. + CopyParameters(pipe, tmpPipe); + + // Create elbow fitting to connect previous section with tmpPipe. + Connector? conn1 = FindConnector(sections[i - 1].Pipes[2], start); + Connector? conn2 = FindConnector(tmpPipe, start); + FamilyInstance fi = m_rvtDoc.Create.NewElbowFitting(conn1, conn2); + + // Create elbow fitting to connect current section with tmpPipe. + Connector? conn3 = FindConnector(sections[i].Pipes[0], end); + Connector? conn4 = FindConnector(tmpPipe, end); + FamilyInstance f2 = m_rvtDoc.Create.NewElbowFitting(conn3, conn4); + } + + // Find two connectors which pipe's two ends connector connected to. + Connector? startConn = FindConnectedTo(pipe, pipeLine.GetEndPoint(0)); + Connector? endConn = FindConnectedTo(pipe, pipeLine.GetEndPoint(1)); + + Pipe? startPipe = null; + if (null != startConn) + { + // Create a pipe between pipe's start connector and pipe's start section. + startPipe = Pipe.Create(m_rvtDoc, pipe.PipeType.Id, levelId, startConn, sections[0].Start); + } + else + { + // Create a pipe between pipe's start point and pipe's start section. + startPipe = Pipe.Create(m_rvtDoc, systemTypeId, pipe.PipeType.Id, levelId, sections[0].Start, pipeLine.GetEndPoint(0)); + } + + // Copy parameters from pipe to startPipe. + CopyParameters(pipe, startPipe); + + // Connect the startPipe and first section with elbow fitting. + Connector? connStart1 = FindConnector(startPipe, sections[0].Start); + Connector? connStart2 = FindConnector(sections[0].Pipes[0], sections[0].Start); + FamilyInstance fii = m_rvtDoc.Create.NewElbowFitting(connStart1, connStart2); + + Pipe? endPipe = null; + int count = sections.Count; + if (null != endConn) + { + // Create a pipe between pipe's end connector and pipe's end section. + endPipe = Pipe.Create(m_rvtDoc, pipe.PipeType.Id, levelId, endConn, sections[count - 1].End); + } + else + { + // Create a pipe between pipe's end point and pipe's end section. + endPipe = Pipe.Create(m_rvtDoc, systemTypeId, pipe.PipeType.Id, levelId, sections[count - 1].End, pipeLine.GetEndPoint(1)); + } + + // Copy parameters from pipe to endPipe. + CopyParameters(pipe, endPipe); + + // Connect the endPipe and last section with elbow fitting. + Connector? connEnd1 = FindConnector(endPipe, sections[count - 1].End); + Connector? connEnd2 = FindConnector(sections[count - 1].Pipes[2], sections[count - 1].End); + FamilyInstance fiii = m_rvtDoc.Create.NewElbowFitting(connEnd1, connEnd2); + + // Delete the pipe after resolved. + m_rvtDoc.Delete(pipe.Id); + } + + /// + /// Filter the inputting References, just allow Pipe, Duct and Beam References. + /// + /// Pipe + /// References to filter + private void Filter(Pipe pipe, List refs) + { + if (m_rvtDoc == null) + return; + for (int i = refs.Count - 1; i >= 0; i--) + { + Reference cur = refs[i].GetReference(); + Element curElem = m_rvtDoc.GetElement(cur); + if (curElem.Id == pipe.Id || + (!(curElem is Pipe) && !(curElem is Duct) && + curElem.Category.Id.Value != (int)BuiltInCategory.OST_StructuralFraming)) + { + refs.RemoveAt(i); + } + } + } + + /// + /// This method will find out a route to avoid the obstruction. + /// + /// Pipe to resolve + /// Pipe's one obstruction + /// A route which can avoid the obstruction + private Line FindRoute(Pipe pipe, Section section) + { + + // Perpendicular direction minimal length. + double minLength = pipe.Diameter * 2; + + // Parallel direction jump step. + double jumpStep = pipe.Diameter; + + // Calculate the directions in which to find the solution. + List dirs = new List(); + Autodesk.Revit.DB.XYZ? crossDir = null; + foreach (ReferenceWithContext gref in section.Refs) + { + if (m_rvtDoc == null) + continue; + Element elem = m_rvtDoc.GetElement(gref.GetReference()); + Line? locationLine = (elem.Location as LocationCurve)?.Curve as Line; + Autodesk.Revit.DB.XYZ refDir = locationLine?.GetEndPoint(1) - locationLine?.GetEndPoint(0); + refDir = refDir.Normalize(); + if (refDir.IsAlmostEqualTo(section.PipeCenterLineDirection) || refDir.IsAlmostEqualTo(-section.PipeCenterLineDirection)) + { + continue; + } + crossDir = refDir.CrossProduct(section.PipeCenterLineDirection); + dirs.Add(crossDir.Normalize()); + break; + } + + // When all the obstruction are parallel with the centerline of the pipe, + // We can't calculate the direction from the vector.Cross method. + if (dirs.Count == 0) + { + // Calculate perpendicular directions with dir in four directions. + List perDirs = PerpendicularDirs(section.PipeCenterLineDirection, 4); + dirs.Add(perDirs[0]); + dirs.Add(perDirs[1]); + } + + Line? foundLine = null; + while (null == foundLine) + { + // Extend the section interval by jumpStep. + section.Inflate(0, jumpStep); + section.Inflate(1, jumpStep); + + // Find solution in the given directions. + for (int i = 0; null == foundLine && i < dirs.Count; i++) + { + // Calculate the intersections. + List obs1 = m_detector.Obstructions(section.Start, dirs[i]); + List obs2 = m_detector.Obstructions(section.End, dirs[i]); + + // Filter out the intersection result. + Filter(pipe, obs1); + Filter(pipe, obs2); + + // Find out the minimal intersections in two opposite direction. + ReferenceWithContext[] mins1 = GetClosestSectionsToOrigin(obs1); + ReferenceWithContext[] mins2 = GetClosestSectionsToOrigin(obs2); + + // Find solution in the given direction and its opposite direction. + for (int j = 0; null == foundLine && j < 2; j++) + { + if (mins1[j] != null && Math.Abs(mins1[j].Proximity) < minLength || + mins2[j] != null && Math.Abs(mins2[j].Proximity) < minLength) + { + continue; + } + + // Calculate the maximal height that the parallel line can be reached. + double maxHight = 1000 * pipe.Diameter; + if (mins1[j] != null && mins2[j] != null) + { + maxHight = Math.Min(Math.Abs(mins1[j].Proximity), Math.Abs(mins2[j].Proximity)); + } + else if (mins1[j] != null) + { + maxHight = Math.Abs(mins1[j].Proximity); + } + else if (mins2[j] != null) + { + maxHight = Math.Abs(mins2[j].Proximity); + } + + Autodesk.Revit.DB.XYZ dir = (j == 1) ? dirs[i] : -dirs[i]; + + // Calculate the parallel line which can avoid obstructions. + foundLine = FindParallelLine(pipe, section, dir, maxHight); + } + } + } + return foundLine; + } + + /// + /// Find a line Parallel to pipe's centerline to avoid the obstruction. + /// + /// Pipe who has obstructions + /// Pipe's one obstruction + /// Offset Direction of the parallel line + /// Maximum offset distance + /// Parallel line which can avoid the obstruction + private Line? FindParallelLine(Pipe pipe, Section section, Autodesk.Revit.DB.XYZ dir, double maxLength) + { + double step = pipe.Diameter; + double hight = 2 * pipe.Diameter; + while (hight <= maxLength) + { + Autodesk.Revit.DB.XYZ detal = dir * hight; + Line line = Line.CreateBound(section.Start + detal, section.End + detal); + List refs = m_detector.Obstructions(line); + Filter(pipe, refs); + + if (refs.Count == 0) + { + return line; + } + hight += step; + } + return null; + } + + /// + /// Find out two References, whose ProximityParameter is negative or positive, + /// And Get the minimal value from all positive reference, and get the maximal value + /// from the negative reference. if there are no such reference, using null instead. + /// + /// References + /// Reference array + private ReferenceWithContext[] GetClosestSectionsToOrigin(List refs) + { + ReferenceWithContext[] mins = new ReferenceWithContext[2]; + if (refs.Count == 0) + { + return mins; + } + + if (refs[0].Proximity > 0) + { + mins[1] = refs[0]; + return mins; + } + + for (int i = 0; i < refs.Count - 1; i++) + { + if (refs[i].Proximity < 0 && refs[i + 1].Proximity > 0) + { + mins[0] = refs[i]; + mins[1] = refs[i + 1]; + return mins; + } + } + + mins[0] = refs[refs.Count - 1]; + + return mins; + } + + + /// + /// Resolve one obstruction of Pipe. + /// + /// Pipe to resolve + /// One pipe's obstruction + private void Resolve(Pipe pipe, Section section) + { + if (m_rvtDoc == null) + return; + // Find out a parallel line of pipe centerline, which can avoid the obstruction. + Line offset = FindRoute(pipe, section); + + // Construct a section line according to the given section. + Line sectionLine = Line.CreateBound(section.Start, section.End); + + // Construct two side lines, which can avoid the obstruction too. + Line side1 = Line.CreateBound(sectionLine.GetEndPoint(0), offset.GetEndPoint(0)); + Line side2 = Line.CreateBound(offset.GetEndPoint(1), sectionLine.GetEndPoint(1)); + + // + // Create an "U" shape, which connected with three pipes and two elbows, to round the obstruction. + // + PipeType pipeType = pipe.PipeType; + Autodesk.Revit.DB.XYZ start = side1.GetEndPoint(0); + Autodesk.Revit.DB.XYZ startOffset = offset.GetEndPoint(0); + Autodesk.Revit.DB.XYZ endOffset = offset.GetEndPoint(1); + Autodesk.Revit.DB.XYZ end = side2.GetEndPoint(1); + + var parameter = pipe.get_Parameter(BuiltInParameter.RBS_START_LEVEL_PARAM); + var levelId = parameter.AsElementId(); + // Create three side pipes of "U" shape. + var systemTypeId = m_pipingSystemType?.Id; + Pipe pipe1 = Pipe.Create(m_rvtDoc, systemTypeId, pipeType.Id, levelId, start, startOffset); + Pipe pipe2 = Pipe.Create(m_rvtDoc, systemTypeId, pipeType.Id, levelId, startOffset, endOffset); + Pipe pipe3 = Pipe.Create(m_rvtDoc, systemTypeId, pipeType.Id, levelId, endOffset, end); + + // Copy parameters from pipe to other three created pipes. + CopyParameters(pipe, pipe1); + CopyParameters(pipe, pipe2); + CopyParameters(pipe, pipe3); + + // Add the created three pipes to current section. + section.Pipes.Add(pipe1); + section.Pipes.Add(pipe2); + section.Pipes.Add(pipe3); + + // Create the first elbow to connect two neighbor pipes of "U" shape. + Connector? conn1 = FindConnector(pipe1, startOffset); + Connector? conn2 = FindConnector(pipe2, startOffset); + m_rvtDoc.Create.NewElbowFitting(conn1, conn2); + + // Create the second elbow to connect another two neighbor pipes of "U" shape. + Connector? conn3 = FindConnector(pipe2, endOffset); + Connector? conn4 = FindConnector(pipe3, endOffset); + m_rvtDoc.Create.NewElbowFitting(conn3, conn4); + } + + /// + /// Copy parameters from source pipe to target pipe. + /// + /// Coping source + /// Coping target + private void CopyParameters(Pipe source, Pipe target) + { + double diameter = source.get_Parameter(BuiltInParameter.RBS_PIPE_DIAMETER_PARAM).AsDouble(); + target.get_Parameter(BuiltInParameter.RBS_PIPE_DIAMETER_PARAM).Set(diameter); + } + + /// + /// Find out a connector from pipe with a specified point. + /// + /// Pipe to find the connector + /// Specified point + /// Connector whose origin is conXYZ + private Connector? FindConnector(Pipe pipe, Autodesk.Revit.DB.XYZ conXYZ) + { + ConnectorSet conns = pipe.ConnectorManager.Connectors; + foreach (Connector conn in conns) + { + if (conn.Origin.IsAlmostEqualTo(conXYZ)) + { + return conn; + } + } + return null; + } + + /// + /// Find out the connector which the pipe's specified connector connected to. + /// The pipe's specified connector is given by point conxyz. + /// + /// Pipe to find the connector + /// Specified point + /// Connector whose origin is conXYZ + private Connector? FindConnectedTo(Pipe pipe, Autodesk.Revit.DB.XYZ conXYZ) + { + Connector? connItself = FindConnector(pipe, conXYZ); + ConnectorSet? connSet = connItself?.AllRefs; + if (connSet == null) + return null; + foreach (Connector conn in connSet) + { + if (conn.Owner.Id.Value != pipe.Id.Value && + conn.ConnectorType == ConnectorType.End) + { + return conn; + } + } + return null; + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Section.cs b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Section.cs new file mode 100644 index 00000000..e180de55 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/Section.cs @@ -0,0 +1,198 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Mechanical; +using Autodesk.Revit.DB.Plumbing; + +namespace CS_AvoidObstruction +{ + /// + /// This class presents an obstruction of a Pipe. + /// + class Section + { + /// + /// Pipe centerline's direction. + /// + private XYZ m_dir; + + /// + /// Extend factor in negative direction. + /// + private double m_startFactor; + + /// + /// Extend factor in positive direction. + /// + private double m_endFactor; + + /// + /// ReferenceWithContexts contained in this obstruction. + /// + private List m_refs; + + /// + /// Pipes to avoid this obstruction, it is assigned when resolving this obstruction. + /// Its count will be three if resolved, the three pipe constructs a "U" shape to round the obstruction. + /// + private List m_pipes; + + /// + /// Private constructor, just be called in static factory method BuildSections. + /// + /// Pipe's direction + private Section(XYZ dir) + { + m_dir = dir; + m_startFactor = 0; + m_endFactor = 0; + m_refs = new List(); + m_pipes = new List(); + } + + /// + /// Pipe centerline's direction. + /// + public XYZ PipeCenterLineDirection + { + get { return m_dir; } + } + + /// + /// Pipes to avoid this obstruction, it is assigned when resolving this obstruction. + /// Its count will be three if resolved, the three pipe constructs a "U" shape to round the obstruction. + /// + public List Pipes + { + get { return m_pipes; } + } + + /// + /// Start point of this obstruction. + /// + public XYZ Start + { + get + { + return m_refs[0].GetReference().GlobalPoint.Add(m_dir.Multiply(m_startFactor)); + } + } + + /// + /// End point of this obstruction. + /// + public XYZ End + { + get + { + return m_refs[m_refs.Count - 1].GetReference().GlobalPoint.Add(m_dir.Multiply(m_endFactor)); + } + } + + /// + /// ReferenceWithContexts contained in this obstruction. + /// + public List Refs + { + get { return m_refs; } + } + + /// + /// Extend this obstruction's interval in one direction. + /// + /// index of direction, 0 => start, 1 => end + public void Inflate(int index, double value) + { + if (index == 0) + { + m_startFactor -= value; + } + else if (index == 1) + { + m_endFactor += value; + } + else + { + throw new ArgumentOutOfRangeException("Index should be 0 or 1."); + } + } + + /// + /// Build sections for ReferenceWithContexts, it's a factory method to build sections. + /// A section contains several points through which the ray passes the obstruction(s). + /// for example, a section may contain 2 points when the obstruction is stand alone, + /// or contain 4 points if 2 obstructions are intersects with each other in the direction of the ray. + /// + /// ReferenceWithContexts + /// Pipe's direction + /// List of Section + public static List
BuildSections(List allrefs, XYZ dir) + { + List buildStack = new List(); + List
sections = new List
(); + Section? current = null; + foreach (ReferenceWithContext geoRef in allrefs) + { + if (buildStack.Count == 0) + { + current = new Section(dir); + sections.Add(current); + } + + current?.Refs.Add(geoRef); + + ReferenceWithContext? tmp = Find(buildStack, geoRef); + if (tmp != null) + { + buildStack.Remove(tmp); + } + else + buildStack.Add(geoRef); + } + + return sections; + } + + /// + /// Judge whether a ReferenceWithContext is already in the list of ReferenceWithContext, return the founded value. + /// + /// List of ReferenceWithContext + /// Reference to test + /// One ReferenceWithContext has the same element's Id with entry + private static ReferenceWithContext? Find(List arr, ReferenceWithContext entry) + { + foreach (ReferenceWithContext tmp in arr) + { + if (tmp.GetReference().ElementId.Value == entry.GetReference().ElementId.Value) + { + return tmp; + } + } + return null; + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/ThisApplication.Designer.cs b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/ThisApplication.Designer.cs new file mode 100644 index 00000000..ef52fb0b --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/ThisApplication.Designer.cs @@ -0,0 +1,54 @@ +namespace MacroSamples_MEP +{ + + public sealed partial class ThisApplication : Autodesk.Revit.UI.Macros.ApplicationEntryPoint + { + + public event System.EventHandler Startup; + + public event System.EventHandler Shutdown; + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void OnStartup() + { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void FinishInitialization() + { + base.FinishInitialization(); + this.OnStartup(); + this.InternalStartup(); + if ((this.Startup != null)) + { + this.Startup(this, System.EventArgs.Empty); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void OnShutdown() + { + if ((this.Shutdown != null)) + { + this.Shutdown(this, System.EventArgs.Empty); + } + base.OnShutdown(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override string PrimaryCookie + { + get + { + return "ThisApplication"; + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/ThisApplication.cs b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/ThisApplication.cs new file mode 100644 index 00000000..d7ce9bca --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_MEP/Source/MacroSamples_MEP/ThisApplication.cs @@ -0,0 +1,48 @@ +using System; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI.Selection; +using System.Collections.Generic; +using System.Linq; +using Autodesk.Revit.DB.Mechanical; +using Autodesk.Revit.DB.Plumbing; +using CS_AvoidObstruction; + +namespace MacroSamples_MEP +{ + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.DB.Macros.AddInId("44E3EC19-A71D-402D-8FC0-054D32E35D85")] + public partial class ThisApplication + { + private void Module_Startup(object? sender, EventArgs e) + { + + } + + private void Module_Shutdown(object? sender, EventArgs e) + { + + } + + #region Revit Macros generated code + private void InternalStartup() + { + this.Startup += new System.EventHandler(Module_Startup); + this.Shutdown += new System.EventHandler(Module_Shutdown); + } + #endregion + + public void AvoidObstruction() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "AvoidObstruction")) + { + trans.Start(); + + Resolver resolver = new Resolver(this.ActiveUIDocument.Document); + resolver.Resolve(); + + trans.Commit(); + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RFA/Addin/MacroSamples_RFA.dat b/SDK/Macro Samples/MacroSamples_RFA/Addin/MacroSamples_RFA.dat new file mode 100644 index 00000000..653cf499 Binary files /dev/null and b/SDK/Macro Samples/MacroSamples_RFA/Addin/MacroSamples_RFA.dat differ diff --git a/SDK/Macro Samples/MacroSamples_RFA/Addin/MacroSamples_RFA.dll b/SDK/Macro Samples/MacroSamples_RFA/Addin/MacroSamples_RFA.dll new file mode 100644 index 00000000..64e3090b Binary files /dev/null and b/SDK/Macro Samples/MacroSamples_RFA/Addin/MacroSamples_RFA.dll differ diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/.vscode/extensions.json b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/.vscode/extensions.json new file mode 100644 index 00000000..61ae8a27 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-dotnettools.csharp", + ] +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/.vscode/launch.json b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/.vscode/launch.json new file mode 100644 index 00000000..a19a9b99 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Revit", + "type": "coreclr", + "request": "attach", + "processName": "revit.exe", + "justMyCode": true + } + ] +} diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/.vscode/tasks.json b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/.vscode/tasks.json new file mode 100644 index 00000000..ca683426 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/.vscode/tasks.json @@ -0,0 +1,14 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build" + ], + "problemMatcher": "$msCompile" + }, + ] +} diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/AutoParameter/FamilyParameterAssigner.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/AutoParameter/FamilyParameterAssigner.cs new file mode 100644 index 00000000..895f0722 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/AutoParameter/FamilyParameterAssigner.cs @@ -0,0 +1,494 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Text.RegularExpressions; +using System.Reflection; + +using Autodesk.Revit; +using Autodesk.Revit.DB; + +using MacroSamples_RFA; + +namespace Revit.SDK.Samples.AutoParameter.CS +{ + /// + /// add parameters(family parameters/shared parameters) to the opened family file + /// the parameters are recorded in txt file following certain formats + /// + class FamilyParameterAssigner + { + #region Memeber Fields + private Autodesk.Revit.ApplicationServices.Application m_app; + private ThisApplication? m_thisapp; + private FamilyManager? m_manager = null; + string addInPath = String.Empty; + // indicate whether the parameter files have been loaded. If yes, no need to load again. + bool m_paramLoaded; + + // set the paramName as key of dictionary for exclusiveness (the names of parameters should be unique) + private Dictionary m_familyParams; + private DefinitionFile? m_sharedFile; + private string m_familyFilePath = string.Empty; + private string m_sharedFilePath = string.Empty; + #endregion + + /// + /// constructor + /// + /// + /// the active revit application + /// + /// + /// the family document which will have parameters added in + /// + public FamilyParameterAssigner(ThisApplication thisApp) + { + m_thisapp = thisApp; + m_app = thisApp.Application; + m_manager = thisApp.ActiveUIDocument.Document.FamilyManager; + m_familyParams = new Dictionary(); + + addInPath = thisApp.AddinFolder; + + m_paramLoaded = false; + } + + /// + /// load the family parameter file (if exists) and shared parameter file (if exists) + /// only need to load once + /// + /// + /// if succeeded, return true; otherwise false + /// + public bool LoadParametersFromFile() + { + if (m_paramLoaded) + { + return true; + } + // load family parameter file + bool famParamFileExist; + bool succeeded = LoadFamilyParameterFromFile(out famParamFileExist); + if (!succeeded) + { + return false; + } + + // load shared parameter file + bool sharedParamFileExist; + succeeded = LoadSharedParameterFromFile(out sharedParamFileExist); + if (!(famParamFileExist || sharedParamFileExist)) + { + MessageManager.MessageBuff.AppendLine("Neither familyParameter.txt nor sharedParameter.txt exists in the assembly folder."); + return false; + } + if (!succeeded) + { + return false; + } + m_paramLoaded = true; + return true; + } + + /// + /// load family parameters from the text file + /// + /// + /// return true if succeeded; otherwise false + /// + private bool LoadFamilyParameterFromFile(out bool exist) + { + exist = true; + if (m_thisapp == null) + return false; + // step 1: find the file "FamilyParameter.txt" and open it + string fileName = Directory.GetParent(m_thisapp.ActiveUIDocument.Document.PathName) + "\\FamilyParameter.txt"; + if (!File.Exists(fileName)) + { + exist = false; + return true; + } + + FileStream? file = null; + StreamReader? reader = null; + try + { + file = new FileStream(fileName, FileMode.Open, FileAccess.Read); + reader = new StreamReader(file); + + // step 2: read each line, if the line records the family parameter data, store it + // record the content of the current line + string? line; + // record the row number of the current line + int lineNumber = 0; + while (null != (line = reader.ReadLine())) + { + ++lineNumber; + // step 2.1: verify the line + // check whether the line is blank line (contains only whitespaces) + Match match = Regex.Match(line, @"^\s*$"); + if (true == match.Success) + { + continue; + } + + // check whether the line starts from "#" or "*" (comment line) + match = Regex.Match(line, @"\s*['#''*'].*"); + if (true == match.Success) + { + continue; + } + + // step 2.2: get the parameter data + // it's a valid line (has the format of "paramName paramGroup paramType isInstance", separate by tab or by spaces) + // split the line to an array containing parameter items (format of string[] {"paramName", "paramGroup", "paramType", "isInstance"}) + string[] lineData = Regex.Split(line, @"\s+"); + // check whether the array has blank items (containing only spaces) + List values = new List(); + foreach (string data in lineData) + { + match = Regex.Match(data, @"^\s*$"); + if (true == match.Success) + { + continue; + } + + values.Add(data); + } + + // verify the parameter items (should have 4 items exactly: paramName, paramGroup, paramType and isInstance) + if (4 != values.Count) + { + MessageManager.MessageBuff.Append("Loading family parameter data from \"FamilyParam.txt\"."); + MessageManager.MessageBuff.Append("Line [\"" + line + "]\"" + "doesn't follow the valid format.\n"); + return false; + } + + // get the paramName + string paramName = values[0]; + // get the paramGroup + ForgeTypeId paramGroup = new ForgeTypeId(values[1]); + + // get the paramType + ForgeTypeId paramType = new ForgeTypeId(values[2]); + // get data "isInstance" + string isInstanceString = values[3]; + bool isInstance = Convert.ToBoolean(isInstanceString); + + // step 2.3: store the parameter fetched, check for exclusiveness (as the names of parameters should keep unique) + FamilyParam param = new FamilyParam(paramName, paramGroup, paramType, isInstance, lineNumber); + // the family parameter with the same name has already been stored to the dictionary, raise an error + if (m_familyParams.ContainsKey(paramName)) + { + FamilyParam duplicatedParam = m_familyParams[paramName]; + string warning = "Line " + param.Line + "has a duplicate parameter name with Line " + duplicatedParam.Line + "\n"; + MessageManager.MessageBuff.Append(warning); + continue; + } + m_familyParams.Add(paramName, param); + } + } + catch (System.Exception e) + { + MessageManager.MessageBuff.AppendLine(e.Message); + return false; + } + finally + { + if (null != reader) + { + reader.Close(); + } + if (null != file) + { + file.Close(); + } + } + + return true; + } + + /// + /// load family parameters from the text file + /// + /// + /// indicate whether the shared parameter file exists + /// + /// + /// return true if succeeded; otherwise false + /// + private bool LoadSharedParameterFromFile(out bool exist) + { + exist = true; + string filePath = addInPath + "\\SharedParameter.txt"; + if (!File.Exists(filePath)) + { + exist = false; + return true; + } + + m_app.SharedParametersFilename = filePath; + try + { + m_sharedFile = m_app.OpenSharedParameterFile(); + } + catch (System.Exception e) + { + MessageManager.MessageBuff.AppendLine(e.Message); + return false; + } + + return true; + } + + /// + /// add parameters to the family file + /// + /// + /// if succeeded, return true; otherwise false + /// + public bool AddParameters() + { + // add the loaded family parameters to the family + bool succeeded = AddFamilyParameter(); + if (!succeeded) + { + return false; + } + + // add the loaded shared parameters to the family + succeeded = AddSharedParameter(); + if (!succeeded) + { + return false; + } + + return true; + } + + /// + /// add family parameter to the family + /// + /// + /// if succeeded, return true; otherwise false + /// + private bool AddFamilyParameter() + { + if (m_manager == null) + return false; + bool allParamValid = true; + if (File.Exists(m_familyFilePath) && + 0 == m_familyParams.Count) + { + MessageManager.MessageBuff.AppendLine("No family parameter available for adding."); + return false; + } + + foreach (FamilyParameter param in m_manager.Parameters) + { + string name = param.Definition.Name; + if (m_familyParams.ContainsKey(name)) + { + allParamValid = false; + FamilyParam famParam = m_familyParams[name]; + MessageManager.MessageBuff.Append("Line " + famParam.Line + ": paramName \"" + famParam.Name + "\"already exists in the family document.\n"); + } + } + + // there're errors in the family parameter text file + if (!allParamValid) + { + return false; + } + + foreach (FamilyParam param in m_familyParams.Values) + { + try + { + m_manager.AddParameter(param.Name, param.Group, param.Type, param.IsInstance); + } + catch (Exception e) + { + MessageManager.MessageBuff.AppendLine(e.Message); + return false; + } + } + + return true; + } + + /// + /// load shared parameters from shared parameter file and add them to family + /// + /// + /// if succeeded, return true; otherwise false + /// + private bool AddSharedParameter() + { + if (m_sharedFile == null) + return false; + if (File.Exists(m_sharedFilePath) && + null == m_sharedFile) + { + MessageManager.MessageBuff.AppendLine("SharedParameter.txt has an invalid format."); + return false; + } + + foreach (DefinitionGroup group in m_sharedFile.Groups) + { + foreach (ExternalDefinition def in group.Definitions) + { + // check whether the parameter already exists in the document + FamilyParameter? param = m_manager?.get_Parameter(def.Name); + if (null != param) + { + continue; + } + + try + { + m_manager?.AddParameter(def, def.GetGroupTypeId(), true); + } + catch (System.Exception e) + { + MessageManager.MessageBuff.AppendLine(e.Message); + return false; + } + } + } + + return true; + } + + }// end of class "FamilyParameterAssigner" + + /// + /// record the data of a parameter: its name, its group, etc + /// + class FamilyParam + { + string m_name = string.Empty; + /// + /// the caption of the parameter + /// + public string Name + { + get { return m_name; } + } + + ForgeTypeId? m_group; + /// + /// the group of the parameter + /// + public ForgeTypeId? Group + { + get { return m_group; } + } + + ForgeTypeId? m_type; + /// + /// the type of the parameter + /// + public ForgeTypeId? Type + { + get { return m_type; } + } + + bool m_isInstance; + /// + /// indicate whether the parameter is an instance parameter or a type parameter + /// + public bool IsInstance + { + get { return m_isInstance; } + } + + int m_line; + /// + /// record the location of this parameter in the family parameter file + /// + public int Line + { + get { return m_line; } + } + + /// + /// default constructor, hide this by making it "private" + /// + private FamilyParam() + { + } + + /// + /// constructor which exposes for invoking + /// + /// + /// parameter name + /// + /// + /// indicate which group the parameter belongs to + /// + /// + /// the type of the parameter + /// + /// + /// indicate whethe the parameter is an instance parameter + /// + /// + /// record the location of this parameter in the family parameter file + /// + public FamilyParam(string name, ForgeTypeId group, ForgeTypeId type, bool isInstance, int line) + { + m_name = name; + m_group = group; + m_type = type; + m_isInstance = isInstance; + m_line = line; + } + } + + /// + /// store the warning/error messeges when executing the sample + /// + static class MessageManager + { + static StringBuilder m_messageBuff = new StringBuilder(); + /// + /// store the warning/error messages + /// + public static StringBuilder MessageBuff + { + get + { + return m_messageBuff; + } + set + { + m_messageBuff = value; + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/GenericModelCreation/GenericModelCreation.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/GenericModelCreation/GenericModelCreation.cs new file mode 100644 index 00000000..e4036b59 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/GenericModelCreation/GenericModelCreation.cs @@ -0,0 +1,430 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Collections.Generic; +using System.Text; +using System.Diagnostics; +using System.IO; +using Autodesk.Revit; +using Autodesk.Revit.DB; + +using MacroSamples_RFA; + +namespace Revit.SDK.Samples.GenericModelCreation.CS +{ + /// + /// This class show how to create Generic Model Family by Revit API. + /// + public class GenericModelCreation + { + #region Class Memeber Variables + // Application of Revit + private Autodesk.Revit.ApplicationServices.Application? m_revit; + private ThisApplication? m_thisApp; + // the document to create generic model family + private Autodesk.Revit.DB.Document? m_familyDocument; + // FamilyItemFactory used to create family + private Autodesk.Revit.Creation.FamilyItemFactory? m_creationFamily = null; + // Count error numbers + private int m_errCount = 0; + // Error information + private string m_errorInfo = ""; + #endregion + + + public GenericModelCreation(ThisApplication thisApp) + { + m_thisApp = thisApp; + m_revit = thisApp.ActiveUIDocument.Document.Application; + } + + #region Class Interface Implementation + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// A message that can be set by the external application + /// which will be displayed if a failure or cancellation is returned by + /// the external command. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// Return the status of the external command. + /// A result of Succeeded means that the API external method functioned as expected. + /// Cancelled can be used to signify that the user cancelled the external operation + /// at some point. Failure should be returned if the application is unable to proceed with + /// the operation. + public void Run() + { + try + { + if (m_thisApp == null) + return; + m_familyDocument = m_thisApp.ActiveUIDocument.Document; + if (!m_familyDocument.IsFamilyDocument) + { + System.Windows.Forms.MessageBox.Show("ActiveDocument is not family document."); + return; + } + m_creationFamily = m_familyDocument.FamilyCreate; + // create generic model family in the document + CreateGenericModel(); + if (0 == m_errCount) + { + return; + } + else + { + System.Windows.Forms.MessageBox.Show(m_errorInfo); + return; + } + } + catch (Exception) + { + throw; + } + + } + #endregion + + #region Class Implementation + + /// + /// Examples for form creation in generic model families. + /// Create extrusion, sweep, blend, swept blend + /// + public void CreateGenericModel() + { + // use transaction if the family document is not active document + CreateExtrusion(); + CreateBlend(); + CreateRevolution(); + CreateSweep(); + CreateSweptBlend(); + return; + } + + /// + /// Create one rectangular extrusion + /// + private void CreateExtrusion() + { + if (m_revit == null || m_creationFamily == null) + return; + try + { + #region Create rectangle profile + CurveArrArray curveArrArray = m_revit.Create.NewCurveArrArray(); + CurveArray curveArray1 = m_revit.Create.NewCurveArray(); + CurveArray curveArray2 = m_revit.Create.NewCurveArray(); + CurveArray curveArray3 = m_revit.Create.NewCurveArray(); + + XYZ normal = XYZ.BasisZ; + SketchPlane sketchPlane = CreateSketchPlane(normal, XYZ.Zero); + + // create one rectangular extrusion + XYZ p0 = XYZ.Zero; + XYZ p1 = m_revit.Create.NewXYZ(10, 0, 0); + XYZ p2 = m_revit.Create.NewXYZ(10, 10, 0); + XYZ p3 = m_revit.Create.NewXYZ(0, 10, 0); + Line line1 = Line.CreateBound(p0, p1); + Line line2 = Line.CreateBound(p1, p2); + Line line3 = Line.CreateBound(p2, p3); + Line line4 = Line.CreateBound(p3, p0); + curveArray1.Append(line1); + curveArray1.Append(line2); + curveArray1.Append(line3); + curveArray1.Append(line4); + + curveArrArray.Append(curveArray1); + #endregion + // here create rectangular extrusion + Extrusion rectExtrusion = m_creationFamily.NewExtrusion(true, curveArrArray, sketchPlane, 10); + // move to proper place + XYZ transPoint1 = m_revit.Create.NewXYZ(-16, 0, 0); + ElementTransformUtils.MoveElement(m_familyDocument, rectExtrusion.Id, transPoint1); + } + catch (Exception e) + { + m_errCount++; + m_errorInfo += "Unexpected exceptions occur in CreateExtrusion: " + e.ToString() + "\r\n"; + } + } + + /// + /// Create one blend + /// + private void CreateBlend() + { + try + { + #region Create top and base profiles + if (m_revit == null) + return; + CurveArray topProfile = m_revit.Create.NewCurveArray(); + CurveArray baseProfile = m_revit.Create.NewCurveArray(); + + XYZ normal = XYZ.BasisZ; + SketchPlane sketchPlane = CreateSketchPlane(normal, XYZ.Zero); + + // create one blend + XYZ p00 = XYZ.Zero; + XYZ p01 = m_revit.Create.NewXYZ(10, 0, 0); + XYZ p02 = m_revit.Create.NewXYZ(10, 10, 0); + XYZ p03 = m_revit.Create.NewXYZ(0, 10, 0); + Line line01 = Line.CreateBound(p00, p01); + Line line02 = Line.CreateBound(p01, p02); + Line line03 = Line.CreateBound(p02, p03); + Line line04 = Line.CreateBound(p03, p00); + + baseProfile.Append(line01); + baseProfile.Append(line02); + baseProfile.Append(line03); + baseProfile.Append(line04); + + XYZ p10 = m_revit.Create.NewXYZ(5, 2, 10); + XYZ p11 = m_revit.Create.NewXYZ(8, 5, 10); + XYZ p12 = m_revit.Create.NewXYZ(5, 8, 10); + XYZ p13 = m_revit.Create.NewXYZ(2, 5, 10); + Line line11 = Line.CreateBound(p10, p11); + Line line12 = Line.CreateBound(p11, p12); + Line line13 = Line.CreateBound(p12, p13); + Line line14 = Line.CreateBound(p13, p10); + + topProfile.Append(line11); + topProfile.Append(line12); + topProfile.Append(line13); + topProfile.Append(line14); + #endregion + // here create rectangular blend + if (m_creationFamily == null) + return; + Blend blend = m_creationFamily.NewBlend(true, topProfile, baseProfile, sketchPlane); + // move to proper place + XYZ transPoint1 = m_revit.Create.NewXYZ(0, 11, 0); + ElementTransformUtils.MoveElement(m_familyDocument, blend.Id, transPoint1); + } + catch (Exception e) + { + m_errCount++; + m_errorInfo += "Unexpected exceptions occur in CreateBlend: " + e.ToString() + "\r\n"; + } + } + + /// + /// Create one rectangular profile revolution + /// + private void CreateRevolution() + { + try + { + #region Create rectangular profile + if (m_revit == null) + return; + CurveArrArray curveArrArray = m_revit.Create.NewCurveArrArray(); + CurveArray curveArray = m_revit.Create.NewCurveArray(); + + XYZ normal = XYZ.BasisZ; + SketchPlane sketchPlane = CreateSketchPlane(normal, XYZ.Zero); + + // create one rectangular profile revolution + XYZ p0 = XYZ.Zero; + XYZ p1 = m_revit.Create.NewXYZ(10, 0, 0); + XYZ p2 = m_revit.Create.NewXYZ(10, 10, 0); + XYZ p3 = m_revit.Create.NewXYZ(0, 10, 0); + Line line1 = Line.CreateBound(p0, p1); + Line line2 = Line.CreateBound(p1, p2); + Line line3 = Line.CreateBound(p2, p3); + Line line4 = Line.CreateBound(p3, p0); + + XYZ pp = m_revit.Create.NewXYZ(1, -1, 0); + Line axis1 = Line.CreateBound(XYZ.Zero, pp); + curveArray.Append(line1); + curveArray.Append(line2); + curveArray.Append(line3); + curveArray.Append(line4); + + curveArrArray.Append(curveArray); + #endregion + // here create rectangular revolution + if (m_creationFamily == null) + return; + Revolution revolution1 = m_creationFamily.NewRevolution(true, curveArrArray, sketchPlane, axis1, -Math.PI, 0); + // move to proper place + XYZ transPoint1 = m_revit.Create.NewXYZ(0, 32, 0); + ElementTransformUtils.MoveElement(m_familyDocument, revolution1.Id, transPoint1); + } + catch (Exception e) + { + m_errCount++; + m_errorInfo += "Unexpected exceptions occur in CreateRevolution: " + e.ToString() + "\r\n"; + } + } + + /// + /// Create one sweep + /// + private void CreateSweep() + { + try + { + if (m_revit == null) + return; + #region Create rectangular profile and path curve + CurveArrArray arrarr = m_revit.Create.NewCurveArrArray(); + CurveArray arr = m_revit.Create.NewCurveArray(); + + XYZ normal = XYZ.BasisZ; + SketchPlane sketchPlane = CreateSketchPlane(normal, XYZ.Zero); + + XYZ pnt1 = m_revit.Create.NewXYZ(0, 0, 0); + XYZ pnt2 = m_revit.Create.NewXYZ(2, 0, 0); + XYZ pnt3 = m_revit.Create.NewXYZ(1, 1, 0); + arr.Append(Arc.Create(pnt2, 1.0d, 0.0d, 3.14d, XYZ.BasisX, XYZ.BasisY)); + arr.Append(Arc.Create(pnt1, pnt3, pnt2)); + arrarr.Append(arr); + SweepProfile profile = m_revit.Create.NewCurveLoopsProfile(arrarr); + + XYZ pnt4 = m_revit.Create.NewXYZ(10, 0, 0); + XYZ pnt5 = m_revit.Create.NewXYZ(0, 10, 0); + Curve curve = Line.CreateBound(pnt4, pnt5); + + CurveArray curves = m_revit.Create.NewCurveArray(); + curves.Append(curve); + #endregion + // here create rectangular sweep + if (m_creationFamily == null) + return; + Sweep sweep1 = m_creationFamily.NewSweep(true, curves, sketchPlane, profile, 0, ProfilePlaneLocation.Start); + // move to proper place + XYZ transPoint1 = m_revit.Create.NewXYZ(11, 0, 0); + ElementTransformUtils.MoveElement(m_familyDocument, sweep1.Id, transPoint1); + } + catch (Exception e) + { + m_errCount++; + m_errorInfo += "Unexpected exceptions occur in CreateSweep: " + e.ToString() + "\r\n"; + } + } + + /// + /// Create one SweptBlend + /// + private void CreateSweptBlend() + { + try + { + if (m_revit == null) + return; + #region Create top and bottom profiles and path curve + XYZ pnt1 = m_revit.Create.NewXYZ(0, 0, 0); + XYZ pnt2 = m_revit.Create.NewXYZ(1, 0, 0); + XYZ pnt3 = m_revit.Create.NewXYZ(1, 1, 0); + XYZ pnt4 = m_revit.Create.NewXYZ(0, 1, 0); + XYZ pnt5 = m_revit.Create.NewXYZ(0, 0, 1); + + CurveArrArray arrarr1 = m_revit.Create.NewCurveArrArray(); + CurveArray arr1 = m_revit.Create.NewCurveArray(); + arr1.Append(Line.CreateBound(pnt1, pnt2)); + arr1.Append(Line.CreateBound(pnt2, pnt3)); + arr1.Append(Line.CreateBound(pnt3, pnt4)); + arr1.Append(Line.CreateBound(pnt4, pnt1)); + arrarr1.Append(arr1); + + XYZ pnt6 = m_revit.Create.NewXYZ(0.5, 0, 0); + XYZ pnt7 = m_revit.Create.NewXYZ(1, 0.5, 0); + XYZ pnt8 = m_revit.Create.NewXYZ(0.5, 1, 0); + XYZ pnt9 = m_revit.Create.NewXYZ(0, 0.5, 0); + CurveArrArray arrarr2 = m_revit.Create.NewCurveArrArray(); + CurveArray arr2 = m_revit.Create.NewCurveArray(); + arr2.Append(Line.CreateBound(pnt6, pnt7)); + arr2.Append(Line.CreateBound(pnt7, pnt8)); + arr2.Append(Line.CreateBound(pnt8, pnt9)); + arr2.Append(Line.CreateBound(pnt9, pnt6)); + arrarr2.Append(arr2); + + SweepProfile bottomProfile = m_revit.Create.NewCurveLoopsProfile(arrarr1); + SweepProfile topProfile = m_revit.Create.NewCurveLoopsProfile(arrarr2); + + XYZ pnt10 = m_revit.Create.NewXYZ(5, 0, 0); + XYZ pnt11 = m_revit.Create.NewXYZ(0, 20, 0); + Curve curve = Line.CreateBound(pnt10, pnt11); + + XYZ normal = XYZ.BasisZ; + SketchPlane sketchPlane = CreateSketchPlane(normal, XYZ.Zero); + #endregion + // here create rectangular sweep blend + if (m_creationFamily == null) + return; + SweptBlend newSweptBlend1 = m_creationFamily.NewSweptBlend(true, curve, sketchPlane, bottomProfile, topProfile); + // move to proper place + XYZ transPoint1 = m_revit.Create.NewXYZ(11, 32, 0); + ElementTransformUtils.MoveElement(m_familyDocument, newSweptBlend1.Id, transPoint1); + } + catch (Exception e) + { + m_errCount++; + m_errorInfo += "Unexpected exceptions occur in CreateSweptBlend: " + e.ToString() + "\r\n"; + } + } + + + /// + /// Get element by its id + /// + private T? GetElement(Int64 eid) where T : Autodesk.Revit.DB.Element + { + ElementId elementId = new ElementId(eid); + return m_familyDocument?.GetElement(elementId) as T; + } + + /// + /// Create sketch plane for generic model profile + /// + /// plane normal + /// origin point + /// + internal SketchPlane CreateSketchPlane(XYZ normal, XYZ origin) + { + // First create a Geometry.Plane which need in NewSketchPlane() method + Plane geometryPlane = Plane.CreateByNormalAndOrigin(normal, origin); + if (null == geometryPlane) // assert the creation is successful + { + throw new Exception("Create the geometry plane failed."); + } + // Then create a sketch plane using the Geometry.Plane + SketchPlane plane = SketchPlane.Create(m_familyDocument, geometryPlane); + // throw exception if creation failed + if (null == plane) + { + throw new Exception("Create the sketch plane failed."); + } + return plane; + } + + #endregion + + } +} diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/MacroSamples_RFA.csproj b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/MacroSamples_RFA.csproj new file mode 100644 index 00000000..ed18e367 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/MacroSamples_RFA.csproj @@ -0,0 +1,39 @@ + + + net8.0-windows + enable + enable + true + + + x64 + false + false + False + True + Portable + ..\..\Addin\ + MacroSamples_RFA + obj\ + DEBUG;TRACE + obj\Debug + false + false + false + false + false + false + false + + + + False + + + False + + + + + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/Properties/AssemblyInfo.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..7f4a7cce --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NewModule")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NewModule")] +[assembly: AssemblyCopyright("Copyright 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ThisApplication.Designer.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ThisApplication.Designer.cs new file mode 100644 index 00000000..023bad04 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ThisApplication.Designer.cs @@ -0,0 +1,54 @@ +namespace MacroSamples_RFA +{ + + public sealed partial class ThisApplication : Autodesk.Revit.UI.Macros.ApplicationEntryPoint + { + + public event System.EventHandler Startup; + + public event System.EventHandler Shutdown; + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void OnStartup() + { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void FinishInitialization() + { + base.FinishInitialization(); + this.OnStartup(); + this.InternalStartup(); + if ((this.Startup != null)) + { + this.Startup(this, System.EventArgs.Empty); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void OnShutdown() + { + if ((this.Shutdown != null)) + { + this.Shutdown(this, System.EventArgs.Empty); + } + base.OnShutdown(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override string PrimaryCookie + { + get + { + return "ThisApplication"; + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ThisApplication.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ThisApplication.cs new file mode 100644 index 00000000..9582aa0f --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ThisApplication.cs @@ -0,0 +1,165 @@ +using System; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI.Selection; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; + +using Revit.SDK.Samples.AutoParameter.CS; +using Revit.SDK.Samples.GenericModelCreation.CS; +using Revit.SDK.Samples.TypeRegeneration.CS; +using Revit.SDK.Samples.ValidateParameters.CS; + +namespace MacroSamples_RFA +{ + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.DB.Macros.AddInId("B0302F6B-64AC-438F-93CB-61F3C632FD57")] + public partial class ThisApplication + { + private void Module_Startup(object? sender, EventArgs e) + { + + } + + private void Module_Shutdown(object? sender, EventArgs e) + { + + } + + #region Revit Macros generated code + private void InternalStartup() + { + this.Startup += new System.EventHandler(Module_Startup); + this.Shutdown += new System.EventHandler(Module_Shutdown); + } + #endregion + /// + /// AutoJoin + /// + public void AutoJoin() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "AutoJoin")) + { + trans.Start(); + CombinableElementArray solids = this.ActiveUIDocument.Document.Application.Create.NewCombinableElementArray(); + foreach (Autodesk.Revit.DB.ElementId elementId in this.ActiveUIDocument.Selection.GetElementIds()) + { + Element element = this.ActiveUIDocument.Document.GetElement(elementId); + System.Diagnostics.Trace.WriteLine(element.GetType().ToString()); + + GenericForm? gf = element as GenericForm; + if (null != gf && !gf.IsSolid) + { + continue; + } + + CombinableElement? ce = element as CombinableElement; + if (null != ce) + { + solids.Append(ce); + } + } + + if (solids.Size < 2) + { + MessageBox.Show("At least 2 combinable elements should be selected."); + return; + } + + this.ActiveUIDocument.Document.CombineElements(solids); + trans.Commit(); + } + } + + /// + /// AutoParameter + /// + public void AutoParameter() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "AutoParameter")) + { + trans.Start(); + MessageManager.MessageBuff = new StringBuilder(); + bool succeeded = AddParameters(); + if (!succeeded) + { + MessageBox.Show(MessageManager.MessageBuff.ToString()); + } + trans.Commit(); + } + } + + /// + /// add parameters to the active document + /// + /// + /// if succeeded, return true; otherwise false + /// + private bool AddParameters() + { + Document doc = this.ActiveUIDocument.Document; + if (null == doc) + { + MessageManager.MessageBuff.Append("There's no available document. \n"); + return false; + } + + if (!doc.IsFamilyDocument) + { + MessageManager.MessageBuff.Append("The active document is not a family document. \n"); + return false; + } + + FamilyParameterAssigner assigner = new FamilyParameterAssigner(this); + // the parameters to be added are defined and recorded in a text file, read them from that file and load to memory + bool succeeded = assigner.LoadParametersFromFile(); + if (!succeeded) + { + return false; + } + + succeeded = assigner.AddParameters(); + if (succeeded) + { + return true; + } + else + { + return false; + } + } + + /// + /// GenericModelCreation + /// + public void GenericModelCreation() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "GenericModelCreation")) + { + trans.Start(); + GenericModelCreation sample = new GenericModelCreation(this); + sample.Run(); + trans.Commit(); + } + } + + /// + /// TypeRegeneration + /// + public void TypeRegeneration() + { + TypeRegeneration sample = new TypeRegeneration(this); + sample.Run(); + } + + /// + /// ValidateParameters + /// + public void ValidateParameters() + { + ValidateParameters sample = new ValidateParameters(this); + sample.Run(); + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/MessageForm.Designer.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/MessageForm.Designer.cs new file mode 100644 index 00000000..c6c24ac4 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/MessageForm.Designer.cs @@ -0,0 +1,90 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +namespace Revit.SDK.Samples.TypeRegeneration.CS +{ + partial class MessageForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.messageRichTextBox = new System.Windows.Forms.RichTextBox(); + this.SuspendLayout(); + // + // messageRichTextBox + // + this.messageRichTextBox.BackColor = System.Drawing.SystemColors.Info; + this.messageRichTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.messageRichTextBox.EnableAutoDragDrop = true; + this.messageRichTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.messageRichTextBox.ForeColor = System.Drawing.SystemColors.InfoText; + this.messageRichTextBox.Location = new System.Drawing.Point(0, 0); + this.messageRichTextBox.Name = "messageRichTextBox"; + this.messageRichTextBox.Size = new System.Drawing.Size(313, 186); + this.messageRichTextBox.TabIndex = 1; + this.messageRichTextBox.Text = ""; + // + // MessageForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(313, 186); + this.Controls.Add(this.messageRichTextBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "MessageForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "MessageForm"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.RichTextBox messageRichTextBox; + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/MessageForm.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/MessageForm.cs new file mode 100644 index 00000000..65a99e29 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/MessageForm.cs @@ -0,0 +1,80 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.Threading; +using System.Runtime.InteropServices; + +namespace Revit.SDK.Samples.TypeRegeneration.CS +{ + /// + /// The form is used to show the result + /// + public partial class MessageForm : Form + { + /// + /// new a Timer,set the interval 2 seconds; + /// + System.Timers.Timer timer = new System.Timers.Timer(2000); + + /// + /// construction of MessageForm + /// + public MessageForm() + { + InitializeComponent(); + this.Text = "Type Regeneration Message Form"; + //set the timer elapsed event + timer.Elapsed += new System.Timers.ElapsedEventHandler(onTimeOut);//Set the executed event when time is out; + timer.Enabled = false; + CheckForIllegalCrossThreadCalls = false; + } + + /// + /// add text to the richtextbox and set time enable is true, then timer starts timing + /// + /// message from the regeneration + /// enable or disable the timer elapsed event + public void AddMessage(string message, bool enableTimer) + { + messageRichTextBox.AppendText(message); + timer.Enabled = enableTimer; + } + + /// + /// the method is executed when time is out, and set the timer enabled false,then timer stop timing + /// + /// + /// time elapsed event args + private void onTimeOut(object? source, System.Timers.ElapsedEventArgs e) + { + timer.Enabled = false; + this.Close(); + } + } +} diff --git a/SDK/Samples/SlabProperties/CS/SlabProperitiesForm.resx b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/MessageForm.resx similarity index 100% rename from SDK/Samples/SlabProperties/CS/SlabProperitiesForm.resx rename to SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/MessageForm.resx diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/TypeRegeneration.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/TypeRegeneration.cs new file mode 100644 index 00000000..ac82ac60 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/TypeRegeneration/TypeRegeneration.cs @@ -0,0 +1,176 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; + +using System.Windows.Forms; +using System.IO; +using System.Reflection; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using MacroSamples_RFA; + +namespace Revit.SDK.Samples.TypeRegeneration.CS +{ + /// + /// this class controls the class which subscribes handle events and the events' information UI. + /// like a bridge between them. + /// + public class TypeRegeneration + { + #region Class Memeber Variables + /// + /// store family manager + /// + private FamilyManager? m_familyManager; + private Autodesk.Revit.ApplicationServices.Application m_revit; + private ThisApplication? m_thisApp; + + /// + /// store the log file name + /// + string m_logFileName = string.Empty; + #endregion + + public TypeRegeneration(ThisApplication thisApp) + { + m_thisApp = thisApp; + m_revit = thisApp.ActiveUIDocument.Document.Application; + } + + #region Class Interface Implementation + + /// + /// Run + /// + public void Run() + { + if (m_thisApp == null) + return; + Document document = m_thisApp.ActiveUIDocument.Document; + String? docPath = String.Empty; + + if (document.PathName != null) + { + docPath = System.IO.Path.GetDirectoryName(document.PathName); + } + m_logFileName = docPath + "\\RegenerationLog.txt"; + + //only a family document can retrieve family manager + if (document.IsFamilyDocument) + { + m_familyManager = document.FamilyManager; + //create regeneration log file + StreamWriter writer = File.CreateText(m_logFileName); + writer.WriteLine("Family Type Result"); + writer.WriteLine("-------------------------"); + writer.Close(); + using (MessageForm msgForm = new MessageForm()) + { + CheckTypeRegeneration(msgForm); + return; + } + } + else + { + System.Windows.Forms.MessageBox.Show("Current document is not family document."); + return; + } + } + #endregion + + #region Class Implementation + /// + /// After setting CurrentType property, the CurrentType has changed to the new one,the Revit model will change along with the current type + /// + /// the form is used to show the regeneration result + private void CheckTypeRegeneration(MessageForm msgForm) + { + //the list to record the error messages + List errorInfo = new List(); + try + { + if (m_familyManager == null) + return; + foreach (FamilyType type in m_familyManager.Types) + { + if (!(type.Name.ToString().Trim() == "")) + { + try + { + m_familyManager.CurrentType = type; + msgForm.AddMessage(type.Name + " Successful\n", true); + WriteLog(type.Name + " Successful"); + } + catch + { + errorInfo.Add(type.Name); + msgForm.AddMessage(type.Name + " Failed \n", true); + WriteLog(type.Name + " Failed"); + } + msgForm.ShowDialog(); + } + } + + //add a conclusion regeneration result + string resMsg; + if (errorInfo.Count > 0) + { + resMsg = "\nResult: " + errorInfo.Count + " family types regeneration failed!"; + foreach (string error in errorInfo) + { + resMsg += "\n " + error; + } + } + else + { + resMsg = "\nResult: All types in the family can regenerate successfully."; + } + WriteLog(resMsg.ToString()); + resMsg += "\nIf you want to know the detail regeneration result please get log file at " + m_logFileName; + msgForm.AddMessage(resMsg, false); + msgForm.ShowDialog(); + } + catch (Exception ex) + { + WriteLog("There is some problem when regeneration:" + ex.ToString()); + msgForm.AddMessage("There is some problem when regeneration:" + ex.ToString(), true); + msgForm.ShowDialog(); + } + } + + /// + /// The method to write line to log file + /// + /// the log string + private void WriteLog(string logStr) + { + StreamWriter? writer = null; + writer = File.AppendText(m_logFileName); + writer.WriteLine(logStr); + writer.Close(); + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ValidateParameters/MessageForm.Designer.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ValidateParameters/MessageForm.Designer.cs new file mode 100644 index 00000000..09ad604b --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ValidateParameters/MessageForm.Designer.cs @@ -0,0 +1,88 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +namespace Revit.SDK.Samples.ValidateParameters.CS +{ + partial class MessageForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.messageRichTextBox = new System.Windows.Forms.RichTextBox(); + this.SuspendLayout(); + // + // messageRichTextBox + // + this.messageRichTextBox.BackColor = System.Drawing.SystemColors.Info; + this.messageRichTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.messageRichTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.messageRichTextBox.ForeColor = System.Drawing.SystemColors.InfoText; + this.messageRichTextBox.Location = new System.Drawing.Point(0, 0); + this.messageRichTextBox.Name = "messageRichTextBox"; + this.messageRichTextBox.Size = new System.Drawing.Size(415, 216); + this.messageRichTextBox.TabIndex = 0; + this.messageRichTextBox.Text = ""; + // + // MessageForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(415, 216); + this.Controls.Add(this.messageRichTextBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "MessageForm"; + this.ShowInTaskbar = false; + this.Text = "MessageForm"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.RichTextBox messageRichTextBox; + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ValidateParameters/MessageForm.cs b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ValidateParameters/MessageForm.cs new file mode 100644 index 00000000..f3353a0c --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ValidateParameters/MessageForm.cs @@ -0,0 +1,108 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Windows.Forms; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; + +using MacroSamples_RFA; + +namespace Revit.SDK.Samples.ValidateParameters.CS +{ + /// + /// The form is used to show the result + /// + public partial class MessageForm : Form + { + /// + /// store the log file name + /// + string m_logFileName = string.Empty; + + /// + /// construction of form + /// + public MessageForm(ThisApplication thisApp) + { + InitializeComponent(); + //create regeneration log file + if (thisApp.ActiveUIDocument.Document.PathName != null) + { + m_logFileName = Path.GetDirectoryName(thisApp.ActiveUIDocument.Document.PathName) + "\\ValidateParametersLog.txt"; + } + } + /// + /// construction method with parameter + /// + /// messages + public MessageForm(string[] messages, ThisApplication thisApp) + : this(thisApp) + { + string msgText = ""; + //If the size of error messages is 0, means the validate parameters is successful + this.Text = "Validate Parameters Message Form"; + + StreamWriter writer = File.CreateText(m_logFileName); + writer.Close(); + if (messages.Length == 0) + { + msgText = "All types and parameters passed the validation for API"; + WriteLog(msgText); + messageRichTextBox.Text = msgText; + } + else + { + foreach (string row in messages) + { + if (row == null) continue; + else + { + WriteLog(row); + msgText += row + "\n"; + } + } + } + msgText += "\n\nIf you want to know the validating parameters result, please get the log file at \n"+m_logFileName; + messageRichTextBox.Text = msgText; + this.StartPosition = FormStartPosition.CenterParent; + CheckForIllegalCrossThreadCalls = false; + } + + /// + /// The method is used to write line to log file + /// + /// the log string + private void WriteLog(string logStr) + { + StreamWriter? writer = null; + writer = File.AppendText(m_logFileName); + writer.WriteLine(logStr); + writer.Close(); + } + } +} diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/Properties/Resources.resx b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ValidateParameters/MessageForm.resx similarity index 95% rename from SDK/Macro Samples/Rooms/Source/Rooms/Properties/Resources.resx rename to SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ValidateParameters/MessageForm.resx index 29dcb1b3..ff31a6db 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/Properties/Resources.resx +++ b/SDK/Macro Samples/MacroSamples_RFA/Source/MacroSamples_RFA/ValidateParameters/MessageForm.resx @@ -1,4 +1,4 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/DeleteObject/DeleteObject.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/DeleteObject/DeleteObject.cs new file mode 100644 index 00000000..85bd7026 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/DeleteObject/DeleteObject.cs @@ -0,0 +1,111 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Windows.Forms; +using System.Collections; +using System.Collections.Generic; + +using Autodesk.Revit; +using Autodesk.Revit.DB; + +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.DeleteObject.CS +{ + /// + /// Delete the elements that were selected + /// + public class DeleteObject + { + ThisApplication? m_app; //ThisDocument data for Macro + + /// + /// Ctro without parameter is not allowed + /// + private DeleteObject() + { + } + + /// + /// Ctor with ThisDocument as + /// + /// ThisDocument handler + public DeleteObject(ThisApplication App) + { + m_app = App; + } + + /// + /// Run this sample + /// + public void Run() + { + if (m_app == null) + return; + ICollection collection = m_app.ActiveUIDocument.Selection.GetElementIds(); + // check user selection + if (collection.Count < 1) + { + MessageBox.Show("Please select an object to delete.", "DeleteObject"); + return; + } + + bool error = true; + try + { + error = true; + + // delete selection + IEnumerator e = collection.GetEnumerator(); + bool MoreValue = e.MoveNext(); + while (MoreValue) + { + m_app.ActiveUIDocument.Document.Delete(e.Current as ElementId); + MoreValue = e.MoveNext(); + } + + error = false; + } + catch + { + // if revit threw an exception, try to catch it + foreach (ElementId id in collection) + { + m_app.ActiveUIDocument.Selection.GetElementIds().Add(id); + } + MessageBox.Show("Element(s) can't be deleted.", "DeleteObject"); + return; + } + finally + { + // if revit threw an exception, display error and return failed + if (error) + { + MessageBox.Show("Deletion failed."); + } + } + + return; + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsData.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsData.cs new file mode 100644 index 00000000..c2ebdf20 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsData.cs @@ -0,0 +1,455 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Collections; +using System.Windows.Forms; + +using Autodesk.Revit; +using Autodesk.Revit.DB; + +using MacroCSharpSamples; + +using Application = Autodesk.Revit.ApplicationServices.Application; + +using SamplePropertis = MacroCSharpSamples.GridCreation.GridCreationProperties; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// Data class which stores information for creating orthogonal grids + /// + public class CreateOrthogonalGridsData + { + #region Fields + // X coordinate of origin + private double m_xOrigin; + // Y coordinate of origin + private double m_yOrigin; + // Spacing between horizontal grids + private double m_xSpacing; + // Spacing between vertical grids + private double m_ySpacing; + // Number of horizontal grids + private uint m_xNumber; + // Number of vertical grids + private uint m_yNumber; + // Bubble location of horizontal grids + private BubbleLocation m_xBubbleLoc; + // Bubble location of vertical grids + private BubbleLocation m_yBubbleLoc; + // Label of first horizontal grid + private String? m_xFirstLabel; + // Label of first vertical grid + private String? m_yFirstLabel; + // Array list contains all grid labels in current document + private ArrayList m_labelsList; + // Revit application + private ThisApplication? m_thisApp; + // Current display unit type + ForgeTypeId? m_unit; + #endregion + + #region Properties + /// + /// X coordinate of origin + /// + public double XOrigin + { + get + { + return m_xOrigin; + } + set + { + m_xOrigin = value; + } + } + + /// + /// Y coordinate of origin + /// + public double YOrigin + { + get + { + return m_yOrigin; + } + set + { + m_yOrigin = value; + } + } + + /// + /// Spacing between horizontal grids + /// + public double XSpacing + { + get + { + return m_xSpacing; + } + set + { + m_xSpacing = value; + } + } + + /// + /// Spacing between vertical grids + /// + public double YSpacing + { + get + { + return m_ySpacing; + } + set + { + m_ySpacing = value; + } + } + + /// + /// Number of horizontal grids + /// + public uint XNumber + { + get + { + return m_xNumber; + } + set + { + m_xNumber = value; + } + } + + /// + /// Number of vertical grids + /// + public uint YNumber + { + get + { + return m_yNumber; + } + set + { + m_yNumber = value; + } + } + + /// + /// Bubble location of horizontal grids + /// + public BubbleLocation XBubbleLoc + { + get + { + return m_xBubbleLoc; + } + set + { + m_xBubbleLoc = value; + } + } + + /// + /// Bubble location of vertical grids + /// + public BubbleLocation YBubbleLoc + { + get + { + return m_yBubbleLoc; + } + set + { + m_yBubbleLoc = value; + } + } + + /// + /// Label of first horizontal grid + /// + public String XFirstLabel + { + get + { + return m_xFirstLabel == null ? string.Empty : m_xFirstLabel; + } + set + { + m_xFirstLabel = value; + } + } + + /// + /// Label of first vertical grid + /// + public String YFirstLabel + { + get + { + return m_yFirstLabel == null ? string.Empty : m_yFirstLabel; + } + set + { + m_yFirstLabel = value; + } + } + + /// + /// Get array list contains all grid labels in current document + /// + public ArrayList LabelsList + { + get + { + return m_labelsList; + } + } + + /// + /// Current display unit type + /// + public ForgeTypeId? Unit + { + get + { + return m_unit; + } + } + #endregion + + #region Methods + /// + /// Constructor + /// + /// Application object + /// Current length display unit type + /// All existing labels in Revit's document + public CreateOrthogonalGridsData(ThisApplication? thisApp, ForgeTypeId? unit, ArrayList labels) + { + m_thisApp = thisApp; + m_labelsList = labels; + m_unit = unit; + } + + /// + /// Create grids + /// + public void CreateGrids() + { + ArrayList failureReasons = new ArrayList(); + if (CreateXGrids(ref failureReasons) + CreateYGrids(ref failureReasons) != 0) + { + String? failureReason = SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToCreateGrids"); + if (failureReasons.Count != 0) + { + failureReason += SamplePropertis.GridCreationResources.ResourceManager.GetString("Reasons") + "\r"; + failureReason += "\r"; + foreach (String reason in failureReasons) + { + failureReason += reason + "\r"; + } + } + + failureReason += "\r" + SamplePropertis.GridCreationResources.ResourceManager.GetString("AjustValues"); + + MessageBox.Show(failureReason, + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionCreateGrids"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + + /// + /// Create horizontal grids + /// + /// ArrayList contains failure reasons + /// Number of grids failed to create + private int CreateXGrids(ref ArrayList failureReasons) + { + int errorCount = 0; + + for (int i = 0; i < m_xNumber; ++i) + { + XYZ? startPoint; + XYZ? endPoint; + Line line; + Grid grid; + + try + { + if (m_yNumber != 0) + { + // Grids will have an extension distance of m_ySpacing / 2 + startPoint = m_thisApp?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin - m_ySpacing / 2, m_yOrigin + i * m_xSpacing, 0); + endPoint = m_thisApp?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + (m_yNumber - 1) * m_ySpacing + m_ySpacing / 2, m_yOrigin + i * m_xSpacing, 0); + } + else + { + startPoint = m_thisApp?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin, m_yOrigin + i * m_xSpacing, 0); + endPoint = m_thisApp?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + m_xSpacing / 2, m_yOrigin + i * m_xSpacing, 0); + } + + try + { + // Create a line according to the bubble location + if (m_xBubbleLoc == BubbleLocation.StartPoint) + { + line = Line.CreateBound(startPoint, endPoint); + } + else + { + line = Line.CreateBound(endPoint, startPoint); + } + } + catch (System.ArgumentException) + { + String? failureReason = SamplePropertis.GridCreationResources.ResourceManager.GetString("SpacingsTooSmall"); + if (!failureReasons.Contains(failureReason)) + { + failureReasons.Add(failureReason); + } + errorCount++; + continue; + } + + // Create grid with line + grid = Grid.Create(m_thisApp?.ActiveUIDocument.Document, line); + + // Set label of first horizontal grid + if (grid != null && i == 0) + { + try + { + grid.Name = m_xFirstLabel; + } + catch (System.ArgumentException) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToSetLabel") + m_xFirstLabel + "!", + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionSetLabel"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + } + catch (Exception) + { + ++errorCount; + continue; + } + } + + return errorCount; + } + + /// + /// Create vertical grids + /// + /// ArrayList contains failure reasons + /// Number of grids failed to create + private int CreateYGrids(ref ArrayList failureReasons) + { + int errorCount = 0; + + for (int j = 0; j < m_yNumber; ++j) + { + XYZ? startPoint; + XYZ? endPoint; + Line line; + Grid grid; + + try + { + if (m_xNumber != 0) + { + startPoint = m_thisApp?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + j * m_ySpacing, m_yOrigin - m_xSpacing / 2, 0); + endPoint = m_thisApp?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + j * m_ySpacing, m_yOrigin + (m_xNumber - 1) * m_xSpacing + m_xSpacing / 2, 0); + } + else + { + startPoint = m_thisApp?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + j * m_ySpacing, m_yOrigin, 0); + endPoint = m_thisApp?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + j * m_ySpacing, m_yOrigin + m_ySpacing / 2, 0); + } + + try + { + // Create a line according to the bubble location + if (m_yBubbleLoc == BubbleLocation.StartPoint) + { + line = Line.CreateBound(startPoint, endPoint); + } + else + { + line = Line.CreateBound(endPoint, startPoint); + } + } + catch (System.ArgumentException) + { + String? failureReason = SamplePropertis.GridCreationResources.ResourceManager.GetString("SpacingsTooSmall"); + if (!failureReasons.Contains(failureReason)) + { + failureReasons.Add(failureReason); + } + errorCount++; + continue; + } + + // Create grid with line + grid = Grid.Create(m_thisApp?.ActiveUIDocument.Document, line); + + // Set label of first vertical grid + if (grid != null && j == 0) + { + try + { + grid.Name = m_yFirstLabel; + } + catch (System.ArgumentException) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToSetLabel") + m_yFirstLabel + "!", + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionSetLabel"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + } + catch (Exception) + { + ++errorCount; + continue; + } + } + + return errorCount; + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsForm.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsForm.Designer.cs new file mode 100644 index 00000000..295bd19a --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsForm.Designer.cs @@ -0,0 +1,425 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +namespace Revit.SDK.Samples.GridCreation.CS +{ + partial class CreateOrthogonalGridsForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.labelYCoordUnit = new System.Windows.Forms.Label(); + this.labelXCoordUnit = new System.Windows.Forms.Label(); + this.textBoxYCoord = new System.Windows.Forms.TextBox(); + this.textBoxXCoord = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.textBoxYNumber = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.textBoxXNumber = new System.Windows.Forms.TextBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.labelUnitY = new System.Windows.Forms.Label(); + this.textBoxYSpacing = new System.Windows.Forms.TextBox(); + this.textBoxYFirstLabel = new System.Windows.Forms.TextBox(); + this.comboBoxYBubbleLocation = new System.Windows.Forms.ComboBox(); + this.label10 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.labelUnitX = new System.Windows.Forms.Label(); + this.textBoxXSpacing = new System.Windows.Forms.TextBox(); + this.textBoxXFirstLabel = new System.Windows.Forms.TextBox(); + this.comboBoxXBubbleLocation = new System.Windows.Forms.ComboBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.labelYCoordUnit); + this.groupBox1.Controls.Add(this.labelXCoordUnit); + this.groupBox1.Controls.Add(this.textBoxYCoord); + this.groupBox1.Controls.Add(this.textBoxXCoord); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Location = new System.Drawing.Point(13, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(520, 55); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Origin of the Grids"; + // + // labelYCoordUnit + // + this.labelYCoordUnit.Location = new System.Drawing.Point(484, 23); + this.labelYCoordUnit.Name = "labelYCoordUnit"; + this.labelYCoordUnit.Size = new System.Drawing.Size(23, 13); + this.labelYCoordUnit.TabIndex = 7; + // + // labelXCoordUnit + // + this.labelXCoordUnit.Location = new System.Drawing.Point(227, 23); + this.labelXCoordUnit.Name = "labelXCoordUnit"; + this.labelXCoordUnit.Size = new System.Drawing.Size(23, 13); + this.labelXCoordUnit.TabIndex = 7; + // + // textBoxYCoord + // + this.textBoxYCoord.Location = new System.Drawing.Point(385, 20); + this.textBoxYCoord.Name = "textBoxYCoord"; + this.textBoxYCoord.Size = new System.Drawing.Size(98, 20); + this.textBoxYCoord.TabIndex = 1; + this.textBoxYCoord.Tag = "0"; + this.textBoxYCoord.Text = "0"; + // + // textBoxXCoord + // + this.textBoxXCoord.Location = new System.Drawing.Point(109, 20); + this.textBoxXCoord.Name = "textBoxXCoord"; + this.textBoxXCoord.Size = new System.Drawing.Size(112, 20); + this.textBoxXCoord.TabIndex = 0; + this.textBoxXCoord.Tag = "0"; + this.textBoxXCoord.Text = "0"; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(261, 24); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(122, 13); + this.label2.TabIndex = 0; + this.label2.Text = "Y coordinate:"; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(7, 24); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(95, 13); + this.label1.TabIndex = 0; + this.label1.Text = "X coordinate:"; + // + // textBoxYNumber + // + this.textBoxYNumber.Location = new System.Drawing.Point(385, 24); + this.textBoxYNumber.Name = "textBoxYNumber"; + this.textBoxYNumber.Size = new System.Drawing.Size(120, 20); + this.textBoxYNumber.TabIndex = 1; + this.textBoxYNumber.Tag = "3"; + this.textBoxYNumber.Text = "3"; + // + // label3 + // + this.label3.Location = new System.Drawing.Point(261, 27); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(122, 13); + this.label3.TabIndex = 7; + this.label3.Text = "Number:"; + // + // textBoxXNumber + // + this.textBoxXNumber.Location = new System.Drawing.Point(385, 23); + this.textBoxXNumber.Name = "textBoxXNumber"; + this.textBoxXNumber.Size = new System.Drawing.Size(120, 20); + this.textBoxXNumber.TabIndex = 1; + this.textBoxXNumber.Tag = "3"; + this.textBoxXNumber.Text = "3"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.labelUnitY); + this.groupBox2.Controls.Add(this.textBoxYNumber); + this.groupBox2.Controls.Add(this.textBoxYSpacing); + this.groupBox2.Controls.Add(this.textBoxYFirstLabel); + this.groupBox2.Controls.Add(this.label3); + this.groupBox2.Controls.Add(this.comboBoxYBubbleLocation); + this.groupBox2.Controls.Add(this.label10); + this.groupBox2.Controls.Add(this.label5); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Location = new System.Drawing.Point(14, 165); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(519, 85); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Y direction Grids"; + // + // labelUnitY + // + this.labelUnitY.Location = new System.Drawing.Point(227, 26); + this.labelUnitY.Name = "labelUnitY"; + this.labelUnitY.Size = new System.Drawing.Size(23, 13); + this.labelUnitY.TabIndex = 7; + // + // textBoxYSpacing + // + this.textBoxYSpacing.Location = new System.Drawing.Point(110, 24); + this.textBoxYSpacing.Name = "textBoxYSpacing"; + this.textBoxYSpacing.Size = new System.Drawing.Size(112, 20); + this.textBoxYSpacing.TabIndex = 0; + this.textBoxYSpacing.Tag = "10.0"; + this.textBoxYSpacing.Text = "10.0"; + // + // textBoxYFirstLabel + // + this.textBoxYFirstLabel.Location = new System.Drawing.Point(385, 53); + this.textBoxYFirstLabel.Name = "textBoxYFirstLabel"; + this.textBoxYFirstLabel.Size = new System.Drawing.Size(120, 20); + this.textBoxYFirstLabel.TabIndex = 3; + this.textBoxYFirstLabel.Tag = "A"; + this.textBoxYFirstLabel.Text = "A"; + // + // comboBoxYBubbleLocation + // + this.comboBoxYBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxYBubbleLocation.FormattingEnabled = true; + this.comboBoxYBubbleLocation.Items.AddRange(new object[] { + "At start point of lines", + "At end point of lines"}); + this.comboBoxYBubbleLocation.Location = new System.Drawing.Point(108, 53); + this.comboBoxYBubbleLocation.Name = "comboBoxYBubbleLocation"; + this.comboBoxYBubbleLocation.Size = new System.Drawing.Size(146, 21); + this.comboBoxYBubbleLocation.TabIndex = 2; + // + // label10 + // + this.label10.Location = new System.Drawing.Point(7, 55); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(95, 13); + this.label10.TabIndex = 6; + this.label10.Text = "Bubble location:"; + // + // label5 + // + this.label5.Location = new System.Drawing.Point(6, 26); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(95, 13); + this.label5.TabIndex = 7; + this.label5.Text = "Spacing:"; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(261, 55); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(122, 13); + this.label9.TabIndex = 6; + this.label9.Text = "Label of first grid:"; + // + // label4 + // + this.label4.Location = new System.Drawing.Point(261, 26); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(122, 13); + this.label4.TabIndex = 6; + this.label4.Text = "Number:"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.labelUnitX); + this.groupBox3.Controls.Add(this.textBoxXNumber); + this.groupBox3.Controls.Add(this.textBoxXSpacing); + this.groupBox3.Controls.Add(this.textBoxXFirstLabel); + this.groupBox3.Controls.Add(this.comboBoxXBubbleLocation); + this.groupBox3.Controls.Add(this.label6); + this.groupBox3.Controls.Add(this.label7); + this.groupBox3.Controls.Add(this.label4); + this.groupBox3.Controls.Add(this.label8); + this.groupBox3.Location = new System.Drawing.Point(13, 73); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(520, 86); + this.groupBox3.TabIndex = 1; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "X direction Grids"; + // + // labelUnitX + // + this.labelUnitX.Location = new System.Drawing.Point(227, 25); + this.labelUnitX.Name = "labelUnitX"; + this.labelUnitX.Size = new System.Drawing.Size(23, 13); + this.labelUnitX.TabIndex = 7; + // + // textBoxXSpacing + // + this.textBoxXSpacing.Location = new System.Drawing.Point(109, 23); + this.textBoxXSpacing.Name = "textBoxXSpacing"; + this.textBoxXSpacing.Size = new System.Drawing.Size(112, 20); + this.textBoxXSpacing.TabIndex = 0; + this.textBoxXSpacing.Tag = "10.0"; + this.textBoxXSpacing.Text = "10.0"; + // + // textBoxXFirstLabel + // + this.textBoxXFirstLabel.Location = new System.Drawing.Point(385, 53); + this.textBoxXFirstLabel.Name = "textBoxXFirstLabel"; + this.textBoxXFirstLabel.Size = new System.Drawing.Size(120, 20); + this.textBoxXFirstLabel.TabIndex = 3; + this.textBoxXFirstLabel.Tag = ""; + this.textBoxXFirstLabel.Text = "1"; + // + // comboBoxXBubbleLocation + // + this.comboBoxXBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxXBubbleLocation.FormattingEnabled = true; + this.comboBoxXBubbleLocation.Items.AddRange(new object[] { + "At start point of lines", + "At end point of lines"}); + this.comboBoxXBubbleLocation.Location = new System.Drawing.Point(108, 53); + this.comboBoxXBubbleLocation.Name = "comboBoxXBubbleLocation"; + this.comboBoxXBubbleLocation.Size = new System.Drawing.Size(147, 21); + this.comboBoxXBubbleLocation.TabIndex = 2; + // + // label6 + // + this.label6.Location = new System.Drawing.Point(7, 25); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(95, 13); + this.label6.TabIndex = 6; + this.label6.Text = "Spacing:"; + // + // label7 + // + this.label7.Location = new System.Drawing.Point(7, 55); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(95, 13); + this.label7.TabIndex = 6; + this.label7.Text = "Bubble location:"; + // + // label8 + // + this.label8.Location = new System.Drawing.Point(261, 55); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(122, 13); + this.label8.TabIndex = 6; + this.label8.Text = "Label of first grid:"; + // + // buttonCreate + // + this.buttonCreate.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonCreate.Location = new System.Drawing.Point(327, 269); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(94, 23); + this.buttonCreate.TabIndex = 3; + this.buttonCreate.Text = "Create &Grids"; + this.buttonCreate.UseVisualStyleBackColor = true; + this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click); + // + // buttonCancel + // + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(439, 269); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(94, 23); + this.buttonCancel.TabIndex = 4; + this.buttonCancel.Text = "&Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // CreateOrthogonalGridsForm + // + this.AcceptButton = this.buttonCreate; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(545, 304); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "CreateOrthogonalGridsForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Create Orthogonal Grids"; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.TextBox textBoxYCoord; + private System.Windows.Forms.TextBox textBoxXCoord; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBoxYNumber; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBoxXNumber; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.TextBox textBoxXSpacing; + private System.Windows.Forms.TextBox textBoxYSpacing; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox textBoxXFirstLabel; + private System.Windows.Forms.ComboBox comboBoxXBubbleLocation; + private System.Windows.Forms.Button buttonCreate; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.TextBox textBoxYFirstLabel; + private System.Windows.Forms.ComboBox comboBoxYBubbleLocation; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label labelUnitY; + private System.Windows.Forms.Label labelUnitX; + private System.Windows.Forms.Label labelYCoordUnit; + private System.Windows.Forms.Label labelXCoordUnit; + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsForm.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsForm.cs new file mode 100644 index 00000000..8af0899b --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsForm.cs @@ -0,0 +1,173 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using SamplePropertis = MacroCSharpSamples.GridCreation.GridCreationProperties; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// The dialog which provides the options of creating orthogonal grids + /// + public partial class CreateOrthogonalGridsForm : Form + { + // data class object + private CreateOrthogonalGridsData m_data; + + /// + /// Constructor + /// + /// Data class object + public CreateOrthogonalGridsForm(CreateOrthogonalGridsData data) + { + m_data = data; + + InitializeComponent(); + // Set state of controls + InitializeControls(); + } + + /// + /// Set state of controls + /// + private void InitializeControls() + { + // Set length unit related labels + if (m_data.Unit != null) + { + string? tmp = m_data.Unit.ToString(); + string tmp2 = string.Empty; + if (tmp != null) + tmp2 = tmp; + String? unit = SamplePropertis.GridCreationResources.ResourceManager.GetString(tmp2); + labelUnitX.Text = unit; + labelUnitY.Text = unit; + labelXCoordUnit.Text = unit; + labelYCoordUnit.Text = unit; + + + // Set spacing values + textBoxXSpacing.Text = Unit.CovertFromAPI(m_data.Unit, 10).ToString(); + textBoxYSpacing.Text = textBoxXSpacing.Text; + + // Set bubble locations to end point + comboBoxXBubbleLocation.SelectedIndex = 1; + comboBoxYBubbleLocation.SelectedIndex = 1; + } + } + + private void buttonCreate_Click(object sender, EventArgs e) + { + // Check if input are validated + if (ValidateValues()) + { + // Transfer data back into data class + SetData(); + } + else + { + this.DialogResult = DialogResult.None; + } + } + + /// + /// Transfer data back into data class + /// + private void SetData() + { + if (m_data.Unit != null) + { + m_data.XOrigin = Unit.CovertToAPI(Convert.ToDouble(textBoxXCoord.Text), m_data.Unit); + m_data.YOrigin = Unit.CovertToAPI(Convert.ToDouble(textBoxYCoord.Text), m_data.Unit); + m_data.XNumber = Convert.ToUInt32(textBoxXNumber.Text); + m_data.YNumber = Convert.ToUInt32(textBoxYNumber.Text); + + if (Convert.ToUInt32(textBoxXNumber.Text) != 0) + { + m_data.XSpacing = Unit.CovertToAPI(Convert.ToDouble(textBoxXSpacing.Text), m_data.Unit); + m_data.XBubbleLoc = (BubbleLocation)comboBoxXBubbleLocation.SelectedIndex; + m_data.XFirstLabel = textBoxXFirstLabel.Text; + } + + if (Convert.ToUInt32(textBoxYNumber.Text) != 0) + { + m_data.YSpacing = Unit.CovertToAPI(Convert.ToDouble(textBoxYSpacing.Text), m_data.Unit); + m_data.YBubbleLoc = (BubbleLocation)comboBoxYBubbleLocation.SelectedIndex; + m_data.YFirstLabel = textBoxYFirstLabel.Text; + } + } + + } + + /// + /// Check if input are validated + /// + /// Whether input is validated + private bool ValidateValues() + { + if (!Validation.ValidateNumbers(textBoxXNumber, textBoxYNumber)) + { + return false; + } + + if (!Validation.ValidateCoord(textBoxXCoord) || !Validation.ValidateCoord(textBoxYCoord)) + { + return false; + } + + if (Convert.ToUInt32(textBoxXNumber.Text) != 0) + { + if (!Validation.ValidateLength(textBoxXSpacing, "Spacing", false) || + !Validation.ValidateLabel(textBoxXFirstLabel, m_data.LabelsList)) + { + return false; + } + } + + if (Convert.ToUInt32(textBoxYNumber.Text) != 0) + { + if (!Validation.ValidateLength(textBoxYSpacing, "Spacing", false) || + !Validation.ValidateLabel(textBoxYFirstLabel, m_data.LabelsList)) + { + return false; + } + } + + if (Convert.ToUInt32(textBoxXNumber.Text) != 0 && Convert.ToUInt32(textBoxYNumber.Text) != 0) + { + if (!Validation.ValidateLabels(textBoxXFirstLabel, textBoxYFirstLabel)) + { + return false; + } + } + + return true; + } + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsForm.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateOrthogonalGridsForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsData.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsData.cs new file mode 100644 index 00000000..a17cd6e6 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsData.cs @@ -0,0 +1,598 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Collections; +using System.Windows.Forms; + +using Autodesk.Revit; +using Autodesk.Revit.DB; + +using MacroCSharpSamples; + +using Application = Autodesk.Revit.ApplicationServices.Application; + +using SamplePropertis = MacroCSharpSamples.GridCreation.GridCreationProperties; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// The dialog which provides the options of creating radial and arc grids + /// + public class CreateRadialAndArcGridsData + { + #region Fields + // X coordinate of origin + private double m_xOrigin; + // Y coordinate of origin + private double m_yOrigin; + // Start degree of arc grids and radial grids + private double m_startDegree; + // End degree of arc grids and radial grids + private double m_endDegree; + // Spacing between arc grids + private double m_arcSpacing; + // Number of arc grids + private uint m_arcNumber = 0; + // Number of radial grids + private uint m_lineNumber = 0; + // Radius of first arc grid + private double m_arcFirstRadius; + // Distance from origin to start point + private double m_LineFirstDistance; + // Bubble location of arc grids + private BubbleLocation m_arcFirstBubbleLoc; + // Bubble location of radial grids + private BubbleLocation m_lineFirstBubbleLoc; + // Label of first arc grid + private String m_arcFirstLabel = string.Empty; + // Label of first radial grid + private String m_lineFirstLabel = string.Empty; + // Array list contains all grid labels in current document + private ArrayList m_labelsList; + // Revit application + private ThisApplication? m_app; + // Current display unit type + ForgeTypeId? m_unit; + #endregion + + #region Properties + /// + /// X coordinate of origin + /// + public double XOrigin + { + get + { + return m_xOrigin; + } + set + { + m_xOrigin = value; + } + } + + /// + /// Y coordinate of origin + /// + public double YOrigin + { + get + { + return m_yOrigin; + } + set + { + m_yOrigin = value; + } + } + + /// + /// Start degree of arc grids and radial grids + /// + public double StartDegree + { + get + { + return m_startDegree; + } + set + { + m_startDegree = value; + } + } + + /// + /// End degree of arc grids and radial grids + /// + public double EndDegree + { + get + { + return m_endDegree; + } + set + { + m_endDegree = value; + } + } + + /// + /// Spacing between arc grids + /// + public double ArcSpacing + { + get + { + return m_arcSpacing; + } + set + { + m_arcSpacing = value; + } + } + + /// + /// Number of arc grids + /// + public uint ArcNumber + { + get + { + return m_arcNumber; + } + set + { + m_arcNumber = value; + } + } + + /// + /// Number of radial grids + /// + public uint LineNumber + { + get + { + return m_lineNumber; + } + set + { + m_lineNumber = value; + } + } + + /// + /// Radius of first arc grid + /// + public double ArcFirstRadius + { + get + { + return m_arcFirstRadius; + } + set + { + m_arcFirstRadius = value; + } + } + + /// + /// Distance from origin to start point + /// + public double LineFirstDistance + { + get + { + return m_LineFirstDistance; + } + set + { + m_LineFirstDistance = value; + } + } + + /// + /// Bubble location of arc grids + /// + public BubbleLocation ArcFirstBubbleLoc + { + get + { + return m_arcFirstBubbleLoc; + } + set + { + m_arcFirstBubbleLoc = value; + } + } + + /// + /// Bubble location of radial grids + /// + public BubbleLocation LineFirstBubbleLoc + { + get + { + return m_lineFirstBubbleLoc; + } + set + { + m_lineFirstBubbleLoc = value; + } + } + + /// + /// Label of first arc grid + /// + public String ArcFirstLabel + { + get + { + return m_arcFirstLabel; + } + set + { + m_arcFirstLabel = value; + } + } + + /// + /// Label of first radial grid + /// + public String LineFirstLabel + { + get + { + return m_lineFirstLabel; + } + set + { + m_lineFirstLabel = value; + } + } + + /// + /// Get array list contains all grid labels in current document + /// + public ArrayList LabelsList + { + get + { + return m_labelsList; + } + } + + /// + /// Current display unit type + /// + public ForgeTypeId? Unit + { + get + { + return m_unit; + } + } + #endregion + + #region Methods + /// + /// Constructor + /// + /// Application object + /// Current length display unit type + /// All existing labels in Revit's document + public CreateRadialAndArcGridsData(ThisApplication? app, ForgeTypeId? unit, ArrayList labels) + { + m_app = app; + m_labelsList = labels; + m_unit = unit; + } + + /// + /// Create grids + /// + public void CreateGrids() + { + if (CreateRadialGrids() != 0) + { + String failureReason = SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToCreateRadialGrids") + "\r"; + failureReason += SamplePropertis.GridCreationResources.ResourceManager.GetString("AjustValues"); + + MessageBox.Show(failureReason, + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionCreateGrids"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + + ArrayList failureReasons = new ArrayList(); + if (CreateArcGrids(ref failureReasons) != 0) + { + String failureReason = SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToCreateArcGrids") + + SamplePropertis.GridCreationResources.ResourceManager.GetString("Reasons") + "\r"; + if (failureReasons.Count != 0) + { + failureReason += "\r"; + foreach (String reason in failureReasons) + { + failureReason += reason + "\r"; + } + } + failureReason += "\r" + SamplePropertis.GridCreationResources.ResourceManager.GetString("AjustValues"); + + MessageBox.Show(failureReason, + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionCreateGrids"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + + /// + /// Create radial grids + /// + /// Number of grids failed to create + private int CreateRadialGrids() + { + int errorCount = 0; + + for (int i = 0; i < m_lineNumber; ++i) + { + try + { + double angel; + if (m_lineNumber == 1) + { + angel = (m_startDegree + m_endDegree) / 2; + } + else + { + // The number of space between radial grids will be m_lineNumber if arc is a circle + if (m_endDegree - m_startDegree == 2 * Values.PI) + { + angel = m_startDegree + i * (m_endDegree - m_startDegree) / m_lineNumber; + } + // The number of space between radial grids will be m_lineNumber-1 if arc is not a circle + else + { + angel = m_startDegree + i * (m_endDegree - m_startDegree) / (m_lineNumber - 1); + } + } + + XYZ? startPoint; + XYZ? endPoint; + double cos = Math.Cos(angel); + double sin = Math.Sin(angel); + + if (m_arcNumber != 0) + { + // Grids will have an extension distance of m_ySpacing / 2 + startPoint = m_app?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + m_LineFirstDistance * cos, m_yOrigin + m_LineFirstDistance * sin, 0); + endPoint = m_app?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + (m_arcFirstRadius + (m_arcNumber - 1) * m_arcSpacing + m_arcSpacing / 2) * cos, + m_yOrigin + (m_arcFirstRadius + (m_arcNumber - 1) * m_arcSpacing + m_arcSpacing / 2) * sin, 0); + } + else + { + startPoint = m_app?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + m_LineFirstDistance * cos, m_yOrigin + m_LineFirstDistance * sin, 0); + endPoint = m_app?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin + (m_arcFirstRadius + 5) * cos, m_yOrigin + (m_arcFirstRadius + 5) * sin, 0); + } + + Line line; + // Create a line according to the bubble location + if (m_lineFirstBubbleLoc == BubbleLocation.StartPoint) + { + line = Line.CreateBound(startPoint, endPoint); + } + else + { + line = Line.CreateBound(endPoint, startPoint); + } + + // Create grid with line + Grid grid = Grid.Create(m_app?.ActiveUIDocument.Document, line); + + // Set label of first radial grid + if (grid != null && i == 0) + { + try + { + grid.Name = m_lineFirstLabel; + } + catch (System.ArgumentException) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToSetLabel") + m_lineFirstLabel + "!", + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionSetLabel"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + } + catch (Exception) + { + ++errorCount; + continue; + } + } + + return errorCount; + } + + /// + /// Create Arc Grids + /// + /// ArrayList contains failure reasons + /// Number of grids failed to create + private int CreateArcGrids(ref ArrayList failureReasons) + { + int errorCount = 0; + + for (int i = 0; i < m_arcNumber; ++i) + { + try + { + XYZ? origin = m_app?.ActiveUIDocument.Document.Application.Create.NewXYZ(m_xOrigin, m_yOrigin, 0); + double radius = m_arcFirstRadius + i * m_arcSpacing; + + // In Revit UI user can select a circle to create a grid, but actually two grids + // (One from 0 to 180 degree and the other from 180 degree to 360) will be created. + // In RevitAPI using NewGrid method with a circle as its argument will raise an exception. + // Therefore in this sample we will create two arcs from the upper and lower parts of the + // circle, and then create two grids on the base of the two arcs to accord with UI. + if (m_endDegree - m_startDegree == 2 * Values.PI) // Create circular grids + { + Grid? gridUpper = CreateArcGrid(origin, radius, 0, Values.PI, m_arcFirstBubbleLoc); + if (gridUpper != null && i == 0) + { + try + { + gridUpper.Name = m_arcFirstLabel; + } + catch (System.ArgumentException) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToSetLabel") + m_arcFirstLabel + "!", + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionSetLabel"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + CreateArcGrid(origin, radius, Values.PI, 2 * Values.PI, m_arcFirstBubbleLoc); + } + else // Create arc grids + { + // Each arc grid will has extension degree of 15 degree + double extensionDegree = 15 * Values.DEGTORAD; + Grid? grid; + + if (m_lineNumber != 0) + { + // If the range of arc degree is too close to a circle, the arc grids will not have + // extension degrees. + // Also the room for bubble should be considered, so a room size of 3 * extensionDegree + // is reserved here + if (m_endDegree - m_startDegree < 2 * Values.PI - 3 * extensionDegree) + { + double startDegreeWithExtension = m_startDegree - extensionDegree; + double endDegreeWithExtension = m_endDegree + extensionDegree; + grid = CreateArcGrid(origin, radius, startDegreeWithExtension, endDegreeWithExtension, m_arcFirstBubbleLoc); + } + else + { + try + { + grid = CreateArcGrid(origin, radius, m_startDegree, m_endDegree, m_arcFirstBubbleLoc); + } + catch (System.ArgumentException) + { + String? failureReason = SamplePropertis.GridCreationResources.ResourceManager.GetString("EndPointsTooClose"); + if (!failureReasons.Contains(failureReason)) + { + failureReasons.Add(failureReason); + } + errorCount++; + continue; + } + } + } + else + { + try + { + grid = CreateArcGrid(origin, radius, m_startDegree, m_endDegree, m_arcFirstBubbleLoc); + } + catch (System.ArgumentException) + { + String? failureReason = SamplePropertis.GridCreationResources.ResourceManager.GetString("EndPointsTooClose"); + if (!failureReasons.Contains(failureReason)) + { + failureReasons.Add(failureReason); + } + errorCount++; + continue; + } + } + + + if (grid != null && i == 0) + { + try + { + grid.Name = m_arcFirstLabel; + } + catch (System.ArgumentException) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToSetLabel") + m_arcFirstLabel + "!", + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionSetLabel"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + } + } + catch (Exception) + { + ++errorCount; + continue; + } + } + + return errorCount; + } + + /// + /// Create an arc grid with its origin, radius, start degree, end degree and bubble location + /// + /// Arc grid's origin + /// Arc grid's radius + /// Arc grid's start degree + /// Arc grid's end degree + /// Arc grid's Bubble location + /// The newly created grid + private Grid? CreateArcGrid(XYZ? origin, double radius, double startDegree, double endDegree, BubbleLocation bubLoc) + { + // Get start point and end point of the arc and the middle point on the arc + if (origin == null) + return null; + XYZ? startPoint = m_app?.ActiveUIDocument.Document.Application.Create.NewXYZ(origin.X + radius * Math.Cos(startDegree), + origin.Y + radius * Math.Sin(startDegree), origin.Z); + XYZ? midPoint = m_app?.ActiveUIDocument.Document.Application.Create.NewXYZ(origin.X + radius * Math.Cos((startDegree + endDegree) / 2), + origin.Y + radius * Math.Sin((startDegree + endDegree) / 2), origin.Z); + XYZ? endPoint = m_app?.ActiveUIDocument.Document.Application.Create.NewXYZ(origin.X + radius * Math.Cos(endDegree), + origin.Y + radius * Math.Sin(endDegree), origin.Z); + + Arc arc; + + if (bubLoc == BubbleLocation.StartPoint) + { + arc = Arc.Create(startPoint, endPoint, midPoint); + } + else + { + arc = Arc.Create(endPoint, startPoint, midPoint); + } + + return Grid.Create(m_app?.ActiveUIDocument.Document, arc); + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsForm.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsForm.Designer.cs new file mode 100644 index 00000000..c58dbadf --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsForm.Designer.cs @@ -0,0 +1,546 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// The dialog which provides the options of creating radial and arc grids + /// + partial class CreateRadialAndArcGridsForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.textBoxArcSpacing = new System.Windows.Forms.TextBox(); + this.labelspace = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.labelUnitFirstRadius = new System.Windows.Forms.Label(); + this.labelUnitX = new System.Windows.Forms.Label(); + this.textBoxArcFirstRadius = new System.Windows.Forms.TextBox(); + this.comboBoxArcBubbleLocation = new System.Windows.Forms.ComboBox(); + this.labelradius = new System.Windows.Forms.Label(); + this.textBoxArcFirstLabel = new System.Windows.Forms.TextBox(); + this.textBoxArcNumber = new System.Windows.Forms.TextBox(); + this.labelfirstgrid = new System.Windows.Forms.Label(); + this.labelbubble = new System.Windows.Forms.Label(); + this.labelnumber = new System.Windows.Forms.Label(); + this.labelr_number = new System.Windows.Forms.Label(); + this.textBoxYCoord = new System.Windows.Forms.TextBox(); + this.textBoxXCoord = new System.Windows.Forms.TextBox(); + this.labely = new System.Windows.Forms.Label(); + this.labelx = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.labelUnitY = new System.Windows.Forms.Label(); + this.textBoxLineFirstDistance = new System.Windows.Forms.TextBox(); + this.comboBoxLineBubbleLocation = new System.Windows.Forms.ComboBox(); + this.label1r_distance = new System.Windows.Forms.Label(); + this.textBoxLineNumber = new System.Windows.Forms.TextBox(); + this.textBoxLineFirstLabel = new System.Windows.Forms.TextBox(); + this.label1r_firstgrid = new System.Windows.Forms.Label(); + this.labelr_bubble = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.labelYCoordUnit = new System.Windows.Forms.Label(); + this.labelXCoordUnit = new System.Windows.Forms.Label(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.textBoxEndDegree = new System.Windows.Forms.TextBox(); + this.textBoxStartDegree = new System.Windows.Forms.TextBox(); + this.labelEndDegree = new System.Windows.Forms.Label(); + this.labelStartDegree = new System.Windows.Forms.Label(); + this.radioButtonCustomize = new System.Windows.Forms.RadioButton(); + this.radioButton360 = new System.Windows.Forms.RadioButton(); + this.groupBox3.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.SuspendLayout(); + // + // textBoxArcSpacing + // + this.textBoxArcSpacing.Location = new System.Drawing.Point(132, 17); + this.textBoxArcSpacing.Name = "textBoxArcSpacing"; + this.textBoxArcSpacing.Size = new System.Drawing.Size(108, 20); + this.textBoxArcSpacing.TabIndex = 0; + this.textBoxArcSpacing.Tag = "10.0"; + this.textBoxArcSpacing.Text = "10.0"; + // + // labelspace + // + this.labelspace.Location = new System.Drawing.Point(13, 20); + this.labelspace.Name = "labelspace"; + this.labelspace.Size = new System.Drawing.Size(113, 18); + this.labelspace.TabIndex = 6; + this.labelspace.Text = "Spacing:"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.labelUnitFirstRadius); + this.groupBox3.Controls.Add(this.labelUnitX); + this.groupBox3.Controls.Add(this.textBoxArcFirstRadius); + this.groupBox3.Controls.Add(this.comboBoxArcBubbleLocation); + this.groupBox3.Controls.Add(this.labelradius); + this.groupBox3.Controls.Add(this.textBoxArcFirstLabel); + this.groupBox3.Controls.Add(this.textBoxArcNumber); + this.groupBox3.Controls.Add(this.labelfirstgrid); + this.groupBox3.Controls.Add(this.textBoxArcSpacing); + this.groupBox3.Controls.Add(this.labelbubble); + this.groupBox3.Controls.Add(this.labelnumber); + this.groupBox3.Controls.Add(this.labelspace); + this.groupBox3.Location = new System.Drawing.Point(12, 175); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(544, 116); + this.groupBox3.TabIndex = 2; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Arc Grids"; + // + // labelUnitFirstRadius + // + this.labelUnitFirstRadius.Location = new System.Drawing.Point(240, 52); + this.labelUnitFirstRadius.Name = "labelUnitFirstRadius"; + this.labelUnitFirstRadius.Size = new System.Drawing.Size(23, 23); + this.labelUnitFirstRadius.TabIndex = 31; + // + // labelUnitX + // + this.labelUnitX.Location = new System.Drawing.Point(240, 20); + this.labelUnitX.Name = "labelUnitX"; + this.labelUnitX.Size = new System.Drawing.Size(23, 23); + this.labelUnitX.TabIndex = 13; + // + // textBoxArcFirstRadius + // + this.textBoxArcFirstRadius.Location = new System.Drawing.Point(132, 50); + this.textBoxArcFirstRadius.Name = "textBoxArcFirstRadius"; + this.textBoxArcFirstRadius.Size = new System.Drawing.Size(108, 20); + this.textBoxArcFirstRadius.TabIndex = 2; + this.textBoxArcFirstRadius.Text = "10.0"; + // + // comboBoxArcBubbleLocation + // + this.comboBoxArcBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxArcBubbleLocation.FormattingEnabled = true; + this.comboBoxArcBubbleLocation.Items.AddRange(new object[] { + "At start point of arcs", + "At end point of arcs"}); + this.comboBoxArcBubbleLocation.Location = new System.Drawing.Point(133, 83); + this.comboBoxArcBubbleLocation.Name = "comboBoxArcBubbleLocation"; + this.comboBoxArcBubbleLocation.Size = new System.Drawing.Size(373, 21); + this.comboBoxArcBubbleLocation.TabIndex = 4; + // + // labelradius + // + this.labelradius.Location = new System.Drawing.Point(13, 52); + this.labelradius.Name = "labelradius"; + this.labelradius.Size = new System.Drawing.Size(113, 18); + this.labelradius.TabIndex = 7; + this.labelradius.Text = "Radius of first grid:"; + // + // textBoxArcFirstLabel + // + this.textBoxArcFirstLabel.Location = new System.Drawing.Point(398, 50); + this.textBoxArcFirstLabel.Name = "textBoxArcFirstLabel"; + this.textBoxArcFirstLabel.Size = new System.Drawing.Size(108, 20); + this.textBoxArcFirstLabel.TabIndex = 3; + this.textBoxArcFirstLabel.Tag = ""; + this.textBoxArcFirstLabel.Text = "1"; + // + // textBoxArcNumber + // + this.textBoxArcNumber.Location = new System.Drawing.Point(398, 17); + this.textBoxArcNumber.Name = "textBoxArcNumber"; + this.textBoxArcNumber.Size = new System.Drawing.Size(108, 20); + this.textBoxArcNumber.TabIndex = 1; + this.textBoxArcNumber.Text = "3"; + // + // labelfirstgrid + // + this.labelfirstgrid.Location = new System.Drawing.Point(279, 52); + this.labelfirstgrid.Name = "labelfirstgrid"; + this.labelfirstgrid.Size = new System.Drawing.Size(113, 18); + this.labelfirstgrid.TabIndex = 30; + this.labelfirstgrid.Text = "Label of first grid:"; + // + // labelbubble + // + this.labelbubble.Location = new System.Drawing.Point(13, 85); + this.labelbubble.Name = "labelbubble"; + this.labelbubble.Size = new System.Drawing.Size(113, 18); + this.labelbubble.TabIndex = 29; + this.labelbubble.Text = "Bubble location:"; + // + // labelnumber + // + this.labelnumber.Location = new System.Drawing.Point(279, 20); + this.labelnumber.Name = "labelnumber"; + this.labelnumber.Size = new System.Drawing.Size(113, 18); + this.labelnumber.TabIndex = 6; + this.labelnumber.Text = "Number:"; + // + // labelr_number + // + this.labelr_number.Location = new System.Drawing.Point(279, 23); + this.labelr_number.Name = "labelr_number"; + this.labelr_number.Size = new System.Drawing.Size(113, 18); + this.labelr_number.TabIndex = 6; + this.labelr_number.Text = "Number:"; + // + // textBoxYCoord + // + this.textBoxYCoord.Location = new System.Drawing.Point(398, 22); + this.textBoxYCoord.Name = "textBoxYCoord"; + this.textBoxYCoord.Size = new System.Drawing.Size(108, 20); + this.textBoxYCoord.TabIndex = 1; + this.textBoxYCoord.Text = "0"; + // + // textBoxXCoord + // + this.textBoxXCoord.Location = new System.Drawing.Point(132, 21); + this.textBoxXCoord.Name = "textBoxXCoord"; + this.textBoxXCoord.Size = new System.Drawing.Size(108, 20); + this.textBoxXCoord.TabIndex = 0; + this.textBoxXCoord.Text = "0"; + // + // labely + // + this.labely.Location = new System.Drawing.Point(279, 25); + this.labely.Name = "labely"; + this.labely.Size = new System.Drawing.Size(113, 18); + this.labely.TabIndex = 0; + this.labely.Text = "Y coordinate:"; + // + // labelx + // + this.labelx.Location = new System.Drawing.Point(13, 25); + this.labelx.Name = "labelx"; + this.labelx.Size = new System.Drawing.Size(112, 18); + this.labelx.TabIndex = 0; + this.labelx.Text = "X coordinate:"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.labelUnitY); + this.groupBox2.Controls.Add(this.textBoxLineFirstDistance); + this.groupBox2.Controls.Add(this.comboBoxLineBubbleLocation); + this.groupBox2.Controls.Add(this.label1r_distance); + this.groupBox2.Controls.Add(this.textBoxLineNumber); + this.groupBox2.Controls.Add(this.textBoxLineFirstLabel); + this.groupBox2.Controls.Add(this.label1r_firstgrid); + this.groupBox2.Controls.Add(this.labelr_number); + this.groupBox2.Controls.Add(this.labelr_bubble); + this.groupBox2.Location = new System.Drawing.Point(13, 297); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(543, 119); + this.groupBox2.TabIndex = 3; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Radial Grids"; + // + // labelUnitY + // + this.labelUnitY.Location = new System.Drawing.Point(508, 88); + this.labelUnitY.Name = "labelUnitY"; + this.labelUnitY.Size = new System.Drawing.Size(23, 23); + this.labelUnitY.TabIndex = 13; + // + // textBoxLineFirstDistance + // + this.textBoxLineFirstDistance.Location = new System.Drawing.Point(236, 86); + this.textBoxLineFirstDistance.Name = "textBoxLineFirstDistance"; + this.textBoxLineFirstDistance.Size = new System.Drawing.Size(270, 20); + this.textBoxLineFirstDistance.TabIndex = 3; + this.textBoxLineFirstDistance.Text = "8.0"; + // + // comboBoxLineBubbleLocation + // + this.comboBoxLineBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxLineBubbleLocation.FormattingEnabled = true; + this.comboBoxLineBubbleLocation.Items.AddRange(new object[] { + "At start point of lines", + "At end point of lines"}); + this.comboBoxLineBubbleLocation.Location = new System.Drawing.Point(131, 54); + this.comboBoxLineBubbleLocation.Name = "comboBoxLineBubbleLocation"; + this.comboBoxLineBubbleLocation.Size = new System.Drawing.Size(374, 21); + this.comboBoxLineBubbleLocation.TabIndex = 2; + // + // label1r_distance + // + this.label1r_distance.Location = new System.Drawing.Point(6, 88); + this.label1r_distance.Name = "label1r_distance"; + this.label1r_distance.Size = new System.Drawing.Size(224, 18); + this.label1r_distance.TabIndex = 7; + this.label1r_distance.Text = "Distance from origin to start point:"; + // + // textBoxLineNumber + // + this.textBoxLineNumber.Location = new System.Drawing.Point(398, 23); + this.textBoxLineNumber.Name = "textBoxLineNumber"; + this.textBoxLineNumber.Size = new System.Drawing.Size(108, 20); + this.textBoxLineNumber.TabIndex = 1; + this.textBoxLineNumber.Tag = "3"; + this.textBoxLineNumber.Text = "3"; + // + // textBoxLineFirstLabel + // + this.textBoxLineFirstLabel.Location = new System.Drawing.Point(131, 20); + this.textBoxLineFirstLabel.Name = "textBoxLineFirstLabel"; + this.textBoxLineFirstLabel.Size = new System.Drawing.Size(108, 20); + this.textBoxLineFirstLabel.TabIndex = 0; + this.textBoxLineFirstLabel.Tag = "A"; + this.textBoxLineFirstLabel.Text = "A"; + // + // label1r_firstgrid + // + this.label1r_firstgrid.Location = new System.Drawing.Point(6, 23); + this.label1r_firstgrid.Name = "label1r_firstgrid"; + this.label1r_firstgrid.Size = new System.Drawing.Size(119, 18); + this.label1r_firstgrid.TabIndex = 30; + this.label1r_firstgrid.Text = "Label of first grid:"; + // + // labelr_bubble + // + this.labelr_bubble.Location = new System.Drawing.Point(6, 57); + this.labelr_bubble.Name = "labelr_bubble"; + this.labelr_bubble.Size = new System.Drawing.Size(119, 18); + this.labelr_bubble.TabIndex = 29; + this.labelr_bubble.Text = "Bubble location:"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.textBoxYCoord); + this.groupBox1.Controls.Add(this.labelYCoordUnit); + this.groupBox1.Controls.Add(this.labelXCoordUnit); + this.groupBox1.Controls.Add(this.textBoxXCoord); + this.groupBox1.Controls.Add(this.labely); + this.groupBox1.Controls.Add(this.labelx); + this.groupBox1.Location = new System.Drawing.Point(13, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(543, 55); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Center of Arc Grids"; + // + // labelYCoordUnit + // + this.labelYCoordUnit.Location = new System.Drawing.Point(508, 22); + this.labelYCoordUnit.Name = "labelYCoordUnit"; + this.labelYCoordUnit.Size = new System.Drawing.Size(23, 23); + this.labelYCoordUnit.TabIndex = 13; + // + // labelXCoordUnit + // + this.labelXCoordUnit.Location = new System.Drawing.Point(240, 24); + this.labelXCoordUnit.Name = "labelXCoordUnit"; + this.labelXCoordUnit.Size = new System.Drawing.Size(23, 23); + this.labelXCoordUnit.TabIndex = 13; + // + // buttonCancel + // + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(463, 436); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(94, 23); + this.buttonCancel.TabIndex = 5; + this.buttonCancel.Text = "&Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // buttonCreate + // + this.buttonCreate.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonCreate.Location = new System.Drawing.Point(356, 436); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(94, 23); + this.buttonCreate.TabIndex = 4; + this.buttonCreate.Text = "Create &Grids"; + this.buttonCreate.UseVisualStyleBackColor = true; + this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click); + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.textBoxEndDegree); + this.groupBox4.Controls.Add(this.textBoxStartDegree); + this.groupBox4.Controls.Add(this.labelEndDegree); + this.groupBox4.Controls.Add(this.labelStartDegree); + this.groupBox4.Controls.Add(this.radioButtonCustomize); + this.groupBox4.Controls.Add(this.radioButton360); + this.groupBox4.Location = new System.Drawing.Point(13, 74); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(543, 95); + this.groupBox4.TabIndex = 1; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Span of Grids"; + // + // textBoxEndDegree + // + this.textBoxEndDegree.Location = new System.Drawing.Point(397, 62); + this.textBoxEndDegree.Name = "textBoxEndDegree"; + this.textBoxEndDegree.Size = new System.Drawing.Size(108, 20); + this.textBoxEndDegree.TabIndex = 3; + this.textBoxEndDegree.Text = "360"; + // + // textBoxStartDegree + // + this.textBoxStartDegree.Location = new System.Drawing.Point(131, 62); + this.textBoxStartDegree.Name = "textBoxStartDegree"; + this.textBoxStartDegree.Size = new System.Drawing.Size(108, 20); + this.textBoxStartDegree.TabIndex = 2; + this.textBoxStartDegree.Text = "0"; + // + // labelEndDegree + // + this.labelEndDegree.Location = new System.Drawing.Point(279, 64); + this.labelEndDegree.Name = "labelEndDegree"; + this.labelEndDegree.Size = new System.Drawing.Size(113, 18); + this.labelEndDegree.TabIndex = 2; + this.labelEndDegree.Text = "End degree:"; + // + // labelStartDegree + // + this.labelStartDegree.Location = new System.Drawing.Point(24, 64); + this.labelStartDegree.Name = "labelStartDegree"; + this.labelStartDegree.Size = new System.Drawing.Size(101, 18); + this.labelStartDegree.TabIndex = 2; + this.labelStartDegree.Text = "Start degree:"; + // + // radioButtonCustomize + // + this.radioButtonCustomize.Location = new System.Drawing.Point(9, 41); + this.radioButtonCustomize.Name = "radioButtonCustomize"; + this.radioButtonCustomize.Size = new System.Drawing.Size(104, 24); + this.radioButtonCustomize.TabIndex = 1; + this.radioButtonCustomize.Text = "Customize"; + this.radioButtonCustomize.UseVisualStyleBackColor = true; + this.radioButtonCustomize.CheckedChanged += new System.EventHandler(this.radioButtonCustomize_CheckedChanged); + // + // radioButton360 + // + this.radioButton360.AutoSize = true; + this.radioButton360.Checked = true; + this.radioButton360.Location = new System.Drawing.Point(9, 20); + this.radioButton360.Name = "radioButton360"; + this.radioButton360.Size = new System.Drawing.Size(79, 17); + this.radioButton360.TabIndex = 0; + this.radioButton360.TabStop = true; + this.radioButton360.Text = "360 degree"; + this.radioButton360.UseVisualStyleBackColor = true; + this.radioButton360.MouseClick += new System.Windows.Forms.MouseEventHandler(this.radioButton360_MouseClick); + // + // CreateRadialAndArcGridsForm + // + this.AcceptButton = this.buttonCreate; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(568, 466); + this.Controls.Add(this.groupBox4); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "CreateRadialAndArcGridsForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Create Radial and Arc Grids"; + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TextBox textBoxArcSpacing; + private System.Windows.Forms.Label labelspace; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label labelr_number; + private System.Windows.Forms.TextBox textBoxYCoord; + private System.Windows.Forms.TextBox textBoxXCoord; + private System.Windows.Forms.Label labely; + private System.Windows.Forms.Label labelx; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox textBoxLineNumber; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.TextBox textBoxArcNumber; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonCreate; + private System.Windows.Forms.Label labelnumber; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.TextBox textBoxEndDegree; + private System.Windows.Forms.TextBox textBoxStartDegree; + private System.Windows.Forms.Label labelEndDegree; + private System.Windows.Forms.Label labelStartDegree; + private System.Windows.Forms.RadioButton radioButtonCustomize; + private System.Windows.Forms.RadioButton radioButton360; + private System.Windows.Forms.TextBox textBoxArcFirstRadius; + private System.Windows.Forms.Label labelradius; + private System.Windows.Forms.TextBox textBoxLineFirstDistance; + private System.Windows.Forms.Label label1r_distance; + private System.Windows.Forms.ComboBox comboBoxArcBubbleLocation; + private System.Windows.Forms.TextBox textBoxArcFirstLabel; + private System.Windows.Forms.Label labelfirstgrid; + private System.Windows.Forms.Label labelbubble; + private System.Windows.Forms.ComboBox comboBoxLineBubbleLocation; + private System.Windows.Forms.TextBox textBoxLineFirstLabel; + private System.Windows.Forms.Label label1r_firstgrid; + private System.Windows.Forms.Label labelr_bubble; + private System.Windows.Forms.Label labelUnitX; + private System.Windows.Forms.Label labelUnitY; + private System.Windows.Forms.Label labelUnitFirstRadius; + private System.Windows.Forms.Label labelYCoordUnit; + private System.Windows.Forms.Label labelXCoordUnit; + + + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsForm.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsForm.cs new file mode 100644 index 00000000..dec7381c --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsForm.cs @@ -0,0 +1,213 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using SamplePropertis = MacroCSharpSamples.GridCreation.GridCreationProperties; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + public partial class CreateRadialAndArcGridsForm : Form + { + // data class object + private CreateRadialAndArcGridsData m_data; + + /// + /// Constructor + /// + /// Data class object + public CreateRadialAndArcGridsForm(CreateRadialAndArcGridsData data) + { + m_data = data; + + InitializeComponent(); + // Set state of controls + InitializeControls(); + } + + /// + /// Set state of controls + /// + private void InitializeControls() + { + // Set length unit related labels + if (m_data.Unit != null) + { + string? tmp = m_data.Unit.ToString(); + string tmp2 = string.Empty; + if (tmp != null) + tmp2 = tmp; + String? unit = SamplePropertis.GridCreationResources.ResourceManager.GetString(tmp2); + labelUnitX.Text = unit; + labelUnitY.Text = unit; + labelUnitFirstRadius.Text = unit; + labelXCoordUnit.Text = unit; + labelYCoordUnit.Text = unit; + + + // Set length values + textBoxArcSpacing.Text = Unit.CovertFromAPI(m_data.Unit, 10).ToString(); + textBoxArcFirstRadius.Text = textBoxArcSpacing.Text; + textBoxLineFirstDistance.Text = Unit.CovertFromAPI(m_data.Unit, 8).ToString(); + + radioButton360.Checked = true; + radioButtonCustomize.Checked = false; + labelStartDegree.Enabled = false; + textBoxStartDegree.Enabled = false; + labelEndDegree.Enabled = false; + textBoxEndDegree.Enabled = false; + comboBoxArcBubbleLocation.SelectedIndex = 1; + comboBoxLineBubbleLocation.SelectedIndex = 1; + } + } + + private void radioButtonCustomize_CheckedChanged(object sender, EventArgs e) + { + bool IsCustomize = radioButtonCustomize.Checked; + labelStartDegree.Enabled = IsCustomize; + textBoxStartDegree.Enabled = IsCustomize; + labelEndDegree.Enabled = IsCustomize; + textBoxEndDegree.Enabled = IsCustomize; + } + + private void radioButton360_MouseClick(object sender, MouseEventArgs e) + { + radioButtonCustomize.Checked = !radioButton360.Checked; + } + + private void buttonCreate_Click(object sender, EventArgs e) + { + // Check if input are validated + if (ValidateValues()) + { + // Transfer data back into data class + SetData(); + } + else + { + this.DialogResult = DialogResult.None; + } + } + + /// + /// Transfer data back into data class + /// + private void SetData() + { + if (m_data.Unit != null) + { + m_data.XOrigin = Unit.CovertToAPI(Convert.ToDouble(textBoxXCoord.Text), m_data.Unit); + m_data.YOrigin = Unit.CovertToAPI(Convert.ToDouble(textBoxYCoord.Text), m_data.Unit); + + if (radioButton360.Checked) + { + m_data.StartDegree = 0; + m_data.EndDegree = 2 * Values.PI; + } + else + { + m_data.StartDegree = Convert.ToDouble(textBoxStartDegree.Text) * Values.DEGTORAD; + m_data.EndDegree = Convert.ToDouble(textBoxEndDegree.Text) * Values.DEGTORAD; + } + + m_data.ArcNumber = Convert.ToUInt32(textBoxArcNumber.Text); + m_data.LineNumber = Convert.ToUInt32(textBoxLineNumber.Text); + + + if (Convert.ToUInt32(textBoxArcNumber.Text) != 0) + { + m_data.ArcSpacing = Unit.CovertToAPI(Convert.ToDouble(textBoxArcSpacing.Text), m_data.Unit); + m_data.ArcFirstRadius = Unit.CovertToAPI(Convert.ToDouble(textBoxArcFirstRadius.Text), m_data.Unit); + m_data.ArcFirstBubbleLoc = (BubbleLocation)comboBoxArcBubbleLocation.SelectedIndex; + m_data.ArcFirstLabel = textBoxArcFirstLabel.Text; + } + + if (Convert.ToUInt32(textBoxLineNumber.Text) != 0) + { + m_data.LineFirstDistance = Unit.CovertToAPI(Convert.ToDouble(textBoxLineFirstDistance.Text), m_data.Unit); + m_data.LineFirstBubbleLoc = (BubbleLocation)comboBoxLineBubbleLocation.SelectedIndex; + m_data.LineFirstLabel = textBoxLineFirstLabel.Text; + } + } + } + + /// + /// Check if input are validated + /// + /// Whether input is validated + private bool ValidateValues() + { + if (!Validation.ValidateNumbers(textBoxArcNumber, textBoxLineNumber)) + { + return false; + } + + if (!Validation.ValidateCoord(textBoxXCoord) || !Validation.ValidateCoord(textBoxYCoord)) + { + return false; + } + + if (Convert.ToUInt32(textBoxArcNumber.Text) != 0) + { + if (!Validation.ValidateLength(textBoxArcSpacing, "Spacing", false) || + !Validation.ValidateLength(textBoxArcFirstRadius, "Radius", false) || + !Validation.ValidateLabel(textBoxArcFirstLabel, m_data.LabelsList)) + { + return false; + } + } + + if (Convert.ToUInt32(textBoxLineNumber.Text) != 0) + { + if (!Validation.ValidateLength(textBoxLineFirstDistance, "Distance", true) || + !Validation.ValidateLabel(textBoxLineFirstLabel, m_data.LabelsList)) + { + return false; + } + } + + if (Convert.ToUInt32(textBoxArcNumber.Text) != 0 && Convert.ToUInt32(textBoxLineNumber.Text) != 0) + { + if (!Validation.ValidateLabels(textBoxArcFirstLabel, textBoxLineFirstLabel)) + { + return false; + } + } + + if (radioButtonCustomize.Checked) + { + if (!Validation.ValidateDegrees(textBoxStartDegree, textBoxEndDegree)) + { + return false; + } + } + + return true; + } + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsForm.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateRadialAndArcGridsForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSelectedCurvesForm.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSelectedCurvesForm.Designer.cs new file mode 100644 index 00000000..904e9240 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSelectedCurvesForm.Designer.cs @@ -0,0 +1,183 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +namespace Revit.SDK.Samples.GridCreation.CS +{ + partial class CreateWithSelectedCurvesForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.textBoxFirstLabel = new System.Windows.Forms.TextBox(); + this.comboBoxBubbleLocation = new System.Windows.Forms.ComboBox(); + this.labelBubbleLocation = new System.Windows.Forms.Label(); + this.labelFirstLabel = new System.Windows.Forms.Label(); + this.groupBoxGridSettings = new System.Windows.Forms.GroupBox(); + this.checkBoxDeleteElements = new System.Windows.Forms.CheckBox(); + this.groupBoxGridSettings.SuspendLayout(); + this.SuspendLayout(); + // + // buttonCancel + // + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(232, 144); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(90, 23); + this.buttonCancel.TabIndex = 1; + this.buttonCancel.Text = "&Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // buttonOK + // + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonOK.Location = new System.Drawing.Point(126, 144); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(90, 23); + this.buttonOK.TabIndex = 0; + this.buttonOK.Text = "Create &Grids"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // textBoxFirstLabel + // + this.textBoxFirstLabel.Location = new System.Drawing.Point(124, 53); + this.textBoxFirstLabel.Name = "textBoxFirstLabel"; + this.textBoxFirstLabel.Size = new System.Drawing.Size(171, 20); + this.textBoxFirstLabel.TabIndex = 1; + this.textBoxFirstLabel.Tag = ""; + this.textBoxFirstLabel.Text = "1"; + // + // comboBoxBubbleLocation + // + this.comboBoxBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxBubbleLocation.FormattingEnabled = true; + this.comboBoxBubbleLocation.Items.AddRange(new object[] { + "At start point of lines/arcs", + "At end point of lines/arcs"}); + this.comboBoxBubbleLocation.Location = new System.Drawing.Point(124, 19); + this.comboBoxBubbleLocation.Name = "comboBoxBubbleLocation"; + this.comboBoxBubbleLocation.Size = new System.Drawing.Size(171, 21); + this.comboBoxBubbleLocation.TabIndex = 0; + // + // labelBubbleLocation + // + this.labelBubbleLocation.Location = new System.Drawing.Point(6, 21); + this.labelBubbleLocation.Name = "labelBubbleLocation"; + this.labelBubbleLocation.Size = new System.Drawing.Size(112, 19); + this.labelBubbleLocation.TabIndex = 16; + this.labelBubbleLocation.Text = "Bubble location:"; + // + // labelFirstLabel + // + this.labelFirstLabel.Location = new System.Drawing.Point(6, 56); + this.labelFirstLabel.Name = "labelFirstLabel"; + this.labelFirstLabel.Size = new System.Drawing.Size(112, 19); + this.labelFirstLabel.TabIndex = 15; + this.labelFirstLabel.Text = "Label of first grid:"; + // + // groupBoxGridSettings + // + this.groupBoxGridSettings.Controls.Add(this.checkBoxDeleteElements); + this.groupBoxGridSettings.Controls.Add(this.labelBubbleLocation); + this.groupBoxGridSettings.Controls.Add(this.textBoxFirstLabel); + this.groupBoxGridSettings.Controls.Add(this.labelFirstLabel); + this.groupBoxGridSettings.Controls.Add(this.comboBoxBubbleLocation); + this.groupBoxGridSettings.Location = new System.Drawing.Point(12, 12); + this.groupBoxGridSettings.Name = "groupBoxGridSettings"; + this.groupBoxGridSettings.Size = new System.Drawing.Size(310, 113); + this.groupBoxGridSettings.TabIndex = 18; + this.groupBoxGridSettings.TabStop = false; + this.groupBoxGridSettings.Text = "Settings"; + // + // checkBoxDeleteElements + // + this.checkBoxDeleteElements.AutoSize = true; + this.checkBoxDeleteElements.Checked = true; + this.checkBoxDeleteElements.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxDeleteElements.Location = new System.Drawing.Point(9, 87); + this.checkBoxDeleteElements.Name = "checkBoxDeleteElements"; + this.checkBoxDeleteElements.Size = new System.Drawing.Size(232, 17); + this.checkBoxDeleteElements.TabIndex = 2; + this.checkBoxDeleteElements.Text = "Delete the selected lines/arcs after creation"; + this.checkBoxDeleteElements.UseVisualStyleBackColor = true; + // + // CreateWithSelectedCurvesForm + // + this.AcceptButton = this.buttonOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(334, 177); + this.Controls.Add(this.groupBoxGridSettings); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "CreateWithSelectedCurvesForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Create Grids with Lines/Arcs"; + this.groupBoxGridSettings.ResumeLayout(false); + this.groupBoxGridSettings.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.TextBox textBoxFirstLabel; + private System.Windows.Forms.ComboBox comboBoxBubbleLocation; + private System.Windows.Forms.Label labelBubbleLocation; + private System.Windows.Forms.Label labelFirstLabel; + private System.Windows.Forms.GroupBox groupBoxGridSettings; + private System.Windows.Forms.CheckBox checkBoxDeleteElements; + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSelectedCurvesForm.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSelectedCurvesForm.cs new file mode 100644 index 00000000..18057bb8 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSelectedCurvesForm.cs @@ -0,0 +1,95 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// The dialog which provides the options of creating grids with selected lines/arcs + /// + public partial class CreateWithSelectedCurvesForm : Form + { + // data class object + private CreateWithSelectedCurvesData m_data; + + /// + /// Constructor + /// + /// Data class object + public CreateWithSelectedCurvesForm(CreateWithSelectedCurvesData data) + { + m_data = data; + + InitializeComponent(); + // Set state of controls + InitializeControls(); + } + + /// + /// Set state of controls + /// + private void InitializeControls() + { + comboBoxBubbleLocation.SelectedIndex = 1; + } + + private void buttonOK_Click(object sender, EventArgs e) + { + // Check if input are validated + if (ValidateValues()) + { + // Transfer data back into data class + SetData(); + } + else + { + this.DialogResult = DialogResult.None; + } + } + + /// + /// Check if input are validated + /// + /// Whether input is validated + private bool ValidateValues() + { + return Validation.ValidateLabel(textBoxFirstLabel, m_data.LabelsList); + } + + /// + /// Transfer data back into data class + /// + private void SetData() + { + m_data.BubbleLocation = (BubbleLocation)comboBoxBubbleLocation.SelectedIndex; + m_data.FirstLabel = textBoxFirstLabel.Text; + m_data.DeleteSelectedElements = checkBoxDeleteElements.Checked; + } + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSelectedCurvesForm.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSelectedCurvesForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSelectedCurvesForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSeletedCurvesData.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSeletedCurvesData.cs new file mode 100644 index 00000000..3466b036 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/CreateWithSeletedCurvesData.cs @@ -0,0 +1,386 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Collections; +using System.Windows.Forms; + +using Autodesk.Revit; +using Autodesk.Revit.DB; + +using Autodesk.Revit.UI; +using Autodesk.Revit.UI.Macros; + +using MacroCSharpSamples; +using Application = Autodesk.Revit.ApplicationServices.Application; +using SamplePropertis = MacroCSharpSamples.GridCreation.GridCreationProperties; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// The dialog which provides the options of creating grids with selected lines/arcs + /// + public class CreateWithSelectedCurvesData + { + #region Fields + // Selected curves in current document + private CurveArray? m_selectedCurves; + // Whether to delete selected lines/arc after creation + private bool m_deleteSelectedElements; + // Label of first grid + private String m_firstLabel = string.Empty; + // Bubble location of grids + private BubbleLocation m_bubbleLocation; + // Array list contains all grid labels in current document + private ArrayList m_labelsList; + // Revit application + private ThisApplication? m_thisApp; + private Application? m_revit; + #endregion + + #region Properties + /// + /// Whether to delete selected lines/arc after creation + /// + public bool DeleteSelectedElements + { + get + { + return m_deleteSelectedElements; + } + set + { + m_deleteSelectedElements = value; + } + } + + /// + /// Bubble location of grids + /// + public BubbleLocation BubbleLocation + { + get + { + return m_bubbleLocation; + } + set + { + m_bubbleLocation = value; + } + } + + /// + /// Label of first grid + /// + public String FirstLabel + { + get + { + return m_firstLabel; + } + set + { + m_firstLabel = value; + } + } + + /// + /// Get array list contains all grid labels in current document + /// + public ArrayList LabelsList + { + get + { + return m_labelsList; + } + } + #endregion + + #region Methods + /// + /// Constructor + /// + /// Revit application + /// Array contains geometry curves of selected lines or arcs + /// List contains all existing labels in Revit document + public CreateWithSelectedCurvesData(ThisApplication? thisApp, CurveArray? selectedCurves, ArrayList labels) + { + m_thisApp = thisApp; + m_revit = thisApp?.ActiveUIDocument.Document.Application; + + m_selectedCurves = selectedCurves; + m_labelsList = labels; + } + + /// + /// Create grids + /// + public void CreateGrids() + { + int errorCount = 0; + + int i = 0; + if (m_selectedCurves != null) + { + foreach (Curve curve in m_selectedCurves) + { + try + { + Line? line = curve as Line; + if (line != null) // Selected curve is a line + { + Grid grid; + // Create linear grid + grid = CreateLinearGrid(line); + + // Set label of first grid + if (i == 0 && grid != null) + { + try + { + grid.Name = m_firstLabel; + } + catch (System.ArgumentException) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToSetLabel") + m_firstLabel + "!", + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionSetLabel"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + } + else // Selected curve is an arc + { + Arc? arc = curve as Arc; + if (arc != null) + { + if (arc.IsBound) // Part of a circle + { + Grid grid; + // Create arc grid + grid = CreateArcGrid(arc); + + // Set label of first grid + if (i == 0 && grid != null) + { + try + { + grid.Name = m_firstLabel; + } + catch (System.ArgumentException) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToSetLabel") + m_firstLabel + "!", + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionSetLabel"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + } + else // Arc is a circle + { + // In Revit UI user can select a circle to create a grid, but actually two grids + // (One from 0 to 180 degree and the other from 180 degree to 360) will be created. + // In RevitAPI using NewGrid method with a circle as its argument will raise an exception. + // Therefore in this sample we will create two arcs from the upper and lower parts of the + // circle, and then create two grids on the base of the two arcs to accord with UI. + Grid? gridUpper = null; + Grid? gridLower = null; + bool isFirstGrid = (i == 0); + // Create grids + CreateGridsForCircle(arc, ref gridUpper, ref gridLower, isFirstGrid); + } + } + } + } + catch (Exception) + { + ++errorCount; + continue; + } + + ++i; + } + } + + + if (m_deleteSelectedElements) + { + try + { + m_thisApp?.ActiveUIDocument.Document.Delete(GridCreation.GetSelectedModelLinesAndArcs(m_thisApp)); + } + catch (Exception) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToDeletedLinesOrArcs"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionDeletedLinesOrArcs"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + + if (errorCount != 0) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToCreateGrids"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionCreateGrids"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + + /// + /// Create two grids if the selected curve is a circle + /// + /// The circular curve to be transferred to grid + /// The grid to be created base on the upper part of the circular curve + /// The grid to be created base on the lower part of the circular curve + /// Whether the circular curve is the first curve to be transferred + private void CreateGridsForCircle(Arc arc, ref Grid? gridUpper, ref Grid? gridLower, bool isFirst) + { + XYZ center = arc.Center; + double radius = arc.Radius; + + XYZ? XRightPoint = m_revit?.Create.NewXYZ(center.X + radius, center.Y, 0); + XYZ? XLeftPoint = m_revit?.Create.NewXYZ(center.X - radius, center.Y, 0); + XYZ? YUpperPoint = m_revit?.Create.NewXYZ(center.X, center.Y + radius, 0); + XYZ? YLowerPoint = m_revit?.Create.NewXYZ(center.X, center.Y - radius, 0); + Arc upperArc; + Arc lowerArc; + if (m_bubbleLocation == BubbleLocation.StartPoint) + { + upperArc = Arc.Create(XRightPoint, XLeftPoint, YUpperPoint); + lowerArc = Arc.Create(XLeftPoint, XRightPoint, YLowerPoint); + } + else + { + upperArc = Arc.Create(XLeftPoint, XRightPoint, YUpperPoint); + lowerArc = Arc.Create(XRightPoint, XLeftPoint, YLowerPoint); + } + + // Create arc grids + gridUpper = Grid.Create(m_thisApp?.ActiveUIDocument.Document, upperArc); + gridLower = Grid.Create(m_thisApp?.ActiveUIDocument.Document, lowerArc); + + if (gridUpper != null && isFirst) + { + try + { + gridUpper.Name = m_firstLabel; + } + catch (System.ArgumentException) + { + MessageBox.Show(SamplePropertis.GridCreationResources.ResourceManager.GetString("FailedToSetLabel") + m_firstLabel + "!", + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionSetLabel"), + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + } + + /// + /// Create arc grid + /// + /// The arc curve to be transferred to grid + /// The newly created grid + private Grid CreateArcGrid(Arc arc) + { + Grid grid; + + if (m_bubbleLocation == BubbleLocation.StartPoint) + { + grid = Grid.Create(m_thisApp?.ActiveUIDocument.Document, arc); + } + else + { + // Get start point, end point of the arc and the middle point on it + XYZ startPoint = arc.GetEndPoint(0); + XYZ endPoint = arc.GetEndPoint(1); + bool clockwise = (arc.Normal.Z == -1); + + // Get start angel and end angel of arc + double startDegree = arc.GetEndParameter(0); + double endDegree = arc.GetEndParameter(1); + + // Handle the case that the arc is clockwise + if (clockwise && startDegree > 0 && endDegree > 0) + { + startDegree = 2 * Values.PI - startDegree; + endDegree = 2 * Values.PI - endDegree; + } + else if (clockwise && startDegree < 0) + { + double temp = endDegree; + endDegree = -1 * startDegree; + startDegree = -1 * temp; + } + + double sumDegree = (startDegree + endDegree) / 2; + while (sumDegree > 2 * Values.PI) + { + sumDegree -= 2 * Values.PI; + } + + while (sumDegree < -2 * Values.PI) + { + sumDegree += 2 * Values.PI; + } + + XYZ? midPoint = m_revit?.Create.NewXYZ(arc.Center.X + arc.Radius * Math.Cos(sumDegree), + arc.Center.Y + arc.Radius * Math.Sin(sumDegree), 0); + Arc reversedArc = Arc.Create(endPoint, startPoint, midPoint); + + //Create grid + grid = Grid.Create(m_thisApp?.ActiveUIDocument.Document, reversedArc); + } + + return grid; + } + + /// + /// Create linear grid + /// + /// The linear curve to be transferred to grid + /// The newly created grid + private Grid CreateLinearGrid(Line line) + { + Grid grid; + + // Create grid according to the bubble location + if (m_bubbleLocation == BubbleLocation.StartPoint) + { + grid = Grid.Create(m_thisApp?.ActiveUIDocument.Document, line); + } + else + { + XYZ startPoint = line.GetEndPoint(1); + XYZ endPoint = line.GetEndPoint(0); + Line reversedLine = Line.CreateBound(startPoint, endPoint); + grid = Grid.Create(m_thisApp?.ActiveUIDocument.Document, reversedLine); + } + + return grid; + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/EnumsAndValues.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/EnumsAndValues.cs new file mode 100644 index 00000000..c3d0c6ec --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/EnumsAndValues.cs @@ -0,0 +1,72 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// An enumerate type listing the ways to create grids. + /// + public enum CreateMode + { + /// + /// Create grids with selected lines/arcs + /// + Select, + /// + /// Create orthogonal grids + /// + Orthogonal, + /// + /// Create radial and arc grids + /// + RadialAndArc + } + + /// + /// An enumerate type listing bubble locations of grids. + /// + public enum BubbleLocation + { + /// + /// Place bubble at the start point + /// + StartPoint, + /// + /// Place bubble at the end point + /// + EndPoint + } + + /// + /// Class contains common const values + /// + static class Values + { + public const double PI = 3.1415926535897900; + // ratio from degree to radian + public const double DEGTORAD = PI / 180; + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreation.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreation.cs new file mode 100644 index 00000000..fc68d598 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreation.cs @@ -0,0 +1,247 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Windows.Forms; +using System.Collections; +using System.Collections.Generic; + +using Autodesk.Revit; +using Autodesk.Revit.DB; + +using Application = Autodesk.Revit.ApplicationServices.Application; +using Element = Autodesk.Revit.DB.Element; + +using SamplePropertis = MacroCSharpSamples.GridCreation.GridCreationProperties; + +using MacroCSharpSamples; +using System.Diagnostics; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + public class GridCreation + { + #region + ThisApplication? m_app; + #endregion + + /// + /// Default constructor without parameter is not allowed + /// + private GridCreation() + { + } + + /// + /// GridCreation init + /// + /// + public GridCreation(ThisApplication App) + { + m_app = App; + } + + /// + /// Run this sample now + /// + public void Run() + { + try + { + Document? document = m_app?.ActiveUIDocument.Document; + + // Get all selected lines and arcs + CurveArray? selectedCurves = GetSelectedCurves(m_app); + + // Show UI + GridCreationOptionData? gridCreationOption = new GridCreationOptionData(selectedCurves == null || selectedCurves.IsEmpty); + using (GridCreationOptionForm gridCreationOptForm = new GridCreationOptionForm(gridCreationOption)) + { + DialogResult result = gridCreationOptForm.ShowDialog(); + if (result == DialogResult.Cancel) + { + return; + } + + ArrayList labels = GetAllLabelsOfGrids(document); + ForgeTypeId? dut = GetLengthUnitType(document); + switch (gridCreationOption.CreateGridsMode) + { + case CreateMode.Select: // Create grids with selected lines/arcs + CreateWithSelectedCurvesData data = new CreateWithSelectedCurvesData(m_app, selectedCurves, labels); + using (CreateWithSelectedCurvesForm createWithSelected = new CreateWithSelectedCurvesForm(data)) + { + result = createWithSelected.ShowDialog(); + if (result == DialogResult.OK) + { + // Create grids + data.CreateGrids(); + } + } + break; + + case CreateMode.Orthogonal: // Create orthogonal grids + CreateOrthogonalGridsData orthogonalData = new CreateOrthogonalGridsData(m_app, dut, labels); + using (CreateOrthogonalGridsForm orthogonalGridForm = new CreateOrthogonalGridsForm(orthogonalData)) + { + result = orthogonalGridForm.ShowDialog(); + if (result == DialogResult.OK) + { + // Create grids + orthogonalData.CreateGrids(); + } + } + break; + + case CreateMode.RadialAndArc: // Create radial and arc grids + CreateRadialAndArcGridsData radArcData = new CreateRadialAndArcGridsData(m_app, dut, labels); + using (CreateRadialAndArcGridsForm radArcForm = new CreateRadialAndArcGridsForm(radArcData)) + { + result = radArcForm.ShowDialog(); + if (result == DialogResult.OK) + { + // Create grids + radArcData.CreateGrids(); + } + } + break; + } + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + /// + /// Get all selected lines and arcs + /// + /// Revit's document + /// CurveArray contains all selected lines and arcs + private CurveArray? GetSelectedCurves(ThisApplication? document) + { + CurveArray? selectedCurves = m_app?.ActiveUIDocument.Document.Application.Create.NewCurveArray(); + ICollection? elements = document?.ActiveUIDocument.Selection.GetElementIds(); + if (elements == null) + { + return null; + } + foreach (Autodesk.Revit.DB.ElementId elementId in elements) + { + Element? element = document?.ActiveUIDocument.Document.GetElement(elementId); + if ((element is ModelLine) || (element is ModelArc)) + { + ModelCurve? modelCurve = element as ModelCurve; + Curve? curve = modelCurve?.GeometryCurve; + if (curve != null) + { + selectedCurves?.Append(curve); + } + } + else if ((element is DetailLine) || (element is DetailArc)) + { + DetailCurve? detailCurve = element as DetailCurve; + Curve? curve = detailCurve?.GeometryCurve; + if (curve != null) + { + selectedCurves?.Append(curve); + } + } + } + + return selectedCurves; + } + + /// + /// Get all model and detail lines/arcs within selected elements + /// + /// Revit's document + /// ElementSet contains all model and detail lines/arcs within selected elements + public static ICollection GetSelectedModelLinesAndArcs(ThisApplication thisDocument) + { + var tmpIds = new List(); + ICollection elements = thisDocument.ActiveUIDocument.Selection.GetElementIds(); + foreach (ElementId id in elements) + { + Element element = thisDocument.ActiveUIDocument.Document.GetElement(id); + if ((element is ModelLine) || (element is ModelArc) || (element is DetailLine) || (element is DetailArc)) + { + tmpIds.Add(element.Id); + } + } + + return tmpIds; + } + + /// + /// Get current length display unit type + /// + /// Revit's document + /// Current length display unit type + private static ForgeTypeId? GetLengthUnitType(Document? document) + { + ForgeTypeId specTypeId = SpecTypeId.Length; + Units? projectUnit = document?.GetUnits(); + try + { + Autodesk.Revit.DB.FormatOptions? formatOption = projectUnit?.GetFormatOptions(specTypeId); + return formatOption?.GetUnitTypeId(); + } + catch (System.Exception /*e*/) + { + return UnitTypeId.Feet; + } + } + + /// + /// Get all grid labels in current document + /// + /// Revit's document + /// ArrayList contains all grid labels in current document + private static ArrayList GetAllLabelsOfGrids(Document? document) + { + ArrayList labels = new ArrayList(); + + ElementClassFilter gridFilter = new ElementClassFilter(typeof(Grid)); + FilteredElementCollector collector = new FilteredElementCollector(document); + collector.WherePasses(gridFilter); + FilteredElementIterator iter = collector.GetElementIterator(); + + iter.Reset(); + while (iter.MoveNext()) + { + Grid? grid = iter.Current as Grid; + if (null != grid) + { + labels.Add(grid.Name); + } + } + return labels; + } + } +} + diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionData.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionData.cs new file mode 100644 index 00000000..19626a21 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionData.cs @@ -0,0 +1,83 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; + +using Autodesk.Revit; +using Autodesk.Revit.DB; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// Data class which stores the information of the way to create grids + /// + public class GridCreationOptionData + { + #region Fields + // The way to create grids + private CreateMode m_createGridsMode; + // If lines/arcs have been selected + private bool m_hasSelectedLinesOrArcs; + #endregion + + #region Properties + /// + /// Creating mode + /// + public CreateMode CreateGridsMode + { + get + { + return m_createGridsMode; + } + set + { + m_createGridsMode = value; + } + } + + /// + /// State whether lines/arcs have been selected + /// + public bool HasSelectedLinesOrArcs + { + get + { + return m_hasSelectedLinesOrArcs; + } + } + #endregion + + #region Methods + /// + /// Constructor + /// + /// Whether lines or arcs have been selected + public GridCreationOptionData(bool hasSelectedLinesOrArcs) + { + m_hasSelectedLinesOrArcs = hasSelectedLinesOrArcs; + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionForm.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionForm.Designer.cs new file mode 100644 index 00000000..5462cf4c --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionForm.Designer.cs @@ -0,0 +1,160 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +namespace Revit.SDK.Samples.GridCreation.CS +{ + partial class GridCreationOptionForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.radioButtonSelect = new System.Windows.Forms.RadioButton(); + this.radioButtonRadialAndCircularGrids = new System.Windows.Forms.RadioButton(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.groupBoxCreateOptions = new System.Windows.Forms.GroupBox(); + this.radioButtonOrthogonalGrids = new System.Windows.Forms.RadioButton(); + this.groupBoxCreateOptions.SuspendLayout(); + this.SuspendLayout(); + // + // radioButtonSelect + // + this.radioButtonSelect.AutoSize = true; + this.radioButtonSelect.Checked = true; + this.radioButtonSelect.Location = new System.Drawing.Point(6, 19); + this.radioButtonSelect.Name = "radioButtonSelect"; + this.radioButtonSelect.Size = new System.Drawing.Size(205, 17); + this.radioButtonSelect.TabIndex = 0; + this.radioButtonSelect.TabStop = true; + this.radioButtonSelect.Text = "Create grids with selected lines or arcs"; + this.radioButtonSelect.UseVisualStyleBackColor = true; + // + // radioButtonRadialAndCircularGrids + // + this.radioButtonRadialAndCircularGrids.AutoSize = true; + this.radioButtonRadialAndCircularGrids.Location = new System.Drawing.Point(6, 69); + this.radioButtonRadialAndCircularGrids.Name = "radioButtonRadialAndCircularGrids"; + this.radioButtonRadialAndCircularGrids.Size = new System.Drawing.Size(199, 17); + this.radioButtonRadialAndCircularGrids.TabIndex = 2; + this.radioButtonRadialAndCircularGrids.Text = "Create a batch of radial and arc grids"; + this.radioButtonRadialAndCircularGrids.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(159, 129); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(90, 23); + this.buttonCancel.TabIndex = 1; + this.buttonCancel.Text = "&Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // buttonOK + // + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonOK.Location = new System.Drawing.Point(58, 129); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(90, 23); + this.buttonOK.TabIndex = 0; + this.buttonOK.Text = "&OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // groupBoxCreateOptions + // + this.groupBoxCreateOptions.Controls.Add(this.radioButtonSelect); + this.groupBoxCreateOptions.Controls.Add(this.radioButtonOrthogonalGrids); + this.groupBoxCreateOptions.Controls.Add(this.radioButtonRadialAndCircularGrids); + this.groupBoxCreateOptions.Location = new System.Drawing.Point(12, 12); + this.groupBoxCreateOptions.Name = "groupBoxCreateOptions"; + this.groupBoxCreateOptions.Size = new System.Drawing.Size(237, 96); + this.groupBoxCreateOptions.TabIndex = 13; + this.groupBoxCreateOptions.TabStop = false; + this.groupBoxCreateOptions.Text = "Choose the way to create grids"; + // + // radioButtonOrthogonalGrids + // + this.radioButtonOrthogonalGrids.AutoSize = true; + this.radioButtonOrthogonalGrids.Location = new System.Drawing.Point(6, 44); + this.radioButtonOrthogonalGrids.Name = "radioButtonOrthogonalGrids"; + this.radioButtonOrthogonalGrids.Size = new System.Drawing.Size(185, 17); + this.radioButtonOrthogonalGrids.TabIndex = 1; + this.radioButtonOrthogonalGrids.Text = "Create a batch of orthogonal grids"; + this.radioButtonOrthogonalGrids.UseVisualStyleBackColor = true; + // + // GridCreationOptionForm + // + this.AcceptButton = this.buttonOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(265, 164); + this.Controls.Add(this.groupBoxCreateOptions); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "GridCreationOptionForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Grid Creation"; + this.groupBoxCreateOptions.ResumeLayout(false); + this.groupBoxCreateOptions.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.RadioButton radioButtonSelect; + private System.Windows.Forms.RadioButton radioButtonRadialAndCircularGrids; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.GroupBox groupBoxCreateOptions; + private System.Windows.Forms.RadioButton radioButtonOrthogonalGrids; + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionForm.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionForm.cs new file mode 100644 index 00000000..a6dbd1d4 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionForm.cs @@ -0,0 +1,81 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// The dialog which lets user choose the way to create grids + /// + public partial class GridCreationOptionForm : Form + { + // data class object + private GridCreationOptionData m_gridCreationOption; + + /// + /// Constructor + /// + /// Data class object + public GridCreationOptionForm(GridCreationOptionData opt) + { + m_gridCreationOption = opt; + + InitializeComponent(); + // Set state of controls + InitializeControls(); + } + + /// + /// Set state of controls + /// + private void InitializeControls() + { + if (!m_gridCreationOption.HasSelectedLinesOrArcs) + { + radioButtonSelect.Enabled = false; + radioButtonOrthogonalGrids.Checked = true; + } + } + + private void buttonOK_Click(object sender, EventArgs e) + { + // Transfer data back into data class + SetData(); + } + + /// + /// Transfer data back into data class + /// + private void SetData() + { + m_gridCreationOption.CreateGridsMode = radioButtonSelect.Checked ? CreateMode.Select : + (radioButtonOrthogonalGrids.Checked ? CreateMode.Orthogonal : CreateMode.RadialAndArc); + } + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionForm.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationOptionForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationProperties/GridCreationResources.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationProperties/GridCreationResources.Designer.cs new file mode 100644 index 00000000..ca053c5e --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationProperties/GridCreationResources.Designer.cs @@ -0,0 +1,567 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.832 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MacroCSharpSamples.GridCreation.GridCreationProperties +{ + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class GridCreationResources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal GridCreationResources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MacroCSharpSamples.GridCreation.GridCreationProperties.GridCreationResources", typeof(GridCreationResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Please adjust the values and try again!. + /// + internal static string AjustValues + { + get + { + return ResourceManager.GetString("AjustValues", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Coordinate can not be null!. + /// + internal static string CoordinateCannotBeNull + { + get + { + return ResourceManager.GetString("CoordinateCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Coordinate is not in a correct format!. + /// + internal static string CoordinateFormatWrong + { + get + { + return ResourceManager.GetString("CoordinateFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Degree can not be negative!. + /// + internal static string DegreeCannotBeNegative + { + get + { + return ResourceManager.GetString("DegreeCannotBeNegative", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Degree can not be null!. + /// + internal static string DegreeCannotBeNull + { + get + { + return ResourceManager.GetString("DegreeCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Degree is not in a correct format!. + /// + internal static string DegreeFormatWrong + { + get + { + return ResourceManager.GetString("DegreeFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start degree and end degree can not be so close!. + /// + internal static string DegreesAreTooClose + { + get + { + return ResourceManager.GetString("DegreesAreTooClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Degree should be within the range of 0 - 360!. + /// + internal static string DegreeWithin0To360 + { + get + { + return ResourceManager.GetString("DegreeWithin0To360", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Distance can not be negative!. + /// + internal static string DistanceCannotBeNegative + { + get + { + return ResourceManager.GetString("DistanceCannotBeNegative", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Distance can not be null!. + /// + internal static string DistanceCannotBeNull + { + get + { + return ResourceManager.GetString("DistanceCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Distance is not in a correct format!. + /// + internal static string DistanceFormatWrong + { + get + { + return ResourceManager.GetString("DistanceFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cm. + /// + internal static string DUT_CENTIMETERS + { + get + { + return ResourceManager.GetString("DUT_CENTIMETERS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '. + /// + internal static string DUT_DECIMAL_FEET + { + get + { + return ResourceManager.GetString("DUT_DECIMAL_FEET", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ". + /// + internal static string DUT_DECIMAL_INCHES + { + get + { + return ResourceManager.GetString("DUT_DECIMAL_INCHES", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '. + /// + internal static string DUT_FEET_FRACTIONAL_INCHES + { + get + { + return ResourceManager.GetString("DUT_FEET_FRACTIONAL_INCHES", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ". + /// + internal static string DUT_FRACTIONAL_INCHES + { + get + { + return ResourceManager.GetString("DUT_FRACTIONAL_INCHES", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to m. + /// + internal static string DUT_METERS + { + get + { + return ResourceManager.GetString("DUT_METERS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to m. + /// + internal static string DUT_METERS_CENTIMETERS + { + get + { + return ResourceManager.GetString("DUT_METERS_CENTIMETERS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to mm. + /// + internal static string DUT_MILLIMETERS + { + get + { + return ResourceManager.GetString("DUT_MILLIMETERS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Start point and end point of arc grids are too close. + /// + internal static string EndPointsTooClose + { + get + { + return ResourceManager.GetString("EndPointsTooClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create one or more arc grids.. + /// + internal static string FailedToCreateArcGrids + { + get + { + return ResourceManager.GetString("FailedToCreateArcGrids", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create one or more grids. . + /// + internal static string FailedToCreateGrids + { + get + { + return ResourceManager.GetString("FailedToCreateGrids", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create one or more radial grids. . + /// + internal static string FailedToCreateRadialGrids + { + get + { + return ResourceManager.GetString("FailedToCreateRadialGrids", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to delete some of the selected lines or arcs!. + /// + internal static string FailedToDeletedLinesOrArcs + { + get + { + return ResourceManager.GetString("FailedToDeletedLinesOrArcs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to set label of grid to : . + /// + internal static string FailedToSetLabel + { + get + { + return ResourceManager.GetString("FailedToSetLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to Create Grids. + /// + internal static string FailureCaptionCreateGrids + { + get + { + return ResourceManager.GetString("FailureCaptionCreateGrids", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to Delete Lines/Arcs. + /// + internal static string FailureCaptionDeletedLinesOrArcs + { + get + { + return ResourceManager.GetString("FailureCaptionDeletedLinesOrArcs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid Value. + /// + internal static string FailureCaptionInvalidValue + { + get + { + return ResourceManager.GetString("FailureCaptionInvalidValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to Set Label. + /// + internal static string FailureCaptionSetLabel + { + get + { + return ResourceManager.GetString("FailureCaptionSetLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Label can not be null!. + /// + internal static string LabelCannotBeNull + { + get + { + return ResourceManager.GetString("LabelCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A same label has already existed!. + /// + internal static string LabelExisted + { + get + { + return ResourceManager.GetString("LabelExisted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The two labels can't be same!. + /// + internal static string LabelsCannotBeSame + { + get + { + return ResourceManager.GetString("LabelsCannotBeSame", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number should be an integer between 0 and 200!. + /// + internal static string NumberBetween0And200 + { + get + { + return ResourceManager.GetString("NumberBetween0And200", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number can not be null!. + /// + internal static string NumberCannotBeNull + { + get + { + return ResourceManager.GetString("NumberCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number is not in a correct format!. + /// + internal static string NumberFormatWrong + { + get + { + return ResourceManager.GetString("NumberFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The two numbers can not be both zero!. + /// + internal static string NumbersCannotBeBothZero + { + get + { + return ResourceManager.GetString("NumbersCannotBeBothZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Radius can not be negative or zero!. + /// + internal static string RadiusCannotBeNegativeOrZero + { + get + { + return ResourceManager.GetString("RadiusCannotBeNegativeOrZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Radius can not be null!. + /// + internal static string RadiusCannotBeNull + { + get + { + return ResourceManager.GetString("RadiusCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Radius is not in a correct format!. + /// + internal static string RadiusFormatWrong + { + get + { + return ResourceManager.GetString("RadiusFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to That may be caused by one or more of following reasons:. + /// + internal static string Reasons + { + get + { + return ResourceManager.GetString("Reasons", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spacing can not be negative or zero!. + /// + internal static string SpacingCannotBeNegativeOrZero + { + get + { + return ResourceManager.GetString("SpacingCannotBeNegativeOrZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spacing can not be null!. + /// + internal static string SpacingCannotBeNull + { + get + { + return ResourceManager.GetString("SpacingCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spacing is not in a correct format!. + /// + internal static string SpacingFormatWrong + { + get + { + return ResourceManager.GetString("SpacingFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Spacings between grids are too small. + /// + internal static string SpacingsTooSmall + { + get + { + return ResourceManager.GetString("SpacingsTooSmall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start degree should be less than end degree!. + /// + internal static string StartDegreeShouldBeLessThanEndDegree + { + get + { + return ResourceManager.GetString("StartDegreeShouldBeLessThanEndDegree", resourceCulture); + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationProperties/GridCreationResources.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationProperties/GridCreationResources.resx new file mode 100644 index 00000000..69589ea2 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/GridCreationProperties/GridCreationResources.resx @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Please adjust the values and try again! + + + Coordinate can not be null! + + + Coordinate is not in a correct format! + + + Degree can not be negative! + + + Degree can not be null! + + + Degree is not in a correct format! + + + Start degree and end degree can not be so close! + + + Degree should be within the range of 0 - 360! + + + Distance can not be negative! + + + Distance can not be null! + + + Distance is not in a correct format! + + + cm + + + ' + + + " + + + ' + + + " + + + m + + + m + + + mm + + + - Start point and end point of arc grids are too close + + + Failed to create one or more arc grids. + + + Failed to create one or more grids. + + + Failed to create one or more radial grids. + + + Failed to delete some of the selected lines or arcs! + + + Failed to set label of grid to : + + + Failed to Create Grids + + + Failed to Delete Lines/Arcs + + + Invalid Value + + + Failed to Set Label + + + Label can not be null! + + + A same label has already existed! + + + The two labels can't be same! + + + Number should be an integer between 0 and 200! + + + Number can not be null! + + + Number is not in a correct format! + + + The two numbers can not be both zero! + + + Radius can not be negative or zero! + + + Radius can not be null! + + + Radius is not in a correct format! + + + That may be caused by one or more of following reasons: + + + Spacing can not be negative or zero! + + + Spacing can not be null! + + + Spacing is not in a correct format! + + + - Spacings between grids are too small + + + Start degree should be less than end degree! + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Properties/Resources.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Properties/Resources.Designer.cs new file mode 100644 index 00000000..2746d35e --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Properties/Resources.Designer.cs @@ -0,0 +1,469 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.832 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Revit.SDK.Samples.GridCreation.Properties +{ + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MacroCSharpSamples.Samples.GridCreation.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Please adjust the values and try again!. + /// + internal static string AjustValues { + get { + return ResourceManager.GetString("AjustValues", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Coordinate can not be null!. + /// + internal static string CoordinateCannotBeNull { + get { + return ResourceManager.GetString("CoordinateCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Coordinate is not in a correct format!. + /// + internal static string CoordinateFormatWrong { + get { + return ResourceManager.GetString("CoordinateFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Degree can not be negative!. + /// + internal static string DegreeCannotBeNegative { + get { + return ResourceManager.GetString("DegreeCannotBeNegative", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Degree can not be null!. + /// + internal static string DegreeCannotBeNull { + get { + return ResourceManager.GetString("DegreeCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Degree is not in a correct format!. + /// + internal static string DegreeFormatWrong { + get { + return ResourceManager.GetString("DegreeFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start degree and end degree can not be so close!. + /// + internal static string DegreesAreTooClose { + get { + return ResourceManager.GetString("DegreesAreTooClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Degree should be within the range of 0 - 360!. + /// + internal static string DegreeWithin0To360 { + get { + return ResourceManager.GetString("DegreeWithin0To360", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Distance can not be negative!. + /// + internal static string DistanceCannotBeNegative { + get { + return ResourceManager.GetString("DistanceCannotBeNegative", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Distance can not be null!. + /// + internal static string DistanceCannotBeNull { + get { + return ResourceManager.GetString("DistanceCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Distance is not in a correct format!. + /// + internal static string DistanceFormatWrong { + get { + return ResourceManager.GetString("DistanceFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cm. + /// + internal static string DUT_CENTIMETERS { + get { + return ResourceManager.GetString("DUT_CENTIMETERS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '. + /// + internal static string DUT_DECIMAL_FEET { + get { + return ResourceManager.GetString("DUT_DECIMAL_FEET", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ". + /// + internal static string DUT_DECIMAL_INCHES { + get { + return ResourceManager.GetString("DUT_DECIMAL_INCHES", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '. + /// + internal static string DUT_FEET_FRACTIONAL_INCHES { + get { + return ResourceManager.GetString("DUT_FEET_FRACTIONAL_INCHES", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ". + /// + internal static string DUT_FRACTIONAL_INCHES { + get { + return ResourceManager.GetString("DUT_FRACTIONAL_INCHES", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to m. + /// + internal static string DUT_METERS { + get { + return ResourceManager.GetString("DUT_METERS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to m. + /// + internal static string DUT_METERS_CENTIMETERS { + get { + return ResourceManager.GetString("DUT_METERS_CENTIMETERS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to mm. + /// + internal static string DUT_MILLIMETERS { + get { + return ResourceManager.GetString("DUT_MILLIMETERS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Start point and end point of arc grids are too close. + /// + internal static string EndPointsTooClose { + get { + return ResourceManager.GetString("EndPointsTooClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create one or more arc grids.. + /// + internal static string FailedToCreateArcGrids { + get { + return ResourceManager.GetString("FailedToCreateArcGrids", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create one or more grids. . + /// + internal static string FailedToCreateGrids { + get { + return ResourceManager.GetString("FailedToCreateGrids", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create one or more radial grids. . + /// + internal static string FailedToCreateRadialGrids { + get { + return ResourceManager.GetString("FailedToCreateRadialGrids", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to delete some of the selected lines or arcs!. + /// + internal static string FailedToDeletedLinesOrArcs { + get { + return ResourceManager.GetString("FailedToDeletedLinesOrArcs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to set label of grid to : . + /// + internal static string FailedToSetLabel { + get { + return ResourceManager.GetString("FailedToSetLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to Create Grids. + /// + internal static string FailureCaptionCreateGrids { + get { + return ResourceManager.GetString("FailureCaptionCreateGrids", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to Delete Lines/Arcs. + /// + internal static string FailureCaptionDeletedLinesOrArcs { + get { + return ResourceManager.GetString("FailureCaptionDeletedLinesOrArcs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid Value. + /// + internal static string FailureCaptionInvalidValue { + get { + return ResourceManager.GetString("FailureCaptionInvalidValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to Set Label. + /// + internal static string FailureCaptionSetLabel { + get { + return ResourceManager.GetString("FailureCaptionSetLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Label can not be null!. + /// + internal static string LabelCannotBeNull { + get { + return ResourceManager.GetString("LabelCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A same label has already existed!. + /// + internal static string LabelExisted { + get { + return ResourceManager.GetString("LabelExisted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The two labels can't be same!. + /// + internal static string LabelsCannotBeSame { + get { + return ResourceManager.GetString("LabelsCannotBeSame", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number should be an integer between 0 and 200!. + /// + internal static string NumberBetween0And200 { + get { + return ResourceManager.GetString("NumberBetween0And200", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number can not be null!. + /// + internal static string NumberCannotBeNull { + get { + return ResourceManager.GetString("NumberCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number is not in a correct format!. + /// + internal static string NumberFormatWrong { + get { + return ResourceManager.GetString("NumberFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The two numbers can not be both zero!. + /// + internal static string NumbersCannotBeBothZero { + get { + return ResourceManager.GetString("NumbersCannotBeBothZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Radius can not be negative or zero!. + /// + internal static string RadiusCannotBeNegativeOrZero { + get { + return ResourceManager.GetString("RadiusCannotBeNegativeOrZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Radius can not be null!. + /// + internal static string RadiusCannotBeNull { + get { + return ResourceManager.GetString("RadiusCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Radius is not in a correct format!. + /// + internal static string RadiusFormatWrong { + get { + return ResourceManager.GetString("RadiusFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to That may be caused by one or more of following reasons:. + /// + internal static string Reasons { + get { + return ResourceManager.GetString("Reasons", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spacing can not be negative or zero!. + /// + internal static string SpacingCannotBeNegativeOrZero { + get { + return ResourceManager.GetString("SpacingCannotBeNegativeOrZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spacing can not be null!. + /// + internal static string SpacingCannotBeNull { + get { + return ResourceManager.GetString("SpacingCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spacing is not in a correct format!. + /// + internal static string SpacingFormatWrong { + get { + return ResourceManager.GetString("SpacingFormatWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Spacings between grids are too small. + /// + internal static string SpacingsTooSmall { + get { + return ResourceManager.GetString("SpacingsTooSmall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start degree should be less than end degree!. + /// + internal static string StartDegreeShouldBeLessThanEndDegree { + get { + return ResourceManager.GetString("StartDegreeShouldBeLessThanEndDegree", resourceCulture); + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Properties/Resources.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Properties/Resources.resx new file mode 100644 index 00000000..401ffa04 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Properties/Resources.resx @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Please adjust the values and try again! + + + Coordinate can not be null! + + + Coordinate is not in a correct format! + + + Degree can not be negative! + + + Degree can not be null! + + + Degree is not in a correct format! + + + Start degree and end degree can not be so close! + + + Degree should be within the range of 0 - 360! + + + Distance can not be negative! + + + Distance can not be null! + + + Distance is not in a correct format! + + + cm + + + ' + + + " + + + ' + + + " + + + m + + + m + + + mm + + + - Start point and end point of arc grids are too close + + + Failed to create one or more arc grids. + + + Failed to create one or more grids. + + + Failed to create one or more radial grids. + + + Failed to delete some of the selected lines or arcs! + + + Failed to set label of grid to : + + + Failed to Create Grids + + + Failed to Delete Lines/Arcs + + + Invalid Value + + + Failed to Set Label + + + Label can not be null! + + + A same label has already existed! + + + The two labels can't be same! + + + Number should be an integer between 0 and 200! + + + Number can not be null! + + + Number is not in a correct format! + + + The two numbers can not be both zero! + + + Radius can not be negative or zero! + + + Radius can not be null! + + + Radius is not in a correct format! + + + That may be caused by one or more of following reasons: + + + Spacing can not be negative or zero! + + + Spacing can not be null! + + + Spacing is not in a correct format! + + + - Spacings between grids are too small + + + Start degree should be less than end degree! + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Unit.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Unit.cs new file mode 100644 index 00000000..805ee398 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Unit.cs @@ -0,0 +1,82 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Collections.Generic; +using System.Text; +using Autodesk.Revit.DB; +using Autodesk.Revit; + +using System.Configuration; +using System.Reflection; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// Provides static functions to convert unit + /// + static class Unit + { + #region Methods + /// + /// Convert the value get from RevitAPI to the value indicated by DisplayUnitType + /// + /// DisplayUnitType indicates unit of target value + /// value get from RevitAPI + /// Target value + public static double CovertFromAPI(ForgeTypeId to, double value) + { + return value *= ImperialDutRatio(to); + } + + /// + /// Convert a value indicated by DisplayUnitType to the value used by RevitAPI + /// + /// Value to be converted + /// DisplayUnitType indicates the unit of the value to be converted + /// Target value + public static double CovertToAPI(double value, ForgeTypeId from) + { + return value /= ImperialDutRatio(from); + } + + /// + /// Get ratio between value in RevitAPI and value to display indicated by DisplayUnitType + /// + /// DisplayUnitType indicates display unit type + /// Ratio + private static double ImperialDutRatio(ForgeTypeId unit) + { + if (unit == UnitTypeId.Feet) return 1; + if (unit == UnitTypeId.FeetFractionalInches) return 1; + if (unit == UnitTypeId.Inches) return 12; + if (unit == UnitTypeId.FractionalInches) return 12; + if (unit == UnitTypeId.Meters) return 0.3048; + if (unit == UnitTypeId.Centimeters) return 30.48; + if (unit == UnitTypeId.Millimeters) return 304.8; + if (unit == UnitTypeId.MetersCentimeters) return 0.3048; + return 1; + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Validation.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Validation.cs new file mode 100644 index 00000000..e61ba8f1 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/GridCreation/Validation.cs @@ -0,0 +1,339 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using System.Resources; +using System.Collections; + +using SamplePropertis = MacroCSharpSamples.GridCreation.GridCreationProperties; + +namespace Revit.SDK.Samples.GridCreation.CS +{ + /// + /// Class to validate input data before creating grids + /// + public static class Validation + { + // Get the resource contains strings + static ResourceManager resManager = SamplePropertis.GridCreationResources.ResourceManager; + + /// + /// Validate numbers in UI + /// + /// Control contains number information + /// Control contains another number information + /// Whether the numbers are validated + public static bool ValidateNumbers(Control number1Ctrl, Control number2Ctrl) + { + if (!ValidateNumber(number1Ctrl) || !ValidateNumber(number2Ctrl)) + { + return false; + } + + if (Convert.ToUInt32(number1Ctrl.Text) == 0 && Convert.ToUInt32(number2Ctrl.Text) == 0) + { + MessageBox.Show(resManager.GetString("NumbersCannotBeBothZero"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + number1Ctrl.Focus(); + return false; + } + + return true; + } + + /// + /// Validate number value + /// + /// Control contains number information + /// Whether the number value is validated + public static bool ValidateNumber(Control numberCtrl) + { + if (!ValidateNotNull(numberCtrl, "Number")) + { + return false; + } + + try + { + uint number = Convert.ToUInt32(numberCtrl.Text); + if (number > 200) + { + MessageBox.Show(resManager.GetString("NumberBetween0And200"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + numberCtrl.Focus(); + return false; + } + } + catch (OverflowException) + { + MessageBox.Show(resManager.GetString("NumberBetween0And200"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + numberCtrl.Focus(); + return false; + } + catch (Exception) + { + MessageBox.Show(resManager.GetString("NumberFormatWrong"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + numberCtrl.Focus(); + return false; + } + + return true; + } + + /// + /// Validate length value + /// + /// Control contains length information + /// Type of length + /// Whether the length can be zero + /// Whether the length value is validated + public static bool ValidateLength(Control lengthCtrl, String typeName, bool canBeZero) + { + if (!ValidateNotNull(lengthCtrl, typeName)) + { + return false; + } + + try + { + double length = Convert.ToDouble(lengthCtrl.Text); + if (length <= 0 && !canBeZero) + { + MessageBox.Show(resManager.GetString(typeName + "CannotBeNegativeOrZero"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + lengthCtrl.Focus(); + return false; + } + else if (length < 0 && canBeZero) + { + MessageBox.Show(resManager.GetString(typeName + "CannotBeNegative"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + lengthCtrl.Focus(); + return false; + } + } + catch (Exception) + { + MessageBox.Show(resManager.GetString(typeName + "FormatWrong"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + lengthCtrl.Focus(); + return false; + } + + return true; + } + + /// + /// Validate coordinate value + /// + /// Control contains coordinate information + /// Whether the coordinate value is validated + public static bool ValidateCoord(Control coordCtrl) + { + if (!ValidateNotNull(coordCtrl, "Coordinate")) + { + return false; + } + + try + { + Convert.ToDouble(coordCtrl.Text); + } + catch (Exception) + { + MessageBox.Show(resManager.GetString("CoordinateFormatWrong"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + coordCtrl.Focus(); + return false; + } + + return true; + } + + /// + /// Validate start degree and end degree + /// + /// Control contains start degree information + /// Control contains end degree information + /// Whether the degree values are validated + public static bool ValidateDegrees(Control startDegree, Control endDegree) + { + if (!ValidateDegree(startDegree) || !ValidateDegree(endDegree)) + { + return false; + } + + if (Math.Abs(Convert.ToDouble(startDegree.Text) - Convert.ToDouble(endDegree.Text)) <= Double.Epsilon) + { + MessageBox.Show(resManager.GetString("DegreesAreTooClose"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + startDegree.Focus(); + return false; + } + + if (Convert.ToDouble(startDegree.Text) >= Convert.ToDouble(endDegree.Text)) + { + MessageBox.Show(resManager.GetString("StartDegreeShouldBeLessThanEndDegree"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + startDegree.Focus(); + return false; + } + + return true; + } + + /// + /// Validate degree value + /// + /// Control contains degree information + /// Whether the degree value is validated + public static bool ValidateDegree(Control degreeCtrl) + { + if (!ValidateNotNull(degreeCtrl, "Degree")) + { + return false; + } + + try + { + double startDegree = Convert.ToDouble(degreeCtrl.Text); + if (startDegree < 0 || startDegree > 360) + { + MessageBox.Show(resManager.GetString("DegreeWithin0To360"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + degreeCtrl.Focus(); + return false; + } + } + catch (Exception) + { + MessageBox.Show(resManager.GetString("DegreeFormatWrong"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + degreeCtrl.Focus(); + return false; + } + + return true; + } + + /// + /// Validate label + /// + /// Control contains label information + /// List contains all labels in Revit document + /// Whether the label value is validated + public static bool ValidateLabel(Control labelCtrl, ArrayList allLabels) + { + if (!ValidateNotNull(labelCtrl, "Label")) + { + return false; + } + + String labelToBeValidated = labelCtrl.Text; + foreach (String label in allLabels) + { + if (label == labelToBeValidated) + { + MessageBox.Show(resManager.GetString("LabelExisted"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + labelCtrl.Focus(); + return false; + } + } + + return true; + } + + /// + /// Assure value is not null + /// + /// Control contains information needs to be checked + /// Type of information + /// Whether the value is not null + public static bool ValidateNotNull(Control control, String typeName) + { + if (String.IsNullOrEmpty(control.Text.TrimStart(' ').TrimEnd(' '))) + { + MessageBox.Show(resManager.GetString(typeName + "CannotBeNull"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + control.Focus(); + return false; + } + + return true; + } + + /// + /// Assure two labels are not same + /// + /// Control contains label information + /// Control contains label information + /// Whether the labels are same + public static bool ValidateLabels(Control label1Ctrl, Control label2Ctrl) + { + if (label1Ctrl.Text.TrimStart(' ').TrimEnd(' ') == label2Ctrl.Text.TrimStart(' ').TrimEnd(' ')) + { + MessageBox.Show(resManager.GetString("LabelsCannotBeSame"), + SamplePropertis.GridCreationResources.ResourceManager.GetString("FailureCaptionInvalidValue"), + MessageBoxButtons.OK, + MessageBoxIcon.Warning); + label1Ctrl.Focus(); + return false; + } + + return true; + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/MacroSamples_RVT.csproj b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/MacroSamples_RVT.csproj new file mode 100644 index 00000000..4cbfb764 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/MacroSamples_RVT.csproj @@ -0,0 +1,39 @@ + + + net8.0-windows + enable + enable + true + + + x64 + false + false + False + True + Portable + ..\..\Addin\ + MacroSamples_RVT + obj\ + DEBUG;TRACE + obj\Debug + false + false + false + false + false + false + false + + + + False + + + False + + + + + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Command.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Command.cs new file mode 100644 index 00000000..8d47feff --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Command.cs @@ -0,0 +1,91 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Windows.Forms; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using MacroCSharpSamples; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Get some properties of a slab , such as Level, Type name, Span direction, + /// Material name, Thickness, and Young Modulus for the slab's Material. + /// + public class SampleProjectInfo + { + // #region Class ctor implemetation + /// + /// Ctor without parameter is not allowed + /// + private SampleProjectInfo() + { + // no codes + } + + /// + /// Default constructor of StructuralLayerFunction + /// + public SampleProjectInfo(ThisApplication App) + { + // Init for varialbes + // this application handler + m_app = App; + // initialize global information + + RevitStartInfo.RevitApp = m_app.ActiveUIDocument.Application.Application; + RevitStartInfo.RevitDoc = m_app.ActiveUIDocument.Document; + RevitStartInfo.RevitProduct = m_app.ActiveUIDocument.Application.Application.Product; + } + + /// + /// Run sample Rooms + /// + public void Run() + { + try + { + //Get ProjectInfo object from current project + if(m_app == null) + return; + Autodesk.Revit.DB.ProjectInfo projectInfo = m_app.ActiveUIDocument.Document.ProjectInformation; + if (null != projectInfo) + { + ProjectInfoForm mainForm = new ProjectInfoForm(new ProjectInfoWrapper(projectInfo)); + mainForm.ShowDialog(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + #region Class member variable + ThisApplication? m_app; + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/AngleConverter.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/AngleConverter.cs new file mode 100644 index 00000000..b751f859 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/AngleConverter.cs @@ -0,0 +1,100 @@ +using System; +using System.ComponentModel; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Converts angle with string + /// + public class AngleConverter : TypeConverter + { + #region Methods + /// + /// Converts from string. + /// + /// Converted string + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) + { + return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); + } + /// + /// Converts to string. + /// + /// Converted string + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) + { + if(destinationType == null) + return false; + return destinationType.Equals(typeof(string)) || base.CanConvertTo(context, destinationType); + } + + /// + /// Converts from string. + /// + /// An System.ComponentModel.ITypeDescriptorContext + /// that provides a format context. + /// An optional System.Globalization.CultureInfo. + /// If not supplied, the current culture is assumed. + /// string to be converted to an element + /// An element if the element exists, otherwise null + public override object? ConvertFrom(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) + { + string? text = value as string; + if (!string.IsNullOrEmpty(text)) + { + return AngleString2Double(text); + } + return base.ConvertFrom(context, culture, value); + } + /// + /// Converts to string. + /// + /// An ITypeDescriptorContext that provides a format context. + /// A CultureInfo. If null is passed, the current culture is assumed. + /// The Object to convert. + /// The Type to convert the value parameter to. + /// Converted string + public override object? ConvertTo(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, Type destinationType) + { + if (destinationType == null) + { + throw new ArgumentNullException("destinationType"); + } + if (destinationType == typeof(string)) + { + if (value == null) return string.Empty; + double angle = (double) value; + return Double2AngleString(angle); + } + return base.ConvertTo(context, culture, value, destinationType); + } + + /// + /// Convert angle string to double value + /// + /// Angle string + /// Double value + private static double AngleString2Double(string value) + { + int n = value.Length - 1; + if (!char.IsDigit(value[n])) + { + value = value.Substring(0, n); + } + return Double.Parse(value) * 0.0174532925199433; + } + + /// + /// Convert double value to angle string + /// + /// Angle value + /// Angle string, the unit is degree. + private static string Double2AngleString(Double value) + { + // 0xb0 is ASCII for unit flag of "degree" + return ((object)Math.Round(value / 0.0174532925199433, 3)).ToString() + (char)0xb0; + } + + #endregion + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/CityConverter.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/CityConverter.cs new file mode 100644 index 00000000..7c6a8b8f --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/CityConverter.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Autodesk.Revit.DB; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Converts City with string + /// + public class CityConverter : TypeConverter + { + + public static List? Cities; + public const string UserDefined = "User Defined"; + + static CityConverter() + { + if(RevitStartInfo.RevitApp == null) + return; + Cities = new List(); + foreach (City city in RevitStartInfo.RevitApp.Cities) + { + Cities.Add(city); + } + } + + #region Methods + + /// + /// Returns whether this object supports a standard set of values that can be + /// picked from a list, using the specified context. + /// + /// true + public override bool GetStandardValuesSupported(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns whether the collection of standard values returned from System.ComponentModel.TypeConverter.GetStandardValues() + /// is an exclusive list. + /// + /// true + public override bool GetStandardValuesExclusive(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns a collection of standard values from the default context for the + /// data type this type converter is designed for. + /// + /// Element collection retrieved through filtering current Revit document elements + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext? context) + { + return new StandardValuesCollection(Cities); + } + + /// + /// Converts from string. + /// + /// Converted string + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) + { + return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); + } + /// + /// Converts to string. + /// + /// Converted string + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) + { + if(destinationType == null) + return false; + return destinationType.Equals(typeof(string)) || base.CanConvertTo(context, destinationType); + } + + /// + /// Returns an element from a string contains its id + /// + /// An System.ComponentModel.ITypeDescriptorContext + /// that provides a format context. + /// An optional System.Globalization.CultureInfo. + /// If not supplied, the current culture is assumed. + /// string to be converted to an element + /// An element if the element exists, otherwise null + public override object? ConvertFrom(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) + { + string? text = value as string; + if(Cities == null) + return null; + if (!string.IsNullOrEmpty(text)) + { + foreach (City city in Cities) + { + if (city.Name == text) + return city; + } + } + return base.ConvertFrom(context, culture, value); + } + /// + /// Returns element name. + /// returns empty string if value is null or Element.Name throws an exception. + /// + /// An ITypeDescriptorContext that provides a format context. + /// A CultureInfo. If null is passed, the current culture is assumed. + /// The Object to convert. + /// The Type to convert the value parameter to. + /// Converted string + public override object? ConvertTo(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, Type destinationType) + { + if (destinationType == null) + { + throw new ArgumentNullException("destinationType"); + } + if (destinationType == typeof(string)) + { + if (value == null) return UserDefined; + City? city = value as City; + if (city != null) + return city.Name; + else + return null; + } + return base.ConvertTo(context, culture, value, destinationType); + } + #endregion + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/ConstructionWrapperConverter.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/ConstructionWrapperConverter.cs new file mode 100644 index 00000000..9162e998 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/ConstructionWrapperConverter.cs @@ -0,0 +1,147 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Autodesk.Revit.DB; +using ConstructionType = Autodesk.Revit.DB.Analysis.ConstructionType; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Converter for ConstructionWrapper + /// + public class ConstructionWrapperConverter : TypeConverter + { + #region Methods + /// + /// Returns whether this object supports a standard set of values that can be + /// picked from a list, using the specified context. + /// + /// true + public override bool GetStandardValuesSupported(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns whether the collection of standard values returned from System.ComponentModel.TypeConverter.GetStandardValues() + /// is an exclusive list. + /// + /// true + public override bool GetStandardValuesExclusive(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns a collection of standard values from the default context for the + /// data type this type converter is designed for. + /// + /// ConstructionWrapper collection depends on current context + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext? context) + { + List list = new List(); + // convert property name to ConstructionType + + string? tmp = context?.PropertyDescriptor.Name; + string tmp2 = string.Empty; + if(tmp != null) + { + tmp2 = tmp; + } + ConstructionType constructionType = (ConstructionType)Enum.Parse(typeof(ConstructionType),tmp2); + // convert instance to MEPBuildingConstructionWrapper + MEPBuildingConstructionWrapper? mEPBuildingConstruction = context?.Instance as MEPBuildingConstructionWrapper; + + // get all Constructions from MEPBuildingConstructionWrapper and add them to a list + if(mEPBuildingConstruction != null) + { + foreach (Construction con in mEPBuildingConstruction.GetConstructions(constructionType)) + { + list.Add(new ConstructionWrapper(con)); + } + + } + + + // sort the list + list.Sort(); + return new StandardValuesCollection(list); + } + + /// + /// Can convert from string + /// + /// An ITypeDescriptorContext that provides a format context. + /// A Type that represents the type you want to convert from. + /// true if sourceType is string, otherwise false + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) + { + return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); + } + + /// + /// Can be converted to string + /// + /// true if destinationType is string, otherwise false + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) + { + if(destinationType == null) + { + return false; + } + return destinationType.Equals(typeof(System.String)) || base.CanConvertTo(context, destinationType); + } + + /// + /// Returns a ConstructionWrapper from a string + /// + /// An System.ComponentModel.ITypeDescriptorContext + /// that provides a format context. + /// An optional System.Globalization.CultureInfo. + /// If not supplied, the current culture is assumed. + /// string to be converted to + /// A ConstructionWrapper from the StandardValues + public override object? ConvertFrom(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) + { + string? text = value as string; + if (!string.IsNullOrEmpty(text)) + { + foreach (ConstructionWrapper con in this.GetStandardValues(context)) + { + if (con.Name == text) + { + return con; + } + } + } + return base.ConvertFrom(context, culture, value); + } + + /// + /// Convert object to string + /// + /// An ITypeDescriptorContext that provides a format context. + /// A CultureInfo. If null is passed, the current culture is assumed. + /// The Object to convert. + /// The Type to convert the value parameter to. + /// empty string if current construction is null, otherwise construction name + public override object? ConvertTo(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, Type destinationType) + { + if (destinationType == null) + { + throw new ArgumentNullException("destinationType"); + } + if (destinationType == typeof(string)) + { + if (value == null) return string.Empty; + ConstructionWrapper? construction = value as ConstructionWrapper; + if (construction != null) + { + return construction.Name; + } + } + return base.ConvertTo(context, culture, value, destinationType); + } + #endregion + }; +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/Converters.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/Converters.cs new file mode 100644 index 00000000..00d4e28e --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/Converters.cs @@ -0,0 +1,82 @@ +// +// (C) Copyright 2003-2009 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.ComponentModel; +using System.Collections.Generic; +using System.Reflection; +using Autodesk.Revit; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Type converter for wrapper classes + /// + public class WrapperConverter : ExpandableObjectConverter + { + #region Methods + /// + /// Can be converted to string + /// + /// true if destinationType is string, otherwise false + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) + { + if(destinationType == null) + { + return false; + } + return destinationType.Equals(typeof(System.String)) || base.CanConvertTo(context, destinationType); + } + + /// + /// Converts to string. If value is null, convert it to "(null)". + /// if value has a "Name" property, returns its name. otherwise, returns "(...)". + /// + /// Converted string + public override object? ConvertTo(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, Type destinationType) + { + if (destinationType == null) + { + throw new ArgumentNullException("destinationType"); + } + if (destinationType == typeof(string)) + { + if (value == null) return "(null)"; + + // get its name + Type type = value.GetType(); + string wrapperType = type.ToString(); + MethodInfo? mi = type.GetMethod("get_Name", new Type[0]); + if (mi != null) + { + return mi.Invoke(value, new object[0])?.ToString(); + } + + // if no name + return "(...)"; + } + return base.ConvertTo(context, culture, value, destinationType); + } + #endregion + }; +} + diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/ElementIdConverter.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/ElementIdConverter.cs new file mode 100644 index 00000000..c2916de3 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/ElementIdConverter.cs @@ -0,0 +1,140 @@ +using System; +using System.ComponentModel; +using System.Linq; +using Autodesk.Revit.DB; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Convert ElementIds with string + /// + /// Element Type + public class ElementIdConverter : TypeConverter where T: Element + { + /// + /// Returns whether this object supports a standard set of values that can be + /// picked from a list, using the specified context. + /// + /// true + public override bool GetStandardValuesSupported(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns whether the collection of standard values returned from System.ComponentModel.TypeConverter.GetStandardValues() + /// is an exclusive list. + /// + /// true + public override bool GetStandardValuesExclusive(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns a collection of standard values from the default context for the + /// data type this type converter is designed for. + /// + /// Element collection retrieved through filtering current Revit document elements + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext? context) + { + // using type filter to get the target type objects + //Autodesk.Revit.DB.TypeFilter typeFilter = RevitStartInfo.RevitApp.Create.Filter.NewTypeFilter(targetType, true); + //ElementIterator elementIterator = RevitStartInfo.RevitDoc.get_Elements(typeFilter); + + //// create a list + //List list = new List(); + //elementIterator.Reset(); + //while (elementIterator.MoveNext()) + //{ + // list.Add(elementIterator.Current as Element); + //} + var list = new FilteredElementCollector(RevitStartInfo.RevitDoc).OfClass(typeof(T)); + + return new StandardValuesCollection(list.ToElementIds().ToList()); + } + + /// + /// Converts from string. + /// + /// Converted string + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) + { + return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); + } + /// + /// Converts to string. + /// + /// Converted string + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) + { + if(destinationType == null) + return false; + return destinationType.Equals(typeof(string)) || base.CanConvertTo(context, destinationType); + } + + /// + /// Returns an element from a string contains its id + /// + /// An System.ComponentModel.ITypeDescriptorContext + /// that provides a format context. + /// An optional System.Globalization.CultureInfo. + /// If not supplied, the current culture is assumed. + /// string to be converted to an element + /// An element if the element exists, otherwise null + public override object? ConvertFrom(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) + { + string? text = value as string; + if (!string.IsNullOrEmpty(text)) + { + StandardValuesCollection svc = GetStandardValues(context); + foreach (ElementId elementId in svc) + { + Element? element = RevitStartInfo.GetElement(elementId); + if (element?.Name == text) + return element.Id; + } + } + return base.ConvertFrom(context, culture, value); + } + /// + /// Returns element name. + /// returns empty string if value is null or Element.Name throws an exception. + /// + /// An ITypeDescriptorContext that provides a format context. + /// A CultureInfo. If null is passed, the current culture is assumed. + /// The Object to convert. + /// The Type to convert the value parameter to. + /// Converted string + public override object? ConvertTo(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, Type destinationType) + { + if (destinationType == null) + { + throw new ArgumentNullException("destinationType"); + } + if (destinationType == typeof(string)) + { + if (value == null) return string.Empty; + ElementId? elementId = value as ElementId; + if (elementId != null) + { + Element? element = RevitStartInfo.GetElement(elementId); + if (element != null) + { + string elementName = string.Empty; + try + { + elementName = element.Name; + } + catch + { + } + return elementName; + } + } + + } + return base.ConvertTo(context, culture, value, destinationType); + } + }; +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/ProjectLocationConverter.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/ProjectLocationConverter.cs new file mode 100644 index 00000000..4f332dfc --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/ProjectLocationConverter.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Autodesk.Revit.DB; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Converts ProjectLocation with string + /// + public class ProjectLocationConverter: TypeConverter + { + /// + /// All project locations in current document + /// + public static List? ProjectLocations; + /// + /// User defined location + /// + public const string UserDefined = "User Defined"; + + /// + /// Initialize ProjectLocations + /// + static ProjectLocationConverter() + { + if(RevitStartInfo.RevitDoc == null) + return; + ProjectLocations = new List(); + foreach (ProjectLocation city in RevitStartInfo.RevitDoc.ProjectLocations) + { + ProjectLocations.Add(city); + } + } + + #region Methods + + /// + /// Returns whether this object supports a standard set of values that can be + /// picked from a list, using the specified context. + /// + /// true + public override bool GetStandardValuesSupported(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns whether the collection of standard values returned from System.ComponentModel.TypeConverter.GetStandardValues() + /// is an exclusive list. + /// + /// true + public override bool GetStandardValuesExclusive(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns a collection of standard values from the default context for the + /// data type this type converter is designed for. + /// + /// Element collection retrieved through filtering current Revit document elements + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext? context) + { + return new StandardValuesCollection(ProjectLocations); + } + + /// + /// Converts from string. + /// + /// Converted string + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) + { + return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); + } + /// + /// Converts to string. + /// + /// Converted string + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) + { + if(destinationType == null) + { + return false; + } + return destinationType.Equals(typeof(string)) || base.CanConvertTo(context, destinationType); + } + + /// + /// Converts from string. + /// + /// An System.ComponentModel.ITypeDescriptorContext + /// that provides a format context. + /// An optional System.Globalization.CultureInfo. + /// If not supplied, the current culture is assumed. + /// string to be converted to an element + /// An element if the element exists, otherwise null + public override object? ConvertFrom(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) + { + string? text = value as string; + if(ProjectLocations == null) + return base.ConvertFrom(context, culture, value); + if (!string.IsNullOrEmpty(text)) + { + foreach (ProjectLocation projectLocation in ProjectLocations) + { + if (projectLocation.Name == text) + return projectLocation; + } + } + return base.ConvertFrom(context, culture, value); + } + /// + /// Converts to string. + /// + /// An ITypeDescriptorContext that provides a format context. + /// A CultureInfo. If null is passed, the current culture is assumed. + /// The Object to convert. + /// The Type to convert the value parameter to. + /// Converted string + public override object? ConvertTo(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, Type destinationType) + { + if (destinationType == null) + { + throw new ArgumentNullException("destinationType"); + } + if (destinationType == typeof(string)) + { + if (value == null) return UserDefined; + ProjectLocation? projectLocation = value as ProjectLocation; + if (projectLocation != null) + return projectLocation.Name; + else + return null; + } + return base.ConvertTo(context, culture, value, destinationType); + } + #endregion + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/RevitEnumConverter.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/RevitEnumConverter.cs new file mode 100644 index 00000000..33836d14 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/RevitEnumConverter.cs @@ -0,0 +1,236 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Converter for Enumeration types of RevitAPI + /// + public abstract class RevitEnumConverter : EnumConverter + { + #region Fields + /// + /// Dictionary contains enum and string map + /// + Dictionary? m_map = null; + #endregion + + #region Properties + /// + /// Gets the enum-string map + /// + protected abstract Dictionary EnumMap + { + get; + } + #endregion + + #region Constructors + /// + /// Initialize private variables + /// + /// Enumeration type + public RevitEnumConverter(Type type) + : base(type) + { + m_map = EnumMap; + } + #endregion + + #region Methods + /// + /// Returns a collection of standard values from the default context for the + /// data type this type converter is designed for. + /// + /// All enum items + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext? context) + { + return new StandardValuesCollection(m_map?.Keys); + } + + /// + /// Returns an enum item from a string + /// + /// An System.ComponentModel.ITypeDescriptorContext + /// that provides a format context. + /// An optional System.Globalization.CultureInfo. + /// If not supplied, the current culture is assumed. + /// string to be converted to + /// An enum item + public override object? ConvertFrom(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value) + { + object enumValue = value; + string? valueText = value.ToString(); + if(m_map == null) + return base.ConvertFrom(context, culture, enumValue); + foreach (KeyValuePair pair in m_map) + { + if (pair.Value == valueText) + { + string? tmp = pair.Key.ToString(); + if(tmp != null) + enumValue = tmp; + } + } + return base.ConvertFrom(context, culture, enumValue); + } + + /// + /// Convert enum item to string + /// + /// An ITypeDescriptorContext that provides a format context. + /// A CultureInfo. If null is passed, the current culture is assumed. + /// The Object to convert. + /// The Type to convert the value parameter to. + /// Corresponding string related with the enum item + public override object? ConvertTo(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, Type destinationType) + { + object? enumValue = base.ConvertTo(context, culture, value, destinationType); + string? tmp = enumValue?.ToString(); + if(tmp == null || m_map == null) + { + return null; + } + object enumObject = Enum.Parse(this.EnumType, tmp); + return m_map[enumObject]; + } + #endregion + }; + + /// + /// Converter for BuildingType + /// + public class BuildingTypeConverter : RevitEnumConverter + { + #region Constructors + /// + /// Constructor + /// + /// enumeration type + public BuildingTypeConverter(Type type) : base(type) { } + #endregion + + #region Properties + /// + /// Gets the enum-string map + /// + protected override Dictionary EnumMap + { + get + { + return RevitStartInfo.BuildingTypeMap; + } + } + #endregion + }; + + /// + /// Converter for ExportComplexityConverter + /// + public class ExportComplexityConverter : RevitEnumConverter + { + #region Constructors + /// + /// Constructor + /// + /// enumeration type + public ExportComplexityConverter(Type type) : base(type) { } + #endregion + + #region Properties + /// + /// Gets the enum-string map + /// + protected override Dictionary EnumMap + { + get + { + return RevitStartInfo.ExportComplexityMap; + } + } + #endregion + }; + + /// + /// Converter for ServiceType + /// + public class ServiceTypeConverter : RevitEnumConverter + { + #region Constructors + /// + /// Constructor + /// + /// enumeration type + public ServiceTypeConverter(Type type) : base(type) { } + #endregion + + #region Properties + /// + /// Gets the enum-string map + /// + protected override Dictionary EnumMap + { + get + { + return RevitStartInfo.ServiceTypeMap; + } + } + #endregion + }; + + /// + /// Converter for HVACLoadLoadsReportType + /// + public class HVACLoadLoadsReportTypeConverter : RevitEnumConverter + { + #region Constructors + /// + /// Constructor + /// + /// enumeration type + public HVACLoadLoadsReportTypeConverter(Type type) : base(type) { } + #endregion + + #region Properties + /// + /// Gets the enum-string map + /// + protected override Dictionary EnumMap + { + get + { + return RevitStartInfo.HVACLoadLoadsReportTypeMap; + } + } + #endregion + }; + + /// + /// Converter for HVACLoadConstructionClass + /// + public class HVACLoadConstructionClassConverter : RevitEnumConverter + { + #region Constructors + /// + /// Constructor + /// + /// enumeration type + public HVACLoadConstructionClassConverter(Type type) : base(type) { } + #endregion + + #region Properties + /// + /// Gets the enum-string map + /// + protected override Dictionary EnumMap + { + get + { + return RevitStartInfo.HVACLoadConstructionClassMap; + } + } + #endregion + }; + +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/TimeZoneConverter.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/TimeZoneConverter.cs new file mode 100644 index 00000000..fd6f9f69 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Converters/TimeZoneConverter.cs @@ -0,0 +1,42 @@ +using System.ComponentModel; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Converter used to convert TimeZone + /// + public class TimeZoneConverter : TypeConverter + { + #region Methods + /// + /// Returns whether this object supports a standard set of values that can be + /// picked from a list, using the specified context. + /// + /// true + public override bool GetStandardValuesSupported(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns whether the collection of standard values returned from System.ComponentModel.TypeConverter.GetStandardValues() + /// is an exclusive list. + /// + /// true + public override bool GetStandardValuesExclusive(ITypeDescriptorContext? context) + { + return true; + } + + /// + /// Returns a collection of standard values from the default context for the + /// data type this type converter is designed for. + /// + /// Element collection retrieved through filtering current Revit document elements + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext? context) + { + return new StandardValuesCollection(RevitStartInfo.TimeZones); + } + #endregion + }; +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/ProjectInfoForm.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/ProjectInfoForm.Designer.cs new file mode 100644 index 00000000..1b450639 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/ProjectInfoForm.Designer.cs @@ -0,0 +1,118 @@ +// +// (C) Copyright 2003-2010 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + partial class ProjectInfoForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.okButton = new System.Windows.Forms.Button(); + this.cancelButton = new System.Windows.Forms.Button(); + this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); + this.SuspendLayout(); + // + // okButton + // + this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.okButton.Location = new System.Drawing.Point(265, 384); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 0; + this.okButton.Text = "&OK"; + this.okButton.UseVisualStyleBackColor = true; + // + // cancelButton + // + this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(346, 384); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(75, 23); + this.cancelButton.TabIndex = 1; + this.cancelButton.Text = "&Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + // + // propertyGrid1 + // + this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.propertyGrid1.HelpVisible = false; + this.propertyGrid1.Location = new System.Drawing.Point(12, 12); + this.propertyGrid1.Name = "propertyGrid1"; + this.propertyGrid1.Size = new System.Drawing.Size(409, 366); + this.propertyGrid1.TabIndex = 2; + // + // ProjectInfoForm + // + this.AcceptButton = this.okButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelButton; + this.ClientSize = new System.Drawing.Size(433, 419); + this.Controls.Add(this.propertyGrid1); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.okButton); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ProjectInfoForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.Text = "Project Information"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button okButton; + private System.Windows.Forms.Button cancelButton; + private System.Windows.Forms.PropertyGrid propertyGrid1; + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/ProjectInfoForm.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/ProjectInfoForm.cs new file mode 100644 index 00000000..c8633085 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/ProjectInfoForm.cs @@ -0,0 +1,68 @@ +// +// (C) Copyright 2003-2010 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Form used to display project information + /// + public partial class ProjectInfoForm : System.Windows.Forms.Form + { + #region Fields + /// + /// Wrapper for ProjectInfo + /// + ProjectInfoWrapper? m_projectInfoWrapper = null; + #endregion + + #region Constructors + /// + /// Initialize component + /// + public ProjectInfoForm() + { + InitializeComponent(); + } + + /// + /// Initialize PropertyGrid + /// + /// ProjectInfo wrapper + public ProjectInfoForm(ProjectInfoWrapper projectInfoWrapper) + :this() + { + m_projectInfoWrapper = projectInfoWrapper; + + // Initialize propertyGrid with CustomDescriptor + propertyGrid1.SelectedObject = new WrapperCustomDescriptor(m_projectInfoWrapper); + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/ProjectInfoForm.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/ProjectInfoForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/ProjectInfoForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/RevitStartInfo.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/RevitStartInfo.cs new file mode 100644 index 00000000..7401ea90 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/RevitStartInfo.cs @@ -0,0 +1,262 @@ +using System; +using System.Collections.Generic; + +using Autodesk.Revit; +using Autodesk.Revit.ApplicationServices; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Analysis; + +/// +/// Preserves global information +/// +public static class RevitStartInfo +{ + #region Fields + /// + /// Current Revit application + /// + public static Autodesk.Revit.ApplicationServices.Application? RevitApp; + + /// + /// Active Revit document + /// + public static Document? RevitDoc; + + /// + /// Current Revit Product + /// + public static ProductType RevitProduct; + + /// + /// Time Zone Array + /// + public static string[] TimeZones; + + /// + /// BuildingType and its display string map. + /// + public static Dictionary BuildingTypeMap; + + /// + /// ServiceType and its display string map. + /// + public static Dictionary ServiceTypeMap; + + /// + /// ExportComplexity and its display string map. + /// + public static Dictionary ExportComplexityMap; + + /// + /// HVACLoadLoadsReportType and its display string map. + /// + public static Dictionary HVACLoadLoadsReportTypeMap; + + /// + /// HVACLoadConstructionClass and its display string map. + /// + public static Dictionary HVACLoadConstructionClassMap; + + /// + /// Initialize some static members + /// + static RevitStartInfo() + { + #region TimeZones + TimeZones = new string[]{ + "(GMT-12:00) International Date Line West", + "(GMT-11:00) Midway Island, Samoa", + "(GMT-10:00) Hawaii", + "(GMT-09:00) Alaska", + "(GMT-08:00) Pacific Time (US/Canada)", + "(GMT-08:00) Tijuana, Baja California", + "(GMT-07:00) Arizona", + "(GMT-07:00) Chihuahua, La Paz, Mazatlan - New", + "(GMT-07:00) Chihuahua, La Paz, Mazatlan - Old", + "(GMT-07:00) Mountain Time (US/Canada)", + "(GMT-06:00) Central America", + "(GMT-06:00) Central Time (US/Canada)", + "(GMT-06:00) Guadalajara, Mexico City, Monterrey - New", + "(GMT-06:00) Guadalajara, Mexico City, Monterrey - Old", + "(GMT-06:00) Saskatchewan", + "(GMT-05:00) Bogota, Lima, Quito, Rio Branco", + "(GMT-05:00) Eastern Time (US/Canada)", + "(GMT-05:00) Indiana (East)", + "(GMT-04:00) Atlantic Time (Canada)", + "(GMT-04:00) Caracas, La Paz", + "(GMT-04:00) Santiago", + "(GMT-03:30) Newfoundland", + "(GMT-03:00) Brazilia", + "(GMT-03:00) Buanos Aires, Georgetown", + "(GMT-03:00) Greenland", + "(GMT-03:00) Montevideo", + "(GMT-02:00) Mid-Atlantic", + "(GMT-01:00) Azores", + "(GMT-01:00) Cape Verde Is.", + "(GMT) Casablanca, Monrovia,Reykjavik", + "(GMT) Greenwich Time: Dublin, Edinburgh, Lisbon, London", + "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna", + "(GMT+01:00) Belgrade, Brastislava, Budapest, Ljubljana, Prague", + "(GMT+01:00) Brussels, Copenhagen, Madrid, Paris", + "(GMT+01:00) Sarajevo, Skopje, Sofija, Vilnus, Warsaw, Zagreb", + "(GMT+01:00) West Central Africa", + "(GMT+02:00) Amman", + "(GMT+02:00) Athens, Bucharest, Istanbul", + "(GMT+02:00) Beirut", + "(GMT+02:00) Cairo", + "(GMT+02:00) Harare, Pretoria", + "(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius", + "(GMT+02:00) Jerusalem", + "(GMT+02:00) Minsk", + "(GMT+02:00) Windhoek", + "(GMT+03:00) Baghdad", + "(GMT+03:00) Kuwait, Riyadh", + "(GMT+03:00) Moscow, St. Petersburg, Volgograd", + "(GMT+03:00) Nairobi", + "(GMT+03:00) Tbilisi", + "(GMT+03:00) Tehran", + "(GMT+04:00) Abu Dhabi, Muscat", + "(GMT+04:00) Baku", + "(GMT+04:00) Yerevan", + "(GMT+04:30) Kabul", + "(GMT+05:00) Ekaterinburg", + "(GMT+05:00) Islamabad, Karachi, Tashkent", + "(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi", + "(GMT+05:30) Sri Jayawardenepura", + "(GMT+05:45) Kathmandu ", + "(GMT+06:00) Almaty, Novosibirsk", + "(GMT+06:00) Astana, Dhaka", + "(GMT+06:30) Yangon (Rangoon)", + "(GMT+07:00) Bangkok, Hanoi, Jakarta ", + "(GMT+07:00) Krasnoyarsk ", + "(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi ", + "(GMT+08:00) Irkutsk, Ulaan Bataar ", + "(GMT+08:00) Kuala Lumpur, Singapore ", + "(GMT+08:00) Perth", + "(GMT+08:00) Taipei", + "(GMT+09:00) Osaka, Sapporo, Tokyo", + "(GMT+09:00) Seoul", + "(GMT+09:00) Yakutsk", + "(GMT+09:30) Adelaide", + "(GMT+09:30) Darwin", + "(GMT+10:00) Brisbane", + "(GMT+10:00) Canberra, Melbourne, Sydney", + "(GMT+10:00) Guam, Port Moresby", + "(GMT+10:00) Hobart", + "(GMT+10:00) Vladivostok", + "(GMT+11:00) Magadan, Solomon Is., New Caledonia ", + "(GMT+12:00) Aukland, Wellington ", + "(GMT+12:00) Fiji, Kamchatka, Marshall Is.", + "(GMT+13:00) Nubu'alofa" }; + #endregion + + #region BuildingTypeMap + BuildingTypeMap = new Dictionary(); + BuildingTypeMap.Add(gbXMLBuildingType.AutomotiveFacility, "Automotive Facility"); + BuildingTypeMap.Add(gbXMLBuildingType.ConventionCenter, "Convention Center"); + BuildingTypeMap.Add(gbXMLBuildingType.Courthouse, "Courthouse"); + BuildingTypeMap.Add(gbXMLBuildingType.DiningBarLoungeOrLeisure, "Dining Bar Lounge or Leisure"); + BuildingTypeMap.Add(gbXMLBuildingType.DiningCafeteriaFastFood, "Dining Cafeteria Fast Food"); + BuildingTypeMap.Add(gbXMLBuildingType.DiningFamily, "Dining Family"); + BuildingTypeMap.Add(gbXMLBuildingType.Dormitory, "Dormitory"); + BuildingTypeMap.Add(gbXMLBuildingType.ExerciseCenter, "Exercise Center"); + BuildingTypeMap.Add(gbXMLBuildingType.FireStation, "Fire Station"); + BuildingTypeMap.Add(gbXMLBuildingType.Gymnasium, "Gymnasium"); + BuildingTypeMap.Add(gbXMLBuildingType.HospitalOrHealthcare, "Hospital or Healthcare"); + BuildingTypeMap.Add(gbXMLBuildingType.Hotel, "Hotel"); + BuildingTypeMap.Add(gbXMLBuildingType.Library, "Library"); + BuildingTypeMap.Add(gbXMLBuildingType.Manufacturing, "Manufacturing"); + BuildingTypeMap.Add(gbXMLBuildingType.Motel, "Motel"); + BuildingTypeMap.Add(gbXMLBuildingType.MotionPictureTheatre, "Motion Picture Theatre"); + BuildingTypeMap.Add(gbXMLBuildingType.MultiFamily, "Multi Family"); + BuildingTypeMap.Add(gbXMLBuildingType.Museum, "Museum"); + BuildingTypeMap.Add(gbXMLBuildingType.NoOfBuildingTypes, "None"); + BuildingTypeMap.Add(gbXMLBuildingType.Office, "Office"); + BuildingTypeMap.Add(gbXMLBuildingType.ParkingGarage, "Parking Garage"); + BuildingTypeMap.Add(gbXMLBuildingType.Penitentiary, "Penitentiary"); + BuildingTypeMap.Add(gbXMLBuildingType.PerformingArtsTheater, "Performing Arts Theater"); + BuildingTypeMap.Add(gbXMLBuildingType.PoliceStation, "Police Station"); + BuildingTypeMap.Add(gbXMLBuildingType.PostOffice, "Post Office"); + BuildingTypeMap.Add(gbXMLBuildingType.ReligiousBuilding, "Religious Building"); + BuildingTypeMap.Add(gbXMLBuildingType.Retail, "Retail"); + BuildingTypeMap.Add(gbXMLBuildingType.SchoolOrUniversity, "School or University"); + BuildingTypeMap.Add(gbXMLBuildingType.SingleFamily, "Single Family"); + BuildingTypeMap.Add(gbXMLBuildingType.SportsArena, "Sports Arena"); + BuildingTypeMap.Add(gbXMLBuildingType.TownHall, "Town Hall"); + BuildingTypeMap.Add(gbXMLBuildingType.Transportation, "Transportation"); + BuildingTypeMap.Add(gbXMLBuildingType.Warehouse, "Warehouse"); + BuildingTypeMap.Add(gbXMLBuildingType.Workshop, "Workshop"); + #endregion + + #region ServiceTypeMap + ServiceTypeMap = new Dictionary(); + ServiceTypeMap.Add(gbXMLServiceType.ActiveChilledBeams, "Active Chilled Beams"); + ServiceTypeMap.Add(gbXMLServiceType.CentralHeatingConvectors, "Central Heating: Convectors"); + ServiceTypeMap.Add(gbXMLServiceType.CentralHeatingHotAir, "Central Heating: Hot Air"); + ServiceTypeMap.Add(gbXMLServiceType.CentralHeatingRadiantFloor, "Central Heating: Radiant Floor"); + ServiceTypeMap.Add(gbXMLServiceType.CentralHeatingRadiators, "Central Heating: Radiators"); + ServiceTypeMap.Add(gbXMLServiceType.ConstantVolumeDualDuct, "Constant Volume - Dual Duct"); + ServiceTypeMap.Add(gbXMLServiceType.ConstantVolumeFixedOA, "Constant Volume - Fixed OA"); + ServiceTypeMap.Add(gbXMLServiceType.ConstantVolumeTerminalReheat, "Constant Volume - Terminal Reheat"); + ServiceTypeMap.Add(gbXMLServiceType.ConstantVolumeVariableOA, "Constant Volume - Variable OA"); + ServiceTypeMap.Add(gbXMLServiceType.FanCoilSystem, "Fan Coil System"); + ServiceTypeMap.Add(gbXMLServiceType.ForcedConvectionHeaterFlue, "Forced Convection Heater - Flue"); + ServiceTypeMap.Add(gbXMLServiceType.ForcedConvectionHeaterNoFlue, "Forced Convection Heater - No Flue"); + ServiceTypeMap.Add(gbXMLServiceType.InductionSystem, "Induction System"); + ServiceTypeMap.Add(gbXMLServiceType.MultizoneHotDeckColdDeck, "Multi-zone - Hot Deck / Cold Deck"); + ServiceTypeMap.Add(gbXMLServiceType.NoServiceType, "None"); + ServiceTypeMap.Add(gbXMLServiceType.OtherRoomHeater, "Other Room Heater"); + ServiceTypeMap.Add(gbXMLServiceType.RadiantCooledCeilings, "Radiant Cooled Ceilings"); + ServiceTypeMap.Add(gbXMLServiceType.RadiantHeaterFlue, "Radiant Heater - Flue"); + ServiceTypeMap.Add(gbXMLServiceType.RadiantHeaterMultiburner, "Radiant Heater - Multi-burner"); + ServiceTypeMap.Add(gbXMLServiceType.RadiantHeaterNoFlue, "Radiant Heater - No Flue"); + ServiceTypeMap.Add(gbXMLServiceType.SplitSystemsWithMechanicalVentilation, "Split System(s) with Mechanical Ventilation"); + ServiceTypeMap.Add(gbXMLServiceType.SplitSystemsWithMechanicalVentilationWithCooling, "Split System(s) with Mechanical Ventilation with Cooling"); + ServiceTypeMap.Add(gbXMLServiceType.SplitSystemsWithNaturalVentilation, "Split System(s) with Natural Ventilation"); + ServiceTypeMap.Add(gbXMLServiceType.VariableRefrigerantFlow, "Variable Refrigerant Flow"); + ServiceTypeMap.Add(gbXMLServiceType.VAVDualDuct, "VAV - Dual Duct"); + ServiceTypeMap.Add(gbXMLServiceType.VAVIndoorPackagedCabinet, "VAV - Indoor Packaged Cabinet"); + ServiceTypeMap.Add(gbXMLServiceType.VAVSingleDuct, "VAV - Single Duct"); + ServiceTypeMap.Add(gbXMLServiceType.VAVTerminalReheat, "VAV - Terminal Reheat"); + ServiceTypeMap.Add(gbXMLServiceType.WaterLoopHeatPump, "Water Loop Heat Pump"); + #endregion + + #region ExportComplexityMap + ExportComplexityMap = new Dictionary(); + ExportComplexityMap.Add(gbXMLExportComplexity.Complex, "Complex"); + ExportComplexityMap.Add(gbXMLExportComplexity.ComplexWithMullionsAndShadingSurfaces, "Complex With Mullions And Shading Surfaces"); + ExportComplexityMap.Add(gbXMLExportComplexity.ComplexWithShadingSurfaces, "Complex With Shading Surfaces"); + ExportComplexityMap.Add(gbXMLExportComplexity.Simple, "Simple"); + ExportComplexityMap.Add(gbXMLExportComplexity.SimpleWithShadingSurfaces, "Simple With Shading Surfaces"); + #endregion + + #region HVACLoadLoadsReportTypeMap + HVACLoadLoadsReportTypeMap = new Dictionary(); + HVACLoadLoadsReportTypeMap.Add(HVACLoadLoadsReportType.DetailedReport, "Detailed"); + HVACLoadLoadsReportTypeMap.Add(HVACLoadLoadsReportType.NoReport, "No"); + HVACLoadLoadsReportTypeMap.Add(HVACLoadLoadsReportType.SimpleReport, "Simple"); + HVACLoadLoadsReportTypeMap.Add(HVACLoadLoadsReportType.StandardReport, "Standard"); + #endregion + + #region HVACLoadConstructionClassMap + HVACLoadConstructionClassMap = new Dictionary(); + HVACLoadConstructionClassMap.Add(HVACLoadConstructionClass.LooseConstruction, "Loose"); + HVACLoadConstructionClassMap.Add(HVACLoadConstructionClass.NoneConstruction, "None"); + HVACLoadConstructionClassMap.Add(HVACLoadConstructionClass.MediumConstruction, "Medium"); + HVACLoadConstructionClassMap.Add(HVACLoadConstructionClass.TightConstruction, "Tight"); + #endregion + } + #endregion + + #region Methods + public static Element? GetElement(ElementId elementId) + { + return RevitDoc?.GetElement(elementId); + } + public static Element? GetElement(Int64 elementId) + { + return GetElement(new ElementId(elementId)); + } + #endregion +}; \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/RevitVersionAttribute.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/RevitVersionAttribute.cs new file mode 100644 index 00000000..163d73e4 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/RevitVersionAttribute.cs @@ -0,0 +1,64 @@ +// +// (C) Copyright 2003-2010 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Collections.ObjectModel; +using Autodesk.Revit.ApplicationServices; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Attribute which designates Revit version names + /// + public sealed class RevitVersionAttribute : Attribute + { + #region Fields + /// + /// Revit version name array + /// + List m_products = new List(); + #endregion + + #region Properties + /// + /// Gets Revit version names + /// + public ReadOnlyCollection Names + { + get { return m_products.AsReadOnly(); } + } + #endregion + + #region Constructors + /// + /// Initializes Revit version name array + /// + /// + public RevitVersionAttribute(params ProductType[] names) + { + m_products.AddRange(names); + } + #endregion + }; +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/ConstructionWrapper.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/ConstructionWrapper.cs new file mode 100644 index 00000000..9ff47ff7 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/ConstructionWrapper.cs @@ -0,0 +1,80 @@ +using System; +using System.ComponentModel; +using Autodesk.Revit.DB; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Wrapper class for Construction + /// + [TypeConverter(typeof(ConstructionWrapperConverter))] + public class ConstructionWrapper : IComparable, IWrapper + { + #region Fields + /// + /// Construction + /// + private Construction m_construction; + #endregion + + #region Constructors + /// + /// Initializes private variables. + /// + /// Construction + public ConstructionWrapper(Construction construction) + { + m_construction = construction; + } + #endregion + + #region Properties + #region IComparable Members + + /// + /// Compares the names of Constructions. + /// + /// ConstructionWrapper used to compare + /// A 32-bit signed integer that indicates the relative order of the objects + /// being compared. The return value has these meanings: + /// Value Condition Less than zero This instance is less than value. + /// Zero This instance is equal to value. Greater than zero This instance is + /// greater than value.-or- value is null. + public int CompareTo(object? obj) + { + ConstructionWrapper? wrapper = obj as ConstructionWrapper; + if (wrapper != null) + { + return this.Name.CompareTo(wrapper.Name); + } + return 1; + } + + #endregion + + #region IWrapper Members + + /// + /// Gets the handle object. + /// + [Browsable(false)] + public object Handle + { + get { return m_construction; } + } + + /// + /// Gets the name of the handle. + /// + [Browsable(false)] + public String Name + { + get + { + return m_construction.Name; + } + } + #endregion + #endregion + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/EnergyDataSettingsWrapper.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/EnergyDataSettingsWrapper.cs new file mode 100644 index 00000000..5b8e491b --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/EnergyDataSettingsWrapper.cs @@ -0,0 +1,271 @@ +using System; +using System.ComponentModel; +using Autodesk.Revit.ApplicationServices; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Analysis; +using Autodesk.Revit.DB.Mechanical; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Wrapper class for gbXMLParamElem + /// + public class EnergyDataSettingsWrapper : IWrapper + { + #region Fields + /// + /// gbXMLParamElem + /// + private EnergyDataSettings m_energyDataSettings; + /// + /// Revit Document + /// + private Document m_document; + #endregion + + #region Constructors + /// + /// Initializes private variables. + /// + /// gbXMLParamElem + public EnergyDataSettingsWrapper(Document document) + { + m_document = document; + m_energyDataSettings = EnergyDataSettings.GetFromDocument(document); + } + #endregion + + #region Properties + + /// + /// Gets or sets Building Type + /// + [Category("Common"), DisplayName("Building Type")] + [TypeConverter(typeof(BuildingTypeConverter))] + public gbXMLBuildingType BuildingType + { + get + { + return m_energyDataSettings.BuildingType; + } + set + { + m_energyDataSettings.BuildingType = value; + } + } + + /// + /// Gets or sets Ground Plane + /// + [Category("Common"), DisplayName("Ground Plane")] + [TypeConverter(typeof(ElementIdConverter))] + public ElementId GroundPlane + { + get + { + return m_energyDataSettings.GroundPlane; + } + set + { + m_energyDataSettings.GroundPlane = value; + } + } + + /// + /// Gets or sets Building Service + /// + [Category("Detailed Model"), DisplayName("Building Service")] + [TypeConverter(typeof(ServiceTypeConverter))] + [RevitVersion(ProductType.MEP)] + public gbXMLServiceType BuildingService + { + get + { + return m_energyDataSettings.ServiceType; + } + set + { + m_energyDataSettings.ServiceType = value; + } + } + + /// + /// Gets Building Construction + /// + [Category("Detailed Model"), DisplayName("Building Construction"), TypeConverter(typeof(WrapperConverter)), RevitVersion(ProductType.MEP)] + public MEPBuildingConstructionWrapper? BuildingConstruction + { + get + { + ElementId eid = EnergyDataSettings.GetBuildingConstructionSetElementId(m_document); + MEPBuildingConstruction? mEPBuildingConstruction = RevitStartInfo.GetElement(eid) as MEPBuildingConstruction; + //MEPBuildingConstruction mEPBuildingConstruction = RevitStartInfo.GetElement(m_energyDataSettings.ConstructionSetElementId) as MEPBuildingConstruction; + if(mEPBuildingConstruction != null) + return new MEPBuildingConstructionWrapper(mEPBuildingConstruction); + return null; + } + } + + /// + /// Gets and Sets BuildingConstructionClass + /// + [Category("Detailed Model"), DisplayName("Building Infiltration Class")] + [TypeConverter(typeof(HVACLoadConstructionClassConverter))] + [RevitVersion(ProductType.MEP)] + public HVACLoadConstructionClass BuildingConstructionClass + { + get + { + return m_energyDataSettings.BuildingConstructionClass; + } + set + { + m_energyDataSettings.BuildingConstructionClass = value; + } + } + + /// + /// Gets or sets Project Phase + /// + [Category("Detailed Model"), DisplayName("Project Phase")] + [TypeConverter(typeof(ElementIdConverter))] + public ElementId ProjectPhase + { + get + { + return m_energyDataSettings.ProjectPhase; + } + set + { + m_energyDataSettings.ProjectPhase = value; + } + } + + /// + /// Gets or sets Sliver Space Tolerance + /// + [Category("Detailed Model"), DisplayName("Sliver Space Tolerance")] + public Double SliverSpaceTolerance + { + get + { + return m_energyDataSettings.SliverSpaceTolerance; + } + set + { + m_energyDataSettings.SliverSpaceTolerance = value; + } + } + + /// + /// Gets or sets Export Complexity + /// + [Category("Detailed Model"), DisplayName("Export Complexity")] + [TypeConverter(typeof(ExportComplexityConverter))] + public gbXMLExportComplexity ExportComplexity + { + get + { + return m_energyDataSettings.ExportComplexity; + } + set + { + m_energyDataSettings.ExportComplexity = value; + } + } + + /// + /// Gets or sets Export Default Values + /// + [Category("Detailed Model"), DisplayName("Export Default Values")] + [RevitVersion(ProductType.MEP)] + public bool ExportDefaultValues + { + get + { + return m_energyDataSettings.ExportDefaults; + } + set + { + m_energyDataSettings.ExportDefaults = value; + } + } + + /// + /// Gets and Sets ProjectReportType + /// + [Category("Detailed Model"), DisplayName("Report Type")] + [TypeConverter(typeof(HVACLoadLoadsReportTypeConverter))] + [RevitVersion(ProductType.MEP)] + public HVACLoadLoadsReportType ProjectReportType + { + get + { + return m_energyDataSettings.ProjectReportType; + } + set + { + m_energyDataSettings.ProjectReportType = value; + } + } + + /// + /// Gets Project Location + /// + [DisplayName("Project Location"), TypeConverter(typeof(ProjectLocationConverter)), RevitVersion(ProductType.MEP, ProductType.Architecture)] + public ProjectLocation ProjectLocation + { + get + { + return m_document.ActiveProjectLocation; + } + set + { + m_document.ActiveProjectLocation = value; + } + } + + /// + /// Gets Site Location + /// + [DisplayName("Site Location"), TypeConverter(typeof(WrapperConverter)), RevitVersion(ProductType.MEP, ProductType.Architecture)] + public SiteLocationWrapper SiteLocation + { + get + { + return new SiteLocationWrapper(m_document.SiteLocation); + } + } + + #region IWrapper Members + + /// + /// Gets the handle object. + /// + [Browsable(false)] + public object Handle + { + get + { + return m_energyDataSettings; + } + } + + /// + /// Gets the name of the handle. + /// + [Browsable(false)] + public string Name + { + get + { + return ""; + } + set + { + } + } + #endregion + #endregion + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/MEPBuildingConstructionWrapper.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/MEPBuildingConstructionWrapper.cs new file mode 100644 index 00000000..9f3bac84 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/MEPBuildingConstructionWrapper.cs @@ -0,0 +1,237 @@ +using System.Collections.Generic; +using System.ComponentModel; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Mechanical; +using ConstructionType = Autodesk.Revit.DB.Analysis.ConstructionType; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Wrapper class for MEPBuildingConstruction + /// + public class MEPBuildingConstructionWrapper : IWrapper + { + #region Fields + /// + /// MEPBuildingConstruction + /// + private MEPBuildingConstruction m_mEPBuildingConstruction; + #endregion + + #region Constructors + /// + /// Initializes private variables. + /// + /// MEPBuildingConstruction + public MEPBuildingConstructionWrapper(MEPBuildingConstruction mEPBuildingConstruction) + { + m_mEPBuildingConstruction = mEPBuildingConstruction; + } + #endregion + + #region Properties + /// + /// Gets or sets Roofs + /// + [DisplayName("Roofs")] + public ConstructionWrapper Roof + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Roof)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Roof, value.Handle as Construction); + } + } + + /// + /// Gets or sets Exterior Walls + /// + [DisplayName("Exterior Walls")] + public ConstructionWrapper ExteriorWall + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.ExteriorWall)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.ExteriorWall, value.Handle as Construction); + } + } + + /// + /// Gets or sets Interior Walls + /// + [DisplayName("Interior Walls")] + public ConstructionWrapper InteriorWall + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.InteriorWall)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.InteriorWall, value.Handle as Construction); + } + } + + /// + /// Gets or sets Ceilings + /// + [DisplayName("Ceilings")] + public ConstructionWrapper Ceiling + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Ceiling)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Ceiling, value.Handle as Construction); + } + } + + /// + /// Gets or sets Doors + /// + [DisplayName("Doors")] + public ConstructionWrapper Door + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Door)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Door, value.Handle as Construction); + } + } + + /// + /// Gets or sets Slabs + /// + [DisplayName("Slabs")] + public ConstructionWrapper Slab + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Slab)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Slab, value.Handle as Construction); + } + } + + /// + /// Gets or sets Floors + /// + [DisplayName("Floors")] + public ConstructionWrapper Floor + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Floor)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Floor, value.Handle as Construction); + } + } + + /// + /// Gets or sets Exterior Windows + /// + [DisplayName("Exterior Windows")] + public ConstructionWrapper ExteriorWindow + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.ExteriorWindow)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.ExteriorWindow, value.Handle as Construction); + } + } + + /// + /// Gets or sets Interior Windows + /// + [DisplayName("Interior Windows")] + public ConstructionWrapper InteriorWindow + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.ExteriorWindow)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.ExteriorWindow, value.Handle as Construction); + } + } + + /// + /// Gets or sets Skylights + /// + [DisplayName("Skylights")] + public ConstructionWrapper Skylight + { + get + { + return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Skylight)); + } + set + { + m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Skylight, value.Handle as Construction); + } + } + + #region IWrapper Members + + /// + /// Gets the handle object. + /// + [Browsable(false)] + public object Handle + { + get + { + return m_mEPBuildingConstruction; + } + } + + /// + /// Gets the name of the handle. + /// + [Browsable(false)] + public string Name + { + get + { + return m_mEPBuildingConstruction.Name; + } + set + { + m_mEPBuildingConstruction.Name = value; + } + } + #endregion + #endregion + + #region Methods + /// + /// Get constructions + /// + /// ConstructionType + /// Related Constructions specified by constructionTypes + public ICollection GetConstructions(ConstructionType constructionType) + { + return m_mEPBuildingConstruction.GetConstructions(constructionType); + } + #endregion + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/ProjectInfoWrapper.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/ProjectInfoWrapper.cs new file mode 100644 index 00000000..2f38fa15 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/ProjectInfoWrapper.cs @@ -0,0 +1,157 @@ +using System; +using System.ComponentModel; +using Autodesk.Revit.ApplicationServices; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Wrapper class for ProjectInfo + /// + public class ProjectInfoWrapper : IWrapper + { + #region Fields + /// + /// ProjectInfo + /// + private Autodesk.Revit.DB.ProjectInfo m_projectInfo; + #endregion + + #region Constructors + /// + /// Initializes private variables. + /// + /// ProjectInfo + public ProjectInfoWrapper(Autodesk.Revit.DB.ProjectInfo projectInfo) + { + m_projectInfo = projectInfo; + } + #endregion + + #region Properties + /// + /// Gets gbXMLSettings + /// + [Category("Energy Analysis"), DisplayName("Energy Settings")] + [TypeConverter(typeof(WrapperConverter))] + [RevitVersion(ProductType.MEP, ProductType.Architecture)] + public ICustomTypeDescriptor EnergyDataSettings + { + get + { + return new WrapperCustomDescriptor(new EnergyDataSettingsWrapper(m_projectInfo.Document)); + } + } + + /// + /// Gets or sets Project Issue Data + /// + [Category("Other"), DisplayName("Project Issue Data")] + public String IssueDate + { + get + { + return m_projectInfo.IssueDate; + } + set + { + m_projectInfo.IssueDate = value; + } + } + + /// + /// Gets or sets Project Status + /// + [Category("Other"), DisplayName("Project Status")] + public String Status + { + get + { + return m_projectInfo.Status; + } + set + { + m_projectInfo.Status = value; + } + } + + /// + /// Gets or sets Client Name + /// + [Category("Other"), DisplayName("Client Name")] + public String ClientName + { + get + { + return m_projectInfo.ClientName; + } + set + { + m_projectInfo.ClientName = value; + } + } + + /// + /// Gets or sets Project Address + /// + [Category("Other"), DisplayName("Project Address")] + public String Address + { + get + { + return m_projectInfo.Address; + } + set + { + m_projectInfo.Address = value; + } + } + + /// + /// Gets or sets Project Number + /// + [Category("Other"), DisplayName("Project Number")] + public String Number + { + get + { + return m_projectInfo.Number; + } + set + { + m_projectInfo.Number = value; + } + } + + #region IWrapper Members + + /// + /// Gets the handle object. + /// + [Browsable(false)] + public object Handle + { + get + { + return m_projectInfo; + } + } + + /// + /// Gets the name of the handle. + /// + [Category("Other"), DisplayName("Project Name")] + public String Name + { + get + { + return m_projectInfo.Name; + } + set + { + m_projectInfo.Name = value; + } + } + #endregion + #endregion + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/SiteLocationWrapper.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/SiteLocationWrapper.cs new file mode 100644 index 00000000..bde374b6 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/SiteLocationWrapper.cs @@ -0,0 +1,186 @@ +using System; +using System.ComponentModel; +using Autodesk.Revit.DB; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// Wrapper class for SiteLocation + /// + public class SiteLocationWrapper : IWrapper + { + #region Fields + /// + /// SiteLocation + /// + private SiteLocation m_siteLocation; + #endregion + + #region Constructors + /// + /// Initializes private variables. + /// + /// + public SiteLocationWrapper(SiteLocation siteLocation) + { + m_siteLocation = siteLocation; + //m_citys = RevitStartInfo.RevitApp.Cities; + } + #endregion + + #region Properties + /// + /// Gets or sets TimeZone + /// + [DisplayName("Time Zone"), TypeConverter(typeof(TimeZoneConverter))] + public String? TimeZone + { + get + { + return GetTimeZoneFromDouble(m_siteLocation.TimeZone); + } + //set + //{ + // m_siteLocation.TimeZone = GetTimeZoneFromString(value); + //} + } + + /// + /// Gets or sets Longitude + /// + [DisplayName("Longitude"), TypeConverter(typeof(AngleConverter))] + public double Longitude + { + get + { + return m_siteLocation.Longitude; + } + set + { + m_siteLocation.Longitude = value; + } + } + + /// + /// Gets or sets Latitude + /// + [DisplayName("Latitude"), TypeConverter(typeof(AngleConverter))] + public double Latitude + { + get + { + return m_siteLocation.Latitude; + } + set + { + m_siteLocation.Latitude = value; + } + } + + [DisplayName("City"), TypeConverter(typeof(CityConverter))] + public City? City + { + get + { + return GetCityFromPosition(Latitude, Longitude); + } + set + { + if(value == null) + { + return; + } + m_siteLocation.Latitude = value.Latitude; + m_siteLocation.Longitude = value.Longitude; + m_siteLocation.TimeZone = value.TimeZone; + } + } + + private City? GetCityFromPosition(double latitude, double longitude) + { + if(RevitStartInfo.RevitApp == null) + { + return null; + } + foreach (City city in RevitStartInfo.RevitApp.Cities) + { + if (DoubleEquals(city.Latitude, latitude) && DoubleEquals(city.Longitude, longitude)) + return city; + } + return null; + } + + public static bool DoubleEquals(double x, double y) + { + return Math.Abs(x - y) < 1E-9; + } + + #region IWrapper Members + + /// + /// Gets the handle object. + /// + [Browsable(false)] + public object Handle + { + get { return m_siteLocation; } + } + + /// + /// Gets the name of the handle. + /// + [Browsable(false)] + public String Name + { + get + { + return m_siteLocation.Name; + } + set + { + m_siteLocation.Name = value; + } + } + #endregion + + #endregion + + #region Methods + + /// + /// Get time zone double value from time zone string + /// + /// time zone string + /// the value of time zone + private double GetTimeZoneFromString(string value) + { + //i.e. convert "(GMT-12:00) International Date Line West" to 12.0 + //i.e. convert "(GMT-03:30) Newfoundland" to 3.30 + string timeZoneDouble = value.Substring(4, value.IndexOf(')') - 4).Replace(':', '.').Trim(); + if (string.IsNullOrEmpty(timeZoneDouble)) + return 0d; + else + return Double.Parse(timeZoneDouble); + } + + /// + /// Get time zone display string from time zone value + /// + /// zone value + /// display string + private string? GetTimeZoneFromDouble(double timeZone) + { + // e.g. get "(GMT-04:00) Santiago" from double number 4.0 + // should find the last one who matches the time zone + string? lastTimeZone = null; + foreach (string tmpTimeZone in RevitStartInfo.TimeZones) + { + object tmpZone = this.GetTimeZoneFromString(tmpTimeZone); + if ((double)tmpZone == timeZone) + lastTimeZone = tmpTimeZone; + } + return lastTimeZone; + } + #endregion + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/WrapperCustomDescriptor.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/WrapperCustomDescriptor.cs new file mode 100644 index 00000000..0d67119a --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/WrapperCustomDescriptor.cs @@ -0,0 +1,253 @@ +// +// (C) Copyright 2003-2009 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.ComponentModel; +using System.Reflection; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// + /// + public class WrapperCustomDescriptor : ICustomTypeDescriptor, IWrapper + { + #region Fields + /// + /// Handle object + /// + object m_handle = new object() ; + #endregion + + #region Constructors + /// + /// Initializes handle object + /// + /// Handle object + public WrapperCustomDescriptor(object handle) + { + m_handle = handle; + } + #endregion + + #region Properties + + /// + /// Gets handle object + /// + public object Handle + { + get { return m_handle; } + } + + /// + /// Gets the name of the handle object if it has the Name property, + /// otherwise returns Handle.ToString(). + /// + public string Name + { + get + { + MethodInfo? mi = this.Handle.GetType().GetMethod("get_Name", new Type[0]); + if (mi != null) + { + object? name = mi.Invoke(this.Handle, new object[0]); + + if (name != null) + { + string? tmp = name.ToString(); + if(tmp != null) + return tmp; + } + else + { + return string.Empty; + } + } + string? tmp2 =Handle.ToString(); + if(tmp2 != null) + return tmp2; + return string.Empty; + } + } + + #endregion + + #region Methods + #region ICustomTypeDescriptor Members + + /// + /// Returns a collection of custom attributes for this instance of a component. + /// + /// Handle's attributes + public AttributeCollection GetAttributes() + { + return TypeDescriptor.GetAttributes(m_handle, false); + } + + /// + /// Returns the class name of this instance of a component. + /// + /// Handle's class name + public string? GetClassName() + { + return TypeDescriptor.GetClassName(m_handle, false); + } + + /// + /// Returns the name of this instance of a component. + /// + /// The name of handle object + public string? GetComponentName() + { + return TypeDescriptor.GetComponentName(m_handle, false); + } + + /// + /// Returns a type converter for this instance of a component. + /// + /// The converter of the handle + public TypeConverter GetConverter() + { + return TypeDescriptor.GetConverter(m_handle, false); + } + + /// + /// Returns the default event for this instance of a component. + /// + /// An EventDescriptor that represents the default event for this object, + /// or null if this object does not have events. + public EventDescriptor? GetDefaultEvent() + { + return TypeDescriptor.GetDefaultEvent(m_handle, false); + } + + /// + /// Returns the default property for this instance of a component. + /// + /// A PropertyDescriptor that represents the default property for this object, + /// or null if this object does not have properties. + public PropertyDescriptor? GetDefaultProperty() + { + return TypeDescriptor.GetDefaultProperty(m_handle, false); + } + + /// + /// Returns an editor of the specified type for this instance of a component. + /// + /// A Type that represents the editor for this object. + /// An Object of the specified type that is the editor for this object, + /// or null if the editor cannot be found. + public object? GetEditor(Type editorBaseType) + { + return TypeDescriptor.GetEditor(m_handle, editorBaseType, false); + } + + /// + /// Returns the events for this instance of a component using the specified attribute array as a filter. + /// + /// An array of type Attribute that is used as a filter. + /// An EventDescriptorCollection that represents the filtered events for this component instance. + public EventDescriptorCollection GetEvents(Attribute[]? attributes) + { + return TypeDescriptor.GetEvents(m_handle, attributes, false); + } + + /// + /// Returns the events for this instance of a component. + /// + /// An EventDescriptorCollection that represents the events for this component instance. + public EventDescriptorCollection GetEvents() + { + return TypeDescriptor.GetEvents(m_handle, false); + } + + /// + /// Returns the properties for this instance of a component using the attribute array as a filter. + /// + /// An array of type Attribute that is used as a filter. + /// A PropertyDescriptorCollection that + /// represents the filtered properties for this component instance. + public PropertyDescriptorCollection GetProperties(Attribute[]? attributes) + { + // get handle's properties + PropertyDescriptorCollection collection = TypeDescriptor.GetProperties(m_handle, attributes, false); + // create empty collection + PropertyDescriptorCollection collection2 = new PropertyDescriptorCollection(new PropertyDescriptor[0]); + + // filter properties by RevitVersionAttribute. + // if there is RevitVersionAttribute specified and the designated names does not + // contain current Revit version, the property will not be exposed. + foreach (PropertyDescriptor pd in collection) + { + bool matchRevitVersion = true; + foreach (Attribute att in pd.Attributes) + { + RevitVersionAttribute? pfa = att as RevitVersionAttribute; + if (pfa != null) + { + if (!pfa.Names.Contains(RevitStartInfo.RevitProduct)) + matchRevitVersion = false; + break; + } + } + if (matchRevitVersion) + collection2.Add(pd); + } + return collection2; + } + + /// + /// Returns the properties for this instance of a component. + /// + /// A PropertyDescriptorCollection that represents the properties + /// for this component instance. + public PropertyDescriptorCollection GetProperties() + { + return TypeDescriptor.GetProperties(m_handle, false); + } + + /// + /// Returns an object that contains the property described by the specified property descriptor. + /// + /// A PropertyDescriptor that represents the property whose owner is to be found. + /// Handle object + public object GetPropertyOwner(PropertyDescriptor? pd) + { + return m_handle; + } + + #endregion + + /// + /// overrides ToString method + /// + /// The name of the handle object + public override string ToString() + { + return this.Name; + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/Wrappers.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/Wrappers.cs new file mode 100644 index 00000000..f440ff81 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ProjectInfo/Wrappers/Wrappers.cs @@ -0,0 +1,52 @@ +// +// (C) Copyright 2003-2009 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System.Text; + +using Autodesk.Revit; + +namespace Revit.SDK.Samples.ProjectInfo.CS +{ + /// + /// wrapper interface + /// + public interface IWrapper + { + #region Properties + /// + /// Gets the handle object. + /// + object Handle + { + get; + } + + /// + /// Gets the name of the handle. + /// + string Name + { + get; + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/AssemblyInfo.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..7f4a7cce --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NewModule")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NewModule")] +[assembly: AssemblyCopyright("Copyright 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/Properties/Resources.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Resources.Designer.cs similarity index 82% rename from SDK/Macro Samples/Rooms/Source/Rooms/Properties/Resources.Designer.cs rename to SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Resources.Designer.cs index 90114dd7..3a6a28ba 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/Properties/Resources.Designer.cs +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Resources.Designer.cs @@ -7,14 +7,14 @@ // //------------------------------------------------------------------------------ -[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Rooms.Properties.Resources.get_ResourceManager():System.Resources.Resou" + +[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "VSTACSharpSamples.Properties.Resources.get_ResourceManager():System.Resources.Resou" + "rceManager")] -[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Rooms.Properties.Resources.get_Culture():System.Globalization.CultureIn" + +[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "VSTACSharpSamples.Properties.Resources.get_Culture():System.Globalization.CultureIn" + "fo")] -[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Rooms.Properties.Resources.set_Culture(System.Globalization.CultureInfo" + +[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "VSTACSharpSamples.Properties.Resources.set_Culture(System.Globalization.CultureInfo" + "):Void")] -namespace Rooms.Properties +namespace VSTACSharpSamples.Properties { @@ -48,7 +48,7 @@ namespace Rooms.Properties { if ((resourceMan == null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Rooms.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VSTACSharpSamples.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Resources.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Resources.resx new file mode 100644 index 00000000..ffecec85 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/Properties/Settings.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Settings.Designer.cs similarity index 82% rename from SDK/Macro Samples/Rooms/Source/Rooms/Properties/Settings.Designer.cs rename to SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Settings.Designer.cs index 574f7225..38f5ddaf 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/Properties/Settings.Designer.cs +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Settings.Designer.cs @@ -7,10 +7,10 @@ // //------------------------------------------------------------------------------ -[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Rooms.Properties.Settings.get_Default():Rooms.Properties.Sett" + +[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "VSTACSharpSamples.Properties.Settings.get_Default():VSTACSharpSamples.Properties.Sett" + "ings")] -namespace Rooms.Properties +namespace VSTACSharpSamples.Properties { diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/Properties/Settings.settings b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Settings.settings similarity index 100% rename from SDK/Macro Samples/Rooms/Source/Rooms/Properties/Settings.settings rename to SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Properties/Settings.settings diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrint.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrint.cs new file mode 100644 index 00000000..0caeb29b --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrint.cs @@ -0,0 +1,108 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using Autodesk; +using Autodesk.Revit; +using Autodesk.Revit.DB; + +using MacroCSharpSamples; +using MacroSamples_RVT; +using VIEW = Autodesk.Revit.DB.View; + +namespace Revit.SDK.Samples.QuickPrint.CS +{ + /// + /// Automatic print of all of a certain view type, to the default printer . + /// + public class QuickPrint + { + private Document? m_doc = null; + + /// + /// Default constructor without parameter is not allowed. + /// + private QuickPrint() + { + } + + /// + /// ctor wit parameter used to call this sample. + /// + /// + public QuickPrint(ThisApplication hostDoc) + { + m_doc = hostDoc.ActiveUIDocument.Document; + } + + /// + /// print the specified ViewType. + /// + public void Print(ViewType viewType) + { + try + { + if (m_doc == null) + return; + Autodesk.Revit.DB.View? view = null; + + // Create a view set to contain all view of designated type + ViewSet views = m_doc.Application.Create.NewViewSet(); + + // Create a filter to filtrate the View Element. + ElementClassFilter fileterView = new ElementClassFilter(typeof(VIEW)); + FilteredElementCollector collector = new FilteredElementCollector(m_doc); + collector.WherePasses(fileterView); + + IList arrayView = collector.ToElements(); + + // filtrate the designated type views. + foreach (Element ee in arrayView) + { + view = ee as VIEW; + if ((null != view) && (viewType == view.ViewType) && view.IsTemplate == false) + { + views.Insert(view); + } + + } + + // print + if (!views.IsEmpty) + { + m_doc.Print(views); + } + else + { + MessageBox.Show("No " + viewType.ToString() + " view to be printed!", "QuickPrint"); + } + } + catch (Exception ee) + { + MessageBox.Show(ee.Message); + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrintDialog.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrintDialog.Designer.cs new file mode 100644 index 00000000..f83e0f72 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrintDialog.Designer.cs @@ -0,0 +1,129 @@ +namespace Revit.SDK.Samples.QuickPrint.CS +{ + partial class QuickPrintDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.PlanType = new System.Windows.Forms.CheckBox(); + this.ElevationType = new System.Windows.Forms.CheckBox(); + this.SectionType = new System.Windows.Forms.CheckBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // PlanType + // + this.PlanType.AutoSize = true; + this.PlanType.Location = new System.Drawing.Point(40, 30); + this.PlanType.Name = "PlanType"; + this.PlanType.Size = new System.Drawing.Size(75, 17); + this.PlanType.TabIndex = 0; + this.PlanType.Text = "FloorPlans"; + this.PlanType.UseVisualStyleBackColor = true; + // + // ElevationType + // + this.ElevationType.AutoSize = true; + this.ElevationType.Location = new System.Drawing.Point(40, 53); + this.ElevationType.Name = "ElevationType"; + this.ElevationType.Size = new System.Drawing.Size(75, 17); + this.ElevationType.TabIndex = 1; + this.ElevationType.Text = "Elevations"; + this.ElevationType.UseVisualStyleBackColor = true; + // + // SectionType + // + this.SectionType.AutoSize = true; + this.SectionType.Location = new System.Drawing.Point(40, 76); + this.SectionType.Name = "SectionType"; + this.SectionType.Size = new System.Drawing.Size(67, 17); + this.SectionType.TabIndex = 2; + this.SectionType.Text = "Sections"; + this.SectionType.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.PlanType); + this.groupBox1.Controls.Add(this.SectionType); + this.groupBox1.Controls.Add(this.ElevationType); + this.groupBox1.Location = new System.Drawing.Point(10, 10); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(202, 114); + this.groupBox1.TabIndex = 3; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Choose View Type"; + // + // button1 + // + this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.button1.Location = new System.Drawing.Point(42, 144); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 4; + this.button1.Text = "Cancel"; + this.button1.UseVisualStyleBackColor = true; + // + // button2 + // + this.button2.DialogResult = System.Windows.Forms.DialogResult.OK; + this.button2.Location = new System.Drawing.Point(136, 144); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 5; + this.button2.Text = "OK"; + this.button2.UseVisualStyleBackColor = true; + // + // QuickPrintDialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(223, 180); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.groupBox1); + this.Name = "QuickPrintDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "QuickPrint"; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + public System.Windows.Forms.CheckBox PlanType; + public System.Windows.Forms.CheckBox ElevationType; + public System.Windows.Forms.CheckBox SectionType; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrintDialog.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrintDialog.cs new file mode 100644 index 00000000..f2716633 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrintDialog.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Revit.SDK.Samples.QuickPrint.CS +{ + public partial class QuickPrintDialog : Form + { + public QuickPrintDialog() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrintDialog.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrintDialog.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/QuickPrint/QuickPrintDialog.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/Command.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/Command.cs new file mode 100644 index 00000000..a46ae1e3 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/Command.cs @@ -0,0 +1,91 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Windows.Forms; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Structure; + +using MacroCSharpSamples; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.Rooms.CS +{ + /// + /// Get some properties of a slab , such as Level, Type name, Span direction, + /// Material name, Thickness, and Young Modulus for the slab's Material. + /// + public class SamplesRoom + { + // #region Class ctor implemetation + /// + /// Ctor without parameter is not allowed + /// + private SamplesRoom() + { + // no codes + } + + /// + /// Default constructor of StructuralLayerFunction + /// + public SamplesRoom(ThisApplication hostApp) + { + // Init for varialbes + // this document handler + m_app = hostApp; + } + + /// + /// Run sample Rooms + /// + public void Run() + { + try + { + //create a new instance of class Data + if (m_app == null) + { + return; + } + RoomsData data = new RoomsData(m_app, m_app.ActiveUIDocument.Document.Application); + //create a form to display the room information + using (roomsInformationForm infoForm = new roomsInformationForm(data)) + { + infoForm.ShowDialog(); + } + } + catch (Exception ex) + { + // If there are something wrong, give error information + MessageBox.Show(ex.Message); + } + } + + #region Class member variable + ThisApplication? m_app; + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomInfoForm.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomInfoForm.cs new file mode 100644 index 00000000..95029288 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomInfoForm.cs @@ -0,0 +1,192 @@ +using System; +using System.Data; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Collections.ObjectModel; +using System.Windows.Forms; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Architecture; + +using MacroCSharpSamples; + +namespace Revit.SDK.Samples.Rooms.CS +{ + /// + /// UI to display the rooms information + /// + public partial class roomsInformationForm : System.Windows.Forms.Form + { + RoomsData? m_data; + + /// + /// constructor + /// + public roomsInformationForm() + { + InitializeComponent(); + } + + /// + /// Overload the constructor + /// + /// an instanc of Data class + public roomsInformationForm(RoomsData data) + { + m_data = data; + InitializeComponent(); + } + + + /// + /// add rooms of list roomsWithTag to the listview + /// + private void DisplayRooms(ReadOnlyCollection roomList, bool isHaveTag) + { + String? propertyValue = null; //value of department + String? departmentName = null; //department name + Double areaValue = 0.0; //room area + + //add rooms to the listview + foreach (Room tmpRoom in roomList) + { + long idValue = tmpRoom.Id.Value; + string roomId = idValue.ToString(); + //create a list view Item + ListViewItem tmpItem = new ListViewItem(roomId); + tmpItem.SubItems.Add(tmpRoom.Name); //display room name. + tmpItem.SubItems.Add(tmpRoom.Number); //display room number. + tmpItem.SubItems.Add(tmpRoom.Level.Name); //display the level + + //get department name from Department property + departmentName = m_data?.GetProperty(tmpRoom, BuiltInParameter.ROOM_DEPARTMENT); + tmpItem.SubItems.Add(departmentName); + + //get property value + propertyValue = m_data?.GetProperty(tmpRoom, BuiltInParameter.ROOM_AREA); + //get the area value + if (propertyValue != null) + areaValue = Double.Parse(propertyValue); + tmpItem.SubItems.Add(propertyValue + " SF"); + //display whether the room with tag or not + if (isHaveTag) + { + tmpItem.SubItems.Add("Yes"); + } + else + { + tmpItem.SubItems.Add("No"); + } + + //add the item to the listview + roomsListView.Items.Add(tmpItem); + + //add the area to the department + if (departmentName != null) + m_data?.CalculateDepartmentArea(departmentName, areaValue); + } + } + + /// + /// when the form was loaded, display the room information + /// + /// + /// + private void RoomInfoForm_Load(object sender, EventArgs e) + { + roomsListView.Items.Clear(); + if (m_data == null) + return; + //add rooms in the list roomsWithoutTag to the listview + this.DisplayRooms(m_data.RoomsWithoutTag, false); + //add rooms in the list roomsWithTag to the listview + this.DisplayRooms(m_data.RoomsWithTag, true); + + //display the amount of the rooms + String numberOfRooms = "The number of rooms: " + m_data.Rooms.Count.ToString(); + allRoomLabel.Text = numberOfRooms; + + //display the amount of the rooms without tags + String roomsWithoutTag = "The number of rooms without tags: " + + m_data.RoomsWithoutTag.Count.ToString(); + tagLabel.Text = roomsWithoutTag; + + // if all the rooms have tags ,the button will be set to disable + if (0 == m_data.RoomsWithoutTag.Count) + { + addTagsButton.Enabled = false; + } + + //display the total area of each department + this.DisplayDartmentsInfo(); + } + + + /// + /// create room tags for the rooms without tags + /// + private void addTagButton_Click(object sender, EventArgs e) + { + //close the form + if (m_data == null) + return; + m_data.CreateTags(); + MessageBox.Show("Add tags to rooms successfully", "Macro Sample", MessageBoxButtons.OK, MessageBoxIcon.Information); + this.Close(); + } + + + /// + /// reorder room number + /// + private void reorderButton_Click(object sender, EventArgs e) + { + if (m_data == null) + return; + m_data.ReorderRooms(); + MessageBox.Show("Reoder rooms successfully", "Macro Sample", MessageBoxButtons.OK, MessageBoxIcon.Information); + this.Close(); + } + + + /// + /// display total room informations for each department + /// + private void DisplayDartmentsInfo() + { + if (m_data == null) + return; + for (int i = 0; i < m_data.DepartmentInfos.Count; i++) + { + //create a listview item + ListViewItem tmpItem = new ListViewItem(m_data.DepartmentInfos[i].DepartmentName); + tmpItem.SubItems.Add(m_data.DepartmentInfos[i].DepartmentAreaValue.ToString() + " SF"); + departmentsListView.Items.Add(tmpItem); + } + } + + + /// + /// export the total area of each department to a Excel file + /// + private void exportButton_Click(object sender, EventArgs e) + { + //create a save file dialog + if (m_data == null) + return; + using (SaveFileDialog sfdlg = new SaveFileDialog()) + { + sfdlg.Title = "Export area of department to Excel file"; + sfdlg.Filter = "CSV(command delimited)(*.csv)|*.csv"; + sfdlg.RestoreDirectory = true; + + if (DialogResult.OK == sfdlg.ShowDialog()) + { + m_data.ExportFile(sfdlg.FileName); + } + } + } + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomInfoForm.designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomInfoForm.designer.cs new file mode 100644 index 00000000..5ffb2b10 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomInfoForm.designer.cs @@ -0,0 +1,248 @@ +namespace Revit.SDK.Samples.Rooms.CS +{ + partial class roomsInformationForm + { + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.allRoomLabel = new System.Windows.Forms.Label(); + this.addTagsButton = new System.Windows.Forms.Button(); + this.closeButton = new System.Windows.Forms.Button(); + this.roomsGroupBox = new System.Windows.Forms.GroupBox(); + this.roomsListView = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader8 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader9 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader10 = new System.Windows.Forms.ColumnHeader(); + this.tagLabel = new System.Windows.Forms.Label(); + this.reorderButton = new System.Windows.Forms.Button(); + this.exportButton = new System.Windows.Forms.Button(); + this.departmentGroupBox = new System.Windows.Forms.GroupBox(); + this.departmentsListView = new System.Windows.Forms.ListView(); + this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader7 = new System.Windows.Forms.ColumnHeader(); + this.roomsGroupBox.SuspendLayout(); + this.departmentGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // allRoomLabel + // + this.allRoomLabel.AutoSize = true; + this.allRoomLabel.Location = new System.Drawing.Point(272, 349); + this.allRoomLabel.Name = "allRoomLabel"; + this.allRoomLabel.Size = new System.Drawing.Size(112, 13); + this.allRoomLabel.TabIndex = 9; + this.allRoomLabel.Text = "amountOfRoomsLabel"; + // + // addTagsButton + // + this.addTagsButton.Location = new System.Drawing.Point(431, 412); + this.addTagsButton.Name = "addTagsButton"; + this.addTagsButton.Size = new System.Drawing.Size(75, 23); + this.addTagsButton.TabIndex = 1; + this.addTagsButton.Text = "&Add Tags"; + this.addTagsButton.UseVisualStyleBackColor = true; + this.addTagsButton.Click += new System.EventHandler(this.addTagButton_Click); + // + // closeButton + // + this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.closeButton.Location = new System.Drawing.Point(431, 499); + this.closeButton.Name = "closeButton"; + this.closeButton.Size = new System.Drawing.Size(75, 23); + this.closeButton.TabIndex = 4; + this.closeButton.Text = "&Close"; + this.closeButton.UseVisualStyleBackColor = true; + // + // roomsGroupBox + // + this.roomsGroupBox.Controls.Add(this.roomsListView); + this.roomsGroupBox.Location = new System.Drawing.Point(2, 12); + this.roomsGroupBox.Name = "roomsGroupBox"; + this.roomsGroupBox.Size = new System.Drawing.Size(515, 303); + this.roomsGroupBox.TabIndex = 7; + this.roomsGroupBox.TabStop = false; + this.roomsGroupBox.Text = "Rooms information"; + // + // roomsListView + // + this.roomsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader4, + this.columnHeader2, + this.columnHeader3, + this.columnHeader8, + this.columnHeader9, + this.columnHeader10}); + this.roomsListView.FullRowSelect = true; + this.roomsListView.GridLines = true; + this.roomsListView.Location = new System.Drawing.Point(5, 19); + this.roomsListView.MultiSelect = false; + this.roomsListView.Name = "roomsListView"; + this.roomsListView.Size = new System.Drawing.Size(504, 275); + this.roomsListView.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.roomsListView.TabIndex = 5; + this.roomsListView.UseCompatibleStateImageBehavior = false; + this.roomsListView.View = System.Windows.Forms.View.Details; + // + // columnHeader1 + // + this.columnHeader1.Text = "ID"; + this.columnHeader1.Width = 80; + // + // columnHeader4 + // + this.columnHeader4.Text = "Name"; + // + // columnHeader2 + // + this.columnHeader2.Text = "Number"; + this.columnHeader2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + // + // columnHeader3 + // + this.columnHeader3.Text = "level"; + this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + // + // columnHeader8 + // + this.columnHeader8.Text = "Department"; + this.columnHeader8.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.columnHeader8.Width = 80; + // + // columnHeader9 + // + this.columnHeader9.Text = "Area"; + this.columnHeader9.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.columnHeader9.Width = 80; + // + // columnHeader10 + // + this.columnHeader10.Text = "Have tag"; + this.columnHeader10.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + // + // tagLabel + // + this.tagLabel.AutoSize = true; + this.tagLabel.Location = new System.Drawing.Point(272, 379); + this.tagLabel.Name = "tagLabel"; + this.tagLabel.Size = new System.Drawing.Size(168, 13); + this.tagLabel.TabIndex = 10; + this.tagLabel.Text = "amountOfRoomsWithoutTagLabel"; + // + // reorderButton + // + this.reorderButton.Location = new System.Drawing.Point(431, 441); + this.reorderButton.Name = "reorderButton"; + this.reorderButton.Size = new System.Drawing.Size(75, 23); + this.reorderButton.TabIndex = 2; + this.reorderButton.Text = "&Reorder"; + this.reorderButton.UseVisualStyleBackColor = true; + this.reorderButton.Click += new System.EventHandler(this.reorderButton_Click); + // + // exportButton + // + this.exportButton.Location = new System.Drawing.Point(431, 470); + this.exportButton.Name = "exportButton"; + this.exportButton.Size = new System.Drawing.Size(75, 23); + this.exportButton.TabIndex = 3; + this.exportButton.Text = "&Export"; + this.exportButton.UseVisualStyleBackColor = true; + this.exportButton.Click += new System.EventHandler(this.exportButton_Click); + // + // departmentGroupBox + // + this.departmentGroupBox.Controls.Add(this.departmentsListView); + this.departmentGroupBox.Location = new System.Drawing.Point(2, 330); + this.departmentGroupBox.Name = "departmentGroupBox"; + this.departmentGroupBox.Size = new System.Drawing.Size(264, 201); + this.departmentGroupBox.TabIndex = 8; + this.departmentGroupBox.TabStop = false; + this.departmentGroupBox.Text = "Area of departments"; + // + // departmentsListView + // + this.departmentsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader6, + this.columnHeader7}); + this.departmentsListView.FullRowSelect = true; + this.departmentsListView.GridLines = true; + this.departmentsListView.Location = new System.Drawing.Point(6, 19); + this.departmentsListView.Name = "departmentsListView"; + this.departmentsListView.Size = new System.Drawing.Size(252, 174); + this.departmentsListView.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.departmentsListView.TabIndex = 6; + this.departmentsListView.UseCompatibleStateImageBehavior = false; + this.departmentsListView.View = System.Windows.Forms.View.Details; + // + // columnHeader6 + // + this.columnHeader6.Text = "Department"; + this.columnHeader6.Width = 120; + // + // columnHeader7 + // + this.columnHeader7.Text = "Total Area"; + this.columnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.columnHeader7.Width = 120; + // + // roomsInformationForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.closeButton; + this.ClientSize = new System.Drawing.Size(518, 536); + this.Controls.Add(this.departmentGroupBox); + this.Controls.Add(this.exportButton); + this.Controls.Add(this.reorderButton); + this.Controls.Add(this.tagLabel); + this.Controls.Add(this.roomsGroupBox); + this.Controls.Add(this.closeButton); + this.Controls.Add(this.addTagsButton); + this.Controls.Add(this.allRoomLabel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "roomsInformationForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Room Information"; + this.Load += new System.EventHandler(this.RoomInfoForm_Load); + this.roomsGroupBox.ResumeLayout(false); + this.departmentGroupBox.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label allRoomLabel; + private System.Windows.Forms.Button addTagsButton; + private System.Windows.Forms.Button closeButton; + private System.Windows.Forms.GroupBox roomsGroupBox; + private System.Windows.Forms.ListView roomsListView; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.Label tagLabel; + private System.Windows.Forms.Button reorderButton; + private System.Windows.Forms.ColumnHeader columnHeader8; + private System.Windows.Forms.ColumnHeader columnHeader9; + private System.Windows.Forms.Button exportButton; + private System.Windows.Forms.ColumnHeader columnHeader10; + private System.Windows.Forms.GroupBox departmentGroupBox; + private System.Windows.Forms.ListView departmentsListView; + private System.Windows.Forms.ColumnHeader columnHeader6; + private System.Windows.Forms.ColumnHeader columnHeader7; + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomInfoForm.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomInfoForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomInfoForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomsData.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomsData.cs new file mode 100644 index 00000000..1f0bf155 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/Rooms/RoomsData.cs @@ -0,0 +1,419 @@ +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Architecture; + +using System.Diagnostics; + +using MacroCSharpSamples; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.Rooms.CS +{ + /// + /// Iterates through the rooms in the project and get the information of all the rooms + /// + public class RoomsData + { + ThisApplication m_thisApp; + Autodesk.Revit.ApplicationServices.Application m_application; + + List m_rooms = new List(); //a list to store all rooms in the project + List m_roomTags = new List(); //a list to store all room tags in the project + List m_roomsWithTag = new List(); //a list to store all rooms with tag + List m_roomsWithoutTag = new List(); //a list to store all rooms without tag + List m_departmentInfos = new List(); //a list to store department + + + /// + /// a class to stor the value of property Area and Department + /// + public struct DepartmentInfo + { + String m_departmentName; + double m_departmentAreaValue; + + /// + /// constructor + /// + public DepartmentInfo(String departmentName, double areaValue) + { + m_departmentName = departmentName; + m_departmentAreaValue = areaValue; + } + + + /// + /// the name of department + /// + public String DepartmentName + { + get + { + return m_departmentName; + } + } + + + /// + /// the total area of the rooms in department + /// + public double DepartmentAreaValue + { + get + { + return m_departmentAreaValue; + } + } + } + + + /// + /// a list of all department + /// + public ReadOnlyCollection DepartmentInfos + { + get + { + return new ReadOnlyCollection(m_departmentInfos); + } + } + + + /// + /// a list of all the rooms in the project + /// + public ReadOnlyCollection Rooms + { + get + { + return new ReadOnlyCollection(m_rooms); + } + } + + + /// + /// a list of all the room tags in the project + /// + public ReadOnlyCollection RoomTags + { + get + { + return new ReadOnlyCollection(m_roomTags); + } + } + + + /// + /// a list of the rooms that had tag + /// + public ReadOnlyCollection RoomsWithTag + { + get + { + return new ReadOnlyCollection(m_roomsWithTag); + } + } + + + /// + /// a list of the rooms without tags + /// + public ReadOnlyCollection RoomsWithoutTag + { + get + { + return new ReadOnlyCollection(m_roomsWithoutTag); + } + } + + + /// + ///constructor + /// + public RoomsData(ThisApplication hostApp, Autodesk.Revit.ApplicationServices.Application application) + { + m_application = application; + m_thisApp = hostApp; + + RoomFilter roomFilter = new RoomFilter(); + RoomTagFilter roomTagFilter = new RoomTagFilter(); + LogicalOrFilter orFilter = new LogicalOrFilter(roomFilter, roomTagFilter); + + FilteredElementIterator elementIterator = + (new FilteredElementCollector(m_thisApp.ActiveUIDocument.Document)).WherePasses(orFilter).GetElementIterator(); + elementIterator.Reset(); + + // try to find all the rooms and room tags in the project and add to the list + while (elementIterator.MoveNext()) + { + object obj = elementIterator.Current; + + // find the rooms, skip those rooms which don't locate at Level yet. + Room? tmpRoom = obj as Room; + if (null != tmpRoom && null != tmpRoom.Level) + { + m_rooms.Add(tmpRoom); + continue; + } + + // find the room tags + RoomTag? tmpTag = obj as RoomTag; + if (null != tmpTag) + { + m_roomTags.Add(tmpTag); + continue; + } + } + + //find out the rooms that without tag + ClassifyRooms(); + } + + + /// + /// find out the rooms that without tag + /// + private void ClassifyRooms() + { + //copy the all the elements in list Rooms to list RoomsWithoutTag + m_roomsWithoutTag.AddRange(m_rooms); + + //get the room id from room tag via room property + //if find the room id in list RoomWithoutTag, + //add it to the list RoomWithTag and delete it from list RoomWithoutTag + foreach (RoomTag tmpTag in m_roomTags) + { + long idValue = tmpTag.Room.Id.Value; + m_roomsWithTag.Add(tmpTag.Room); + //search the id for list RoomWithoutTag + foreach (Room tmpRoom in m_rooms) + { + if (idValue == tmpRoom.Id.Value) + { + m_roomsWithoutTag.Remove(tmpRoom); + } + } + } + } + + + /// + /// create the room tag for the rooms without tags + /// + public void CreateTags() + { + foreach (Room tmpRoom in m_roomsWithoutTag) + { + //get the location point of the room + LocationPoint? locPoint = tmpRoom.Location as LocationPoint; + if (locPoint != null) + { + //create a instance of UV class + double u = locPoint.Point.X; + double v = locPoint.Point.Y; + + UV point = m_application.Create.NewUV(u, v); + + //create room tag + m_thisApp.ActiveUIDocument.Document.Create.NewRoomTag(new LinkElementId(tmpRoom.Id), point, null); + } + } + } + + + /// + /// sort all the rooms by ascending order according their coordinate + /// + private void SortRooms() + { + LocationPoint? tmpPoint = null; + LocationPoint? roomPoint = null; + Room? listRoom = null; + int result = 0; + int flag = 0; + int amount = m_rooms.Count; + + //sort the rooms according their location point + for (int i = 0; i < amount - 1; i++) + { + Room tmpRoom = m_rooms[i]; + for (int j = i + 1; j < amount; j++) + { + tmpPoint = tmpRoom.Location as LocationPoint; + listRoom = m_rooms[j]; + roomPoint = listRoom.Location as LocationPoint; + + //rooms in different level + if (tmpPoint?.Point.Z > roomPoint?.Point.Z) + { + tmpRoom = listRoom; + result = j; + //if tmpRoom was changed,set flag to 1 + flag = 1; + } + //the two rooms in the same level + else if (tmpPoint?.Point.Z == roomPoint?.Point.Z) + { + if (tmpPoint?.Point.X > roomPoint?.Point.X) + { + tmpRoom = listRoom; + result = j; + flag = 1; + } + else if (tmpPoint?.Point.X == roomPoint?.Point.X && + tmpPoint?.Point.Y > roomPoint?.Point.Y) + { + tmpRoom = listRoom; + result = j; + flag = 1; + } + } + } + + //if flag equals 1 ,move the room to the front of list + if (1 == flag) + { + Room tempRoom = m_rooms[i]; + m_rooms[i] = m_rooms[result]; + m_rooms[result] = tempRoom; + flag = 0; + } + } + } + + + /// + /// reorder all the rooms' number + /// + /// a list of rooms + public void ReorderRooms() + { + //sort all the rooms by ascending order according their coordinate + this.SortRooms(); + + //to avoid revit display the warning message, + //change the rooms' name to a temp name + foreach (Room tmpRoom in m_rooms) + { + tmpRoom.Number += "XXX"; + } + + //set the rooms number to a new order + for (int i = 1; i <= m_rooms.Count; i++) + { + m_rooms[i - 1].Number = i.ToString(); + } + } + + + /// + /// get the room property and Department property according the property name + /// + /// a instance of room class + /// the property name + /// the value of property + public String? GetProperty(Room room, BuiltInParameter paramEnum) + { + String? propertyValue = null; //the value of parameter + + //get the parameter via the parameterId + Parameter param = room.get_Parameter(paramEnum); + //get the parameter's storage type + StorageType storageType = param.StorageType; + switch (storageType) + { + case StorageType.Integer: + int iVal = param.AsInteger(); + propertyValue = iVal.ToString(); + break; + case StorageType.String: + String stringVal = param.AsString(); + propertyValue = stringVal; + break; + case StorageType.Double: + Double dVal = param.AsDouble(); + dVal = Math.Round(dVal, 2); + propertyValue = dVal.ToString(); + break; + default: + break; + } + return propertyValue; + } + + + /// + /// calculate the area of rooms for each department + /// + /// the department name + /// the value of room area + public void CalculateDepartmentArea(String deparName, Double areaValue) + { + //if the array list is empty add a new instance of DepartmentArea to the list + if (0 == m_departmentInfos.Count) + { + //create a new instance of DepartmentArea struct and insert it to the list + DepartmentInfo tmpDep = new DepartmentInfo(deparName, areaValue); + m_departmentInfos.Add(tmpDep); + } + else + { + int flag = 0; + //find whether the department exist in the project + for (int i = 0; i < m_departmentInfos.Count; i++) + { + if (deparName == m_departmentInfos[i].DepartmentName) + { + double tempValue = m_departmentInfos[i].DepartmentAreaValue + areaValue; + DepartmentInfo tempInstance = new DepartmentInfo(deparName, tempValue); + m_departmentInfos[i] = tempInstance; + flag = 1; + } + } + //if found a new department, + //create a new instance of DepartmentArea struct and insert it to the list + if (0 == flag) + { + DepartmentInfo tmpDep = new DepartmentInfo(deparName, areaValue); + m_departmentInfos.Add(tmpDep); + } + } + } + + + + /// + /// export data into an Excel file + /// + /// + public void ExportFile(String fileName) + { + //store all the information that to be exported + String allData = ""; + + //get the project title + String projectTitle = m_thisApp.ActiveUIDocument.Document.Title; //the name of the project + allData += "Total Rooms area of " + projectTitle + "\n"; + allData += "Department" + "," + "Area" + "\n"; + + foreach (DepartmentInfo tmp in m_departmentInfos) + { + allData += tmp.DepartmentName + "," + tmp.DepartmentAreaValue + " SF\n"; + } + + //save the information into a Excel file + if (allData.Length > 0) + { + System.IO.StreamWriter exportinfo = new System.IO.StreamWriter(fileName); + exportinfo.WriteLine(allData); + exportinfo.Close(); + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/RotateFramingObjects/RotateFramingObjects.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/RotateFramingObjects/RotateFramingObjects.cs new file mode 100644 index 00000000..0d7ace3c --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/RotateFramingObjects/RotateFramingObjects.cs @@ -0,0 +1,367 @@ +// +// (C) Copyright 1994-2005 by Autodesk, Inc. All rights reserved. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. + +// +// AUTODESK PROVIDES THIS PROGRAM 'AS IS' AND WITH ALL ITS FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. + +/// +/// Gets the number of studs and camber sizes for beams. +/// + +using System; +using System.Collections.Generic; +using System.IO; +using System.Windows.Forms; +using Autodesk; +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Structure; + +using MacroCSharpSamples; +using MacroSamples_RVT; + + +namespace Revit.SDK.Samples.RotateFramingObjects.CS +{ + + /// + /// rotate the objects that were selected when the command was executed. + /// and allow the user input the amount, in degrees that the objects should be rotated. + /// the dialog contain option for the user to specify this value is absolute or relative. + /// + public class RotateFramingObjects + { + double m_receiveRotationTextBox; // receive change of Angle + bool m_isAbsoluteChecked; // true if moving absolute + ThisApplication? m_app; //document data for Macro + + public double ReceiveRotationTextBox + { + get + { + return m_receiveRotationTextBox; + } + set + { + m_receiveRotationTextBox = value; + } + } + public bool IsAbsoluteChecked + { + get + { + return m_isAbsoluteChecked; + } + set + { + m_isAbsoluteChecked = value; + } + } + + /// + /// Default constructor of RotateFramingObjects + /// + public RotateFramingObjects() + { } + + + /// + /// Ctor with ThisDocument as + /// + /// ThisDocument handler + public RotateFramingObjects(ThisApplication hostApp) + { + m_app = hostApp; + } + + /// + /// Run this sample + /// + public void Run() + { + if (m_app == null) + return; + RotateFramingObjectsForm displayForm = new RotateFramingObjectsForm(this); + ICollection selection = m_app.ActiveUIDocument.Selection.GetElementIds(); + bool isSingle = true; //selection is single object + bool isAllFamilyInstance = true; //all is not familyInstance + + // There must be beams, braces or columns selected + if (selection.Count == 0) + { + // nothing selected + MessageBox.Show("Please select FamilyInstance.(such as column)", "RotateFramingObjects"); + return; + } + else if (1 != selection.Count) + { + + isSingle = false; + try + { + if (DialogResult.OK != displayForm.ShowDialog()) + { + return; + } + } + catch (Exception) + { + return; + } + // return IExternalCommand.Result.Succeeded; + // more that one object selected + } + + // if the selection are familyInstance, try to get their existing rotation + foreach (Autodesk.Revit.DB.ElementId id in selection) + { + FamilyInstance? familyComponent = m_app.ActiveUIDocument.Document.GetElement(id) as FamilyInstance; + if (familyComponent != null) + { + if (Autodesk.Revit.DB.Structure.StructuralType.Beam == familyComponent.StructuralType + || Autodesk.Revit.DB.Structure.StructuralType.Brace == familyComponent.StructuralType) + { + // selection is a beam or brace + string returnValue = this.FindParameter("Angle", familyComponent); + if (displayForm.rotationTextBox != null) + displayForm.rotationTextBox.Text = returnValue.ToString(); + + } + else if (Autodesk.Revit.DB.Structure.StructuralType.Column == familyComponent.StructuralType) + { + // selection is a column + Autodesk.Revit.DB.Location columnLocation = familyComponent.Location; + Autodesk.Revit.DB.LocationPoint? pointLocation = columnLocation as Autodesk.Revit.DB.LocationPoint; + if (pointLocation != null) + { + double temp = pointLocation.Rotation; + string output = (Math.Round(temp * 180 / (Math.PI), 3)).ToString(); + if (displayForm.rotationTextBox != null) + displayForm.rotationTextBox.Text = output; + } + + } + else + { + // other familyInstance can not be rotated + MessageBox.Show("Can not deal with it.", "RotateFramingObjects"); + m_app.ActiveUIDocument.Selection.GetElementIds().Add(familyComponent.Id); + return; + } + } + else + { + if (isSingle) + { + MessageBox.Show("It is a Non-FamilyInstance.", "RotateFramingObjects"); + m_app.ActiveUIDocument.Selection.GetElementIds().Add(id); + return; + } + // there is some objects is not familyInstance + //MessageBox.Show("There is Non-FamilyInstance.", "RotateFramingObjects"); + m_app.ActiveUIDocument.Selection.GetElementIds().Add(id); + isAllFamilyInstance = false; + } + } + + + if (isSingle) + { + try + { + if (DialogResult.OK != displayForm.ShowDialog()) + { + return; + } + } + catch (Exception) + { + return; + } + } + + if (isAllFamilyInstance) + { + return; + } + else + { + //output error information + return; + } + + } + /// + /// The function set value to rotation of the beams and braces + /// and rotate columns. + /// + public void RotateElement() + { + if (m_app == null) + return; + ICollection selection = m_app.ActiveUIDocument.Selection.GetElementIds(); + foreach (ElementId id in selection) + { + FamilyInstance? familyComponent = m_app.ActiveUIDocument.Document.GetElement(id) as FamilyInstance; + if (familyComponent == null) + { + //is not a familyInstance + continue; + } + // if be familyInstance,judge the types of familyInstance + if (Autodesk.Revit.DB.Structure.StructuralType.Beam == familyComponent.StructuralType + || Autodesk.Revit.DB.Structure.StructuralType.Brace == familyComponent.StructuralType) + { + // selection is a beam or Brace + ParameterSetIterator j = familyComponent.Parameters.ForwardIterator(); + j.Reset(); + + bool jMoreAttribute = j.MoveNext(); + while (jMoreAttribute) + { + object a = j.Current; + Parameter? objectAttribute = a as Parameter; + //set generic property named ��Angle�� + if (objectAttribute != null) + { + int p = objectAttribute.Definition.Name.CompareTo("Angle"); + if (0 == p) + { + Double temp = objectAttribute.AsDouble(); + double rotateDegree = m_receiveRotationTextBox * Math.PI / 180; + if (!m_isAbsoluteChecked) + { + // absolute rotation + rotateDegree += temp; + } + objectAttribute.Set(rotateDegree); + // relative rotation + } + } + jMoreAttribute = j.MoveNext(); + } + } + else if (Autodesk.Revit.DB.Structure.StructuralType.Column == familyComponent.StructuralType) + { + // rotate a column + Autodesk.Revit.DB.Location columnLocation = familyComponent.Location; + // get the location object + Autodesk.Revit.DB.LocationPoint? pointLocation = columnLocation as Autodesk.Revit.DB.LocationPoint; + Autodesk.Revit.DB.XYZ? insertPoint = pointLocation?.Point; + double temp = 0; + // get the location point + if (pointLocation != null) + { + temp = pointLocation.Rotation; + //existing rotation + XYZ directionPoint = m_app.ActiveUIDocument.Document.Application.Create.NewXYZ(0, 0, 1); + // define the vector of axis + Autodesk.Revit.DB.Line rotateAxis = Line.CreateUnbound(insertPoint, directionPoint); + double rotateDegree = m_receiveRotationTextBox * Math.PI / 180; + // rotate column by rotate method + if (m_isAbsoluteChecked) + { + rotateDegree -= temp; + } + bool rotateResult = pointLocation.Rotate(rotateAxis, rotateDegree); + if (rotateResult == false) + { + MessageBox.Show("Rotate Failed."); + } + } + } + } + } + + /// + /// get the parameter value according given parameter name + /// + public string FindParameter(string parameterName, FamilyInstance familyInstanceName) + { + ParameterSetIterator i = familyInstanceName.Parameters.ForwardIterator(); + i.Reset(); + string? valueOfParameter = null; + bool iMoreAttribute = i.MoveNext(); + while (iMoreAttribute) + { + bool isFound = false; + object o = i.Current; + Parameter? familyAttribute = o as Parameter; + if (familyAttribute != null) + { + if (familyAttribute.Definition.Name == parameterName) + { + //find the parameter whose name is same to the given parameter name + Autodesk.Revit.DB.StorageType st = familyAttribute.StorageType; + switch (st) + { + //get the storage type + case (Autodesk.Revit.DB.StorageType.Double): + { + if (parameterName == "Angle") + { + //make conversion between degrees and radians + Double temp = familyAttribute.AsDouble(); + valueOfParameter = Math.Round(temp * 180 / (Math.PI), 3).ToString();//+ "'"; + } + else + { + valueOfParameter = familyAttribute.AsDouble().ToString(); + } + break; + } + case (Autodesk.Revit.DB.StorageType.ElementId): + { + //get elementId as string + valueOfParameter = familyAttribute.AsElementId().ToString(); + break; + } + case (Autodesk.Revit.DB.StorageType.Integer): + { + //get Integer as string + valueOfParameter = familyAttribute.AsInteger().ToString(); + break; + } + case (Autodesk.Revit.DB.StorageType.String): + { + //get string + valueOfParameter = familyAttribute.AsString(); + break; + } + default: + { + break; + } + } + isFound = true; + } + if (isFound) + { + break; + } + iMoreAttribute = i.MoveNext(); + } + //return the value. + } + if (valueOfParameter == null) + return string.Empty; + return valueOfParameter; + } + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/RotateFramingObjects/RotateFramingObjectsForm.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/RotateFramingObjects/RotateFramingObjectsForm.cs new file mode 100644 index 00000000..c02abfe6 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/RotateFramingObjects/RotateFramingObjectsForm.cs @@ -0,0 +1,250 @@ +// +// (C) Copyright 1994-2005 by Autodesk, Inc. All rights reserved. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. + +// +// AUTODESK PROVIDES THIS PROGRAM 'AS IS' AND WITH ALL ITS FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. + +/// +/// Show the number of studs and camber sizes for beams. +/// + +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; + +namespace Revit.SDK.Samples.RotateFramingObjects.CS +{ + /// + /// Summary description for PutDialog. + /// + public class RotateFramingObjectsForm : System.Windows.Forms.Form + { + + private RotateFramingObjects? m_instance; + private System.ComponentModel.Container? m_components = null; + private System.Windows.Forms.Button? cancelButton; + private System.Windows.Forms.Button? okButton; + public System.Windows.Forms.RadioButton? absoluteRadio; + private System.Windows.Forms.RadioButton? relativeRadio; + private System.Windows.Forms.Label? rotationLabel; + public System.Windows.Forms.TextBox? rotationTextBox; + private bool m_isReset; + + public bool IsReset + { + get + { + return m_isReset; + } + set + { + m_isReset = value; + } + } + public RotateFramingObjectsForm(RotateFramingObjects Inst) + { + m_isReset = false; + m_instance = Inst; + if (null == m_instance) + { + MessageBox.Show("Load Application Failed"); + } + InitializeComponent(); + //this.rotationTextBox.Text = "Value"; + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (m_components != null) + { + m_components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.absoluteRadio = new System.Windows.Forms.RadioButton(); + this.relativeRadio = new System.Windows.Forms.RadioButton(); + this.cancelButton = new System.Windows.Forms.Button(); + this.okButton = new System.Windows.Forms.Button(); + this.rotationLabel = new System.Windows.Forms.Label(); + this.rotationTextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // absoluteRadio + // + this.absoluteRadio.Location = new System.Drawing.Point(192, 160); + this.absoluteRadio.Name = "absoluteRadio"; + this.absoluteRadio.Size = new System.Drawing.Size(72, 24); + this.absoluteRadio.TabIndex = 0; + this.absoluteRadio.Text = "Absolute"; + this.absoluteRadio.CheckedChanged += new System.EventHandler(this.allRadio_CheckedChanged); + // + // relativeRadio + // + this.relativeRadio.Checked = true; + this.relativeRadio.Location = new System.Drawing.Point(72, 160); + this.relativeRadio.Name = "relativeRadio"; + this.relativeRadio.Size = new System.Drawing.Size(64, 24); + this.relativeRadio.TabIndex = 1; + this.relativeRadio.TabStop = true; + this.relativeRadio.Text = "Relative"; + this.relativeRadio.CheckedChanged += new System.EventHandler(this.singleRadio_CheckedChanged); + // + // cancelButton + // + this.cancelButton.Location = new System.Drawing.Point(184, 232); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(75, 23); + this.cancelButton.TabIndex = 6; + this.cancelButton.Text = "Cancel"; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // okButton + // + this.okButton.Location = new System.Drawing.Point(56, 232); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 8; + this.okButton.Text = "OK"; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // rotationLabel + // + this.rotationLabel.Location = new System.Drawing.Point(64, 80); + this.rotationLabel.Name = "rotationLabel"; + this.rotationLabel.Size = new System.Drawing.Size(100, 16); + this.rotationLabel.TabIndex = 10; + this.rotationLabel.Text = "Rotation"; + // + // rotationTextBox + // + this.rotationTextBox.Location = new System.Drawing.Point(176, 80); + this.rotationTextBox.Name = "rotationTextBox"; + this.rotationTextBox.Size = new System.Drawing.Size(100, 20); + this.rotationTextBox.TabIndex = 1; + this.rotationTextBox.TextChanged += new System.EventHandler(this.rotationTextBox_TextChanged); + this.rotationTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.rotationTextBox_KeyPress); + // + // RotateFramingObjectsForm + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(336, 302); + this.Controls.Add(this.rotationTextBox); + this.Controls.Add(this.relativeRadio); + this.Controls.Add(this.rotationLabel); + this.Controls.Add(this.okButton); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.absoluteRadio); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "RotateFramingObjectsForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Rotate Framing Objects"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + #endregion + + private void okButton_Click(object? sender, System.EventArgs e) + { + if (IsReset && m_instance != null) + { + m_instance.RotateElement(); + } + this.DialogResult = DialogResult.OK; + this.Close(); + + } + + private void cancelButton_Click(object? sender, System.EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + + } + private void singleRadio_CheckedChanged(object? sender, System.EventArgs e) + { + m_isReset = true; + if (m_instance == null) + return; + m_instance.IsAbsoluteChecked = false; + } + + private void allRadio_CheckedChanged(object? sender, System.EventArgs e) + { + if (m_instance == null) + return; + m_isReset = true; + m_instance.IsAbsoluteChecked = true; + } + + private void rotationTextBox_TextChanged(object? sender, System.EventArgs e) + { + if (this.rotationTextBox == null || m_instance == null) + return; + if ("" != this.rotationTextBox.Text) + { + try + { + m_instance.ReceiveRotationTextBox = Convert.ToDouble(this.rotationTextBox.Text); + } + catch (Exception) + { + //this.DialogResult=DialogResult.Cancel; + MessageBox.Show("Please input number."); + this.rotationTextBox.Clear(); + } + + } + else + { + m_instance.ReceiveRotationTextBox = 0; + } + m_isReset = true; + } + + private void rotationTextBox_KeyPress(object? sender, System.Windows.Forms.KeyPressEventArgs e) + { + if (13 == e.KeyChar) + { + okButton_Click(sender, e); + } + else + rotationTextBox_TextChanged(sender, e); + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/RotateFramingObjects/RotateFramingObjectsForm.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/RotateFramingObjects/RotateFramingObjectsForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/RotateFramingObjects/RotateFramingObjectsForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceDialog.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceDialog.Designer.cs new file mode 100644 index 00000000..94727ae0 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceDialog.Designer.cs @@ -0,0 +1,121 @@ +namespace Revit.SDK.Samples.FindAndReplaceText.CS +{ + partial class FindAndReplaceDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.FindContent = new System.Windows.Forms.TextBox(); + this.ReplaceContent = new System.Windows.Forms.TextBox(); + this.Cancel = new System.Windows.Forms.Button(); + this.OK = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(26, 37); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(56, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Find what:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(26, 90); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(72, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Replace with:"; + // + // FindContent + // + this.FindContent.Location = new System.Drawing.Point(117, 34); + this.FindContent.Name = "FindContent"; + this.FindContent.Size = new System.Drawing.Size(226, 20); + this.FindContent.TabIndex = 2; + // + // ReplaceContent + // + this.ReplaceContent.Location = new System.Drawing.Point(117, 83); + this.ReplaceContent.Name = "ReplaceContent"; + this.ReplaceContent.Size = new System.Drawing.Size(226, 20); + this.ReplaceContent.TabIndex = 3; + // + // Cancel + // + this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.Cancel.Location = new System.Drawing.Point(186, 136); + this.Cancel.Name = "Cancel"; + this.Cancel.Size = new System.Drawing.Size(75, 23); + this.Cancel.TabIndex = 4; + this.Cancel.Text = "Cancel"; + this.Cancel.UseVisualStyleBackColor = true; + // + // OK + // + this.OK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.OK.Location = new System.Drawing.Point(268, 136); + this.OK.Name = "OK"; + this.OK.Size = new System.Drawing.Size(75, 23); + this.OK.TabIndex = 5; + this.OK.Text = "OK"; + this.OK.UseVisualStyleBackColor = true; + // + // FindAndReplaceDialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.Cancel; + this.ClientSize = new System.Drawing.Size(362, 176); + this.Controls.Add(this.OK); + this.Controls.Add(this.Cancel); + this.Controls.Add(this.ReplaceContent); + this.Controls.Add(this.FindContent); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "FindAndReplaceDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "FindAndReplaceDialog"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + public System.Windows.Forms.TextBox FindContent; + public System.Windows.Forms.TextBox ReplaceContent; + private System.Windows.Forms.Button Cancel; + private System.Windows.Forms.Button OK; + + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceDialog.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceDialog.cs new file mode 100644 index 00000000..e48aaf2e --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceDialog.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Revit.SDK.Samples.FindAndReplaceText.CS +{ + public partial class FindAndReplaceDialog : Form + { + public FindAndReplaceDialog() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceDialog.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceDialog.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceDialog.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceText.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceText.cs new file mode 100644 index 00000000..248e72dd --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceText/FindAndReplaceText.cs @@ -0,0 +1,114 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; + +using Autodesk; +using Autodesk.Revit; +using Autodesk.Revit.DB; + + +using MacroCSharpSamples; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.FindAndReplaceText.CS +{ + /// + /// automatically search all text notes in the project + /// and replace text found with appropriate content. + /// + public class FindAndReplaceText + { + private Document? m_doc = null; + + /// + /// Automatic print of all of a certain view type, to the default printer . + /// + private FindAndReplaceText() + { + } + + /// + /// ctor wit parameter used to call this sample. + /// + /// + public FindAndReplaceText(ThisApplication hostDoc) + { + m_doc = hostDoc.ActiveUIDocument.Document; + } + + /// + /// run this sample now + /// + public void Run() + { + try + { + String findContent = String.Empty; + String replaceContent = String.Empty; + FindAndReplaceDialog dialog = new FindAndReplaceDialog(); + + // Get the designated text + if (DialogResult.OK == dialog.ShowDialog()) + { + findContent = dialog.FindContent.Text; + replaceContent = dialog.ReplaceContent.Text; + } + else + { + return; + } + + // filtrate the TextElment from the element set. + ElementClassFilter filterText = new ElementClassFilter(typeof(TextElement)); + FilteredElementCollector colloctor = new FilteredElementCollector(m_doc); + colloctor.WherePasses(filterText); + + IList arrayText = colloctor.ToElements(); + + // matching and replacing + int replacenum = 0; + foreach (Element ee in arrayText) + { + TextElement? textElem = ee as TextElement; + if ((null != textElem) && (textElem.Text.Contains(findContent))) + { + + textElem.Text = textElem.Text.Replace(findContent,replaceContent); + replacenum++; + } + + } + + // Show the number of replacement found. + MessageBox.Show("Revit has completed its search and has made " + replacenum + " modifications.", "FindAndReplaceText"); + } + catch (Exception ee) + { + MessageBox.Show(ee.Message); + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceWinType/FindAndReplaceWinType.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceWinType/FindAndReplaceWinType.cs new file mode 100644 index 00000000..82886106 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SearchAndReplaceWinType/FindAndReplaceWinType.cs @@ -0,0 +1,122 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; + +using Autodesk; +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Structure; + +using System.Linq; + +using MacroCSharpSamples; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.SearchAndReplaceWinType.CS +{ + public class FindAndReplaceWinType + { + /// + /// automatically replaces all windows of a given (hardcoded) type with another hardcoded type + /// + private Document? m_doc = null; + + /// + /// Automatic print of all of a certain view type, to the default printer . + /// + private FindAndReplaceWinType() + { + } + + /// + /// ctor wit parameter used to call this sample. + /// + /// + public FindAndReplaceWinType(ThisApplication hostDoc) + { + m_doc = hostDoc.ActiveUIDocument.Document; + } + + /// + /// run this sample now + /// + public void Run() + { + try + { + // filtrate the windows from the element set. + + ElementClassFilter filter1 = new ElementClassFilter(typeof(FamilyInstance)); + ElementCategoryFilter filter2 = new ElementCategoryFilter(BuiltInCategory.OST_Windows); + LogicalAndFilter andFilter = new LogicalAndFilter(filter1, filter2); + FilteredElementCollector collector = new FilteredElementCollector(m_doc); + ICollection arrayFamily = collector.WherePasses(andFilter).ToElements(); + + // filtrate the Symbol from the element set to modify the window's type. + + + ElementClassFilter filter3 = new ElementClassFilter(typeof(FamilySymbol)); + ElementCategoryFilter filter4 = new ElementCategoryFilter(BuiltInCategory.OST_Windows); + LogicalAndFilter andFilter1 = new LogicalAndFilter(filter3, filter4); + collector = new FilteredElementCollector(m_doc); + ICollection found = collector.WherePasses(andFilter1).ToElements(); + ElementArray arraySymbol = new ElementArray(); + foreach (Element ee in found) + { + if (ee.Name == "36\" x 72\"") + { + arraySymbol.Insert(ee, 0); + break; + } + } + + MessageBox.Show("Replace 16\" x 24\" to 36\" x 72\".", "FindAndReplaceWinType"); + // matching and replacing + int replacenum = 0; + foreach (Element ee in arrayFamily) + { + + FamilyInstance? windows = ee as FamilyInstance; + if (windows == null) + return; + if (0 == windows.Symbol.Name.CompareTo("16\" x 24\"")) + { + windows.Symbol = arraySymbol.get_Item(0) as FamilySymbol; + replacenum++; + } + + } + // Show the number of windows modified. + MessageBox.Show("Revit has completed its search and has made " + replacenum + " modifications.", "FindAndReplaceWinType"); + } + catch (Exception ee) + { + MessageBox.Show(ee.Message); + } + + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SlabProperties/Command.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SlabProperties/Command.cs new file mode 100644 index 00000000..45ad0462 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SlabProperties/Command.cs @@ -0,0 +1,391 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// app.ActiveUIDocumentumentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Windows.Forms; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Structure; + +using MacroCSharpSamples; +using System.Collections.Generic; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.SlabProperties.CS +{ + /// + /// Get some properties of a slab , such as Level, Type name, Span direction, + /// Material name, Thickness, and Young Modulus for the slab's Material. + /// + public class SlabProperties + { + #region Class constant variables + const double PI = 3.1415926535879; + const int Degree = 180; + const int ToMillimeter = 1000; + const double ToMetricThickness = 0.3048; // unit for changing inch to meter + const double ToMetricYoungmodulus = 304800.0; + + #endregion + + + #region Class member variables + ThisApplication? m_app; + + ICollection? m_slabComponent; // the selected Slab component + Floor? m_slabFloor; // Floor + CompoundStructureLayer? m_slabLayer; // Structure Layer + IList? m_slabLayerCollection; // Structure Layer collection + + string m_level = string.Empty; // level name of Slab + string m_typeName = string.Empty; // type name of Slab + string m_spanDirection = string.Empty; // span direction (degree) of Slab + string m_thickness = string.Empty; // thick ness (millmeter) of slab layer + string m_materialName = string.Empty; // material name of slab layer + string m_youngModulusX = string.Empty; // Young modulus X + string m_youngModulusY = string.Empty; // Young modulus Y + string m_youngModulusZ = string.Empty; // Young modulus Z + int m_numberOfLayers = 0; // number of Structure Layers + + #endregion + + + #region Class Constructor methods implementation + /// + /// Ctro without parameter is not allowed + /// + private SlabProperties() + { + // none + } + + /// + /// Ctor with ThisDocument as + /// + /// ThisDocument handler + public SlabProperties(ThisApplication hostApp) + { + m_app = hostApp; + } + + /// + /// Run this sample + /// + public void Run() + { + try + { + if (m_app == null) + return; + // function initialization and find out a slab's Level, Type name, and set the Span Direction properties. + bool isInitialization = this.Initialize(m_app); + if (false == isInitialization) + { + return; + } + + // show a displayForm to display the properties of the slab + SlabPropertiesForm slabForm = new SlabPropertiesForm(this); + if (DialogResult.OK != slabForm.ShowDialog()) + { + return; + } + } + catch (Exception displayProblem) + { + MessageBox.Show(displayProblem.ToString()); + return; + } + } + #endregion + + + #region Class propertied + /// + /// Level property, read only. + /// + public string Level + { + get + { + return m_level; + } + } + + + /// + /// TypeName property, read only. + /// + public string TypeName + { + get + { + return m_typeName; + } + } + + + /// + /// SpanDirection property, read only. + /// + public string SpanDirection + { + get + { + return m_spanDirection; + } + } + + + /// + /// NumberOfLayers property, read only. + /// + public int NumberOfLayers + { + get + { + return m_numberOfLayers; + } + } + + + /// + /// LayerThickness property, read only. + /// + public string LayerThickness + { + get + { + return m_thickness; + } + } + + + /// + /// LayerMaterialName property, read only. + /// + public string LayerMaterialName + { + get + { + return m_materialName; + } + } + + + /// + /// LayerYoungModulusX property, read only. + /// + public string LayerYoungModulusX + { + get + { + return m_youngModulusX; + } + } + + + /// + /// LayerYoungModulusY property, read only. + /// + public string LayerYoungModulusY + { + get + { + return m_youngModulusY; + } + } + + + /// + /// LayerYoungModulusZ property, read only. + /// + public string LayerYoungModulusZ + { + get + { + return m_youngModulusZ; + } + } + #endregion + + + #region Public class method + /// + /// SetLayer method + /// + /// The layerNumber for the number of the layers + public void SetLayer(int layerNumber) + { + // Get each layer. + // An individual layer can be accessed by Layers property and its thickness and material can then be reported. + if (m_slabLayerCollection == null) + { + return; + } + m_slabLayer = m_slabLayerCollection[layerNumber]; + + // Get the Thickness property and change to the metric millimeter + m_thickness = ((m_slabLayer.Width) * ToMetricThickness * ToMillimeter).ToString() + " mm"; + + // Get the Material name property + Material? slabLayerMaterial = GetMaterial(m_slabLayer.MaterialId); + if (null != slabLayerMaterial) + { + m_materialName = slabLayerMaterial.Name; + } + else + { + m_materialName = "Null"; + } + + // The Young modulus can be found from the material by using the following generic parameters: + // PHY_MATERIAL_PARAM_YOUNG_MOD1, PHY_MATERIAL_PARAM_YOUNG_MOD2, PHY_MATERIAL_PARAM_YOUNG_MOD3 + if (null != slabLayerMaterial) + { + Parameter? youngModuleAttribute = null; + youngModuleAttribute = slabLayerMaterial.get_Parameter(BuiltInParameter.PHY_MATERIAL_PARAM_YOUNG_MOD1); + if (null != youngModuleAttribute) + { + m_youngModulusX = (youngModuleAttribute.AsDouble() / ToMetricYoungmodulus).ToString("F2") + " MPa"; + } + youngModuleAttribute = slabLayerMaterial.get_Parameter(BuiltInParameter.PHY_MATERIAL_PARAM_YOUNG_MOD2); + if (null != youngModuleAttribute) + { + m_youngModulusY = (youngModuleAttribute.AsDouble() / ToMetricYoungmodulus).ToString("F2") + " MPa"; + } + youngModuleAttribute = slabLayerMaterial.get_Parameter(BuiltInParameter.PHY_MATERIAL_PARAM_YOUNG_MOD3); + if (null != youngModuleAttribute) + { + m_youngModulusZ = (youngModuleAttribute.AsDouble() / ToMetricYoungmodulus).ToString("F2") + " MPa"; + } + } + else + { + m_youngModulusX = "Null"; + m_youngModulusY = "Null"; + m_youngModulusZ = "Null"; + } + } + #endregion + + + #region Private class memeber methods + + /// + /// Get material element from an element id. + /// + private Material? GetMaterial(ElementId elemId) + { + return m_app?.ActiveUIDocument.Document.GetElement(elemId) as Material; + } + + /// + /// Initialization and find out a slab's Level, Type name, and set the Span Direction properties. + /// + /// The revit object for the active instance of Autodesk Revit. + /// A value that signifies if your intitialization was successful for true or failed for false. + private bool Initialize(ThisApplication app) + { + m_slabComponent = app.ActiveUIDocument.Selection.GetElementIds(); + + // There must be exactly one slab selected + if (m_slabComponent.Count == 0) + { + // nothing selected + MessageBox.Show("Please select a slab."); + return false; + } + else if (1 != m_slabComponent.Count) + { + // too many things selected + MessageBox.Show("Please select only one slab."); + return false; + } + + foreach (ElementId id in m_slabComponent) + { + Element e = app.ActiveUIDocument.Document.GetElement(id); + // If the element isn't a slab, give the message and return failure. + // Else find out its Level, Type name, and set the Span Direction properties. + if ("Autodesk.Revit.DB.Floor" != e.GetType().FullName) + { + MessageBox.Show("A slab should be selected."); + return false; + } + + // Change the element type to floor type + m_slabFloor = e as Floor; + + // Get the layer information from the type object by using the CompoundStructure property + // The Layers property is then used to retrieve all the layers + if (m_slabFloor == null) + return false; + m_slabLayerCollection = m_slabFloor.FloorType.GetCompoundStructure().GetLayers(); + m_numberOfLayers = m_slabLayerCollection.Count; + + // Get the Level property by the floor's Level property + m_level = app.ActiveUIDocument.Document.GetElement(m_slabFloor.LevelId).Name; + + // Get the Type name property by the floor's FloorType property + m_typeName = m_slabFloor.FloorType.Name; + + // The span direction can be found using generic parameter access + // using the built in parameter FLOOR_PARAM_SPAN_DIRECTION + Parameter spanDirectionAttribute; + spanDirectionAttribute = m_slabFloor.get_Parameter(BuiltInParameter.FLOOR_PARAM_SPAN_DIRECTION); + if (null != spanDirectionAttribute) + { + // Set the Span Direction property + this.SetSpanDirection(spanDirectionAttribute.AsDouble()); + } + } + return true; + } + + + /// + /// Set SpanDirection property to the class private member + /// Because of the property retrieved from the parameter uses radian for unit, we should change it to degree. + /// + /// The value of span direction property + private void SetSpanDirection(double spanDirection) + { + double spanDirectionDegree; + + // Change "radian" to "degree". + spanDirectionDegree = spanDirection / PI * Degree; + + // If the absolute value very small, we consider it to be zero + if (Math.Abs(spanDirectionDegree) < 1E-12) + { + spanDirectionDegree = 0.0; + } + + // The precision is 0.01, and unit is "degree". + m_spanDirection = spanDirectionDegree.ToString("F2") + "�"; + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SlabProperties/SlabProperitiesForm.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SlabProperties/SlabProperitiesForm.cs new file mode 100644 index 00000000..73e785ba --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SlabProperties/SlabProperitiesForm.cs @@ -0,0 +1,263 @@ +// +// (C) Copyright 2003-2007 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; + + +namespace Revit.SDK.Samples.SlabProperties.CS +{ + /// + /// Show some properties of a slab in Revit Structure 5, including Level, Type name, Span divection, + /// Material name, Thickness, and Young Modulus for each layer of the slab's materiral. + /// + public class SlabPropertiesForm : System.Windows.Forms.Form + { + private System.Windows.Forms.GroupBox? layerGroupBox; + private System.Windows.Forms.RichTextBox? layerRichTextBox; + private System.Windows.Forms.Label? levelLabel; + private System.Windows.Forms.Label? typeNameLabel; + private System.Windows.Forms.Label? spanDirectionLabel; + private System.Windows.Forms.TextBox? levelTextBox; + private System.Windows.Forms.TextBox? typeNameTextBox; + private System.Windows.Forms.TextBox? spanDirectionTextBox; + private System.Windows.Forms.Button? closeButton; + + /// + /// Required designer variable. + /// + private System.ComponentModel.Container? components = null; + + // To store the datas + private SlabProperties? m_dataBuffer; + + + private SlabPropertiesForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + } + + /// + /// overload the constructor + /// + /// To store the datas of a slab + public SlabPropertiesForm(SlabProperties dataBuffer) + { + InitializeComponent(); + + // get all the data + m_dataBuffer = dataBuffer; + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (null != components) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.layerGroupBox = new System.Windows.Forms.GroupBox(); + this.layerRichTextBox = new System.Windows.Forms.RichTextBox(); + this.levelLabel = new System.Windows.Forms.Label(); + this.levelTextBox = new System.Windows.Forms.TextBox(); + this.typeNameTextBox = new System.Windows.Forms.TextBox(); + this.spanDirectionTextBox = new System.Windows.Forms.TextBox(); + this.typeNameLabel = new System.Windows.Forms.Label(); + this.spanDirectionLabel = new System.Windows.Forms.Label(); + this.closeButton = new System.Windows.Forms.Button(); + this.layerGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // layerGroupBox + // + this.layerGroupBox.Controls.Add(this.layerRichTextBox); + this.layerGroupBox.Location = new System.Drawing.Point(22, 86); + this.layerGroupBox.Name = "layerGroupBox"; + this.layerGroupBox.Size = new System.Drawing.Size(375, 265); + this.layerGroupBox.TabIndex = 29; + this.layerGroupBox.TabStop = false; + this.layerGroupBox.Text = "Layers:"; + // + // layerRichTextBox + // + this.layerRichTextBox.Location = new System.Drawing.Point(6, 19); + this.layerRichTextBox.Name = "layerRichTextBox"; + this.layerRichTextBox.ReadOnly = true; + this.layerRichTextBox.Size = new System.Drawing.Size(359, 232); + this.layerRichTextBox.TabIndex = 2; + this.layerRichTextBox.Text = ""; + // + // levelLabel + // + this.levelLabel.Location = new System.Drawing.Point(13, 7); + this.levelLabel.Name = "levelLabel"; + this.levelLabel.Size = new System.Drawing.Size(98, 23); + this.levelLabel.TabIndex = 27; + this.levelLabel.Text = "Level:"; + this.levelLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // levelTextBox + // + this.levelTextBox.Location = new System.Drawing.Point(117, 8); + this.levelTextBox.Name = "levelTextBox"; + this.levelTextBox.ReadOnly = true; + this.levelTextBox.Size = new System.Drawing.Size(280, 20); + this.levelTextBox.TabIndex = 24; + // + // typeNameTextBox + // + this.typeNameTextBox.Location = new System.Drawing.Point(117, 34); + this.typeNameTextBox.Name = "typeNameTextBox"; + this.typeNameTextBox.ReadOnly = true; + this.typeNameTextBox.Size = new System.Drawing.Size(280, 20); + this.typeNameTextBox.TabIndex = 22; + // + // spanDirectionTextBox + // + this.spanDirectionTextBox.Location = new System.Drawing.Point(117, 60); + this.spanDirectionTextBox.Name = "spanDirectionTextBox"; + this.spanDirectionTextBox.ReadOnly = true; + this.spanDirectionTextBox.Size = new System.Drawing.Size(280, 20); + this.spanDirectionTextBox.TabIndex = 23; + // + // typeNameLabel + // + this.typeNameLabel.Location = new System.Drawing.Point(13, 34); + this.typeNameLabel.Name = "typeNameLabel"; + this.typeNameLabel.Size = new System.Drawing.Size(98, 23); + this.typeNameLabel.TabIndex = 25; + this.typeNameLabel.Text = "Type Name:"; + this.typeNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // spanDirectionLabel + // + this.spanDirectionLabel.Location = new System.Drawing.Point(13, 60); + this.spanDirectionLabel.Name = "spanDirectionLabel"; + this.spanDirectionLabel.Size = new System.Drawing.Size(98, 23); + this.spanDirectionLabel.TabIndex = 26; + this.spanDirectionLabel.Text = "Span Direction:"; + this.spanDirectionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // closeButton + // + this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.closeButton.Location = new System.Drawing.Point(322, 367); + this.closeButton.Name = "closeButton"; + this.closeButton.Size = new System.Drawing.Size(75, 23); + this.closeButton.TabIndex = 0; + this.closeButton.Text = "Close"; + this.closeButton.Click += new System.EventHandler(this.closeButton_Click); + // + // SlabPropertiesForm + // + this.AcceptButton = this.closeButton; + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.CancelButton = this.closeButton; + this.ClientSize = new System.Drawing.Size(411, 402); + this.Controls.Add(this.layerGroupBox); + this.Controls.Add(this.levelLabel); + this.Controls.Add(this.levelTextBox); + this.Controls.Add(this.typeNameTextBox); + this.Controls.Add(this.spanDirectionTextBox); + this.Controls.Add(this.typeNameLabel); + this.Controls.Add(this.spanDirectionLabel); + this.Controls.Add(this.closeButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "SlabPropertiesForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Slab Properties"; + this.Load += new System.EventHandler(this.SlabPropertiesForm_Load); + this.layerGroupBox.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + #endregion + + /// + /// Close the Form + /// + /// + /// + private void closeButton_Click(object? sender, System.EventArgs e) + { + Close(); + } + + /// + /// Display the properties on the form when the form load + /// + /// + /// + private void SlabPropertiesForm_Load(object? sender, System.EventArgs e) + { + if (levelTextBox == null || typeNameTextBox == null || spanDirectionTextBox == null || layerRichTextBox == null || m_dataBuffer == null) + return; + this.levelTextBox.Text = m_dataBuffer.Level; + this.typeNameTextBox.Text = m_dataBuffer.TypeName; + this.spanDirectionTextBox.Text = m_dataBuffer.SpanDirection; + + int numberOfLayers = m_dataBuffer.NumberOfLayers; + + this.layerRichTextBox.Text = ""; + + for (int i = 0; i < numberOfLayers; i++) + { + // Get each layer's Material name and Young Modulus properties + m_dataBuffer.SetLayer(i); + + this.layerRichTextBox.Text += "Layer " + (i + 1).ToString() + "\n"; + this.layerRichTextBox.Text += "Material name: " + m_dataBuffer.LayerMaterialName + "\n"; + this.layerRichTextBox.Text += "Thickness: " + m_dataBuffer.LayerThickness + "\n"; + this.layerRichTextBox.Text += "YoungModulus X: " + m_dataBuffer.LayerYoungModulusX + "\n"; + this.layerRichTextBox.Text += "YoungModulus Y: " + m_dataBuffer.LayerYoungModulusY + "\n"; + this.layerRichTextBox.Text += "YoungModulus Z: " + m_dataBuffer.LayerYoungModulusZ + "\n"; + this.layerRichTextBox.Text += "-----------------------------------------------------------" + "\n"; + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SlabProperties/SlabProperitiesForm.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SlabProperties/SlabProperitiesForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/SlabProperties/SlabProperitiesForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/StructuralLayerFunction/Command.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/StructuralLayerFunction/Command.cs new file mode 100644 index 00000000..ed103812 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/StructuralLayerFunction/Command.cs @@ -0,0 +1,141 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Windows.Forms; + +using Autodesk; +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Structure; + +using Autodesk.Revit.UI; +using Autodesk.Revit.UI.Selection; + +using MacroCSharpSamples; +using MacroSamples_RVT; + +namespace Revit.SDK.Samples.StructuralLayerFunction.CS +{ + /// + /// With the selected floor, display the function of each of its structural layers + /// in order from outside to inside in a dialog box + /// + public class StructuralLayerFunction + { + #region Private data members + Autodesk.Revit.DB.Floor? m_slab = null; // Store the selected floor + ArrayList? m_functions; // Store the function of each floor + ThisApplication? m_app; // host document for ThisDocument + #endregion + + + #region class public property + /// + /// With the selected floor, export the function of each of its structural layers + /// + public ArrayList? Functions + { + get + { + return m_functions; + } + } + #endregion + + + #region Class ctor implemetation + /// + /// Ctor without parameter is not allowed + /// + private StructuralLayerFunction() + { + // no codes + } + + /// + /// Default constructor of StructuralLayerFunction + /// + public StructuralLayerFunction(ThisApplication hostApp) + { + // Init for varialbes + // this document handler + m_app = hostApp; + m_functions = new ArrayList(); + } + + /// + /// Run this sample now + /// + public void Run() + { + // + // Get the selected floor + if (m_app == null) + return; + Selection choices = m_app.ActiveUIDocument.Selection; + ICollection collection = choices.GetElementIds(); + // + // Only allow to select one floor, or else report the failure + if (1 != collection.Count) + { + MessageBox.Show("Please select a floor firstly."); + return; + } + foreach (ElementId id in collection) + { + m_slab = m_app.ActiveUIDocument.Document.GetElement(id) as Autodesk.Revit.DB.Floor; + if (null == m_slab) + { + MessageBox.Show("Please select a floor firstly."); + return; + } + } + // + // Get the function of each of its structural layers + if (m_slab == null) + return; + foreach (CompoundStructureLayer e in m_slab.FloorType.GetCompoundStructure().GetLayers()) + { + // With the selected floor, judge if the function of each of its structural layers + // is exist, if it's not exist, there should be zero. + if (0 == e.Function) + { + m_functions?.Add("No function"); + } + else + { + m_functions?.Add(e.Function.ToString()); + } + + } + // + // Display them in a form + StructuralLayerFunctionForm displayForm = new StructuralLayerFunctionForm(this); + displayForm.ShowDialog(); + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/StructuralLayerFunction/StructuralLayerFunctionForm.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/StructuralLayerFunction/StructuralLayerFunctionForm.cs new file mode 100644 index 00000000..6bb7959a --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/StructuralLayerFunction/StructuralLayerFunctionForm.cs @@ -0,0 +1,137 @@ +// +// (C) Copyright 2003-2008 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; + +using MacroCSharpSamples; + +namespace Revit.SDK.Samples.StructuralLayerFunction.CS +{ + /// + /// display the function of each of a select floor's structural layers + /// + public class StructuralLayerFunctionForm : System.Windows.Forms.Form + { + private System.Windows.Forms.ListBox? functionListBox; + private System.Windows.Forms.GroupBox? functionGroupBox; + private System.Windows.Forms.Button? okButton; + + private System.ComponentModel.Container? components = null; + + + /// + /// Constructor of StructuralLayerFunctionForm + /// + /// A reference of StructuralLayerFunction class + public StructuralLayerFunctionForm(StructuralLayerFunction dataBuffer) + { + // Required for Windows Form Designer support + InitializeComponent(); + if (functionListBox == null) + return; + // Set the data source of the ListBox control + functionListBox.DataSource = dataBuffer.Functions; + } + + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (null != components) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.functionListBox = new System.Windows.Forms.ListBox(); + this.functionGroupBox = new System.Windows.Forms.GroupBox(); + this.okButton = new System.Windows.Forms.Button(); + this.functionGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // functionListBox + // + this.functionListBox.Location = new System.Drawing.Point(6, 24); + this.functionListBox.Name = "functionListBox"; + this.functionListBox.Size = new System.Drawing.Size(189, 147); + this.functionListBox.TabIndex = 0; + // + // functionGroupBox + // + this.functionGroupBox.Controls.Add(this.functionListBox); + this.functionGroupBox.Location = new System.Drawing.Point(12, 12); + this.functionGroupBox.Name = "functionGroupBox"; + this.functionGroupBox.Size = new System.Drawing.Size(201, 184); + this.functionGroupBox.TabIndex = 1; + this.functionGroupBox.TabStop = false; + this.functionGroupBox.Text = "Layers Functions List"; + // + // okButton + // + this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.okButton.Location = new System.Drawing.Point(138, 202); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 2; + this.okButton.Text = "OK"; + // + // StructuralLayerFunctionForm + // + this.AcceptButton = this.okButton; + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.CancelButton = this.okButton; + this.ClientSize = new System.Drawing.Size(225, 236); + this.Controls.Add(this.okButton); + this.Controls.Add(this.functionGroupBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "StructuralLayerFunctionForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Structure Layers Function"; + this.functionGroupBox.ResumeLayout(false); + this.ResumeLayout(false); + + } + #endregion + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/StructuralLayerFunction/StructuralLayerFunctionForm.resx b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/StructuralLayerFunction/StructuralLayerFunctionForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/StructuralLayerFunction/StructuralLayerFunctionForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ThisApplication.Designer.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ThisApplication.Designer.cs new file mode 100644 index 00000000..fba18021 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ThisApplication.Designer.cs @@ -0,0 +1,45 @@ +namespace MacroSamples_RVT { + + public sealed partial class ThisApplication : Autodesk.Revit.UI.Macros.ApplicationEntryPoint { + + public event System.EventHandler Startup; + + public event System.EventHandler Shutdown; + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void OnStartup() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void FinishInitialization() { + base.FinishInitialization(); + this.OnStartup(); + this.InternalStartup(); + if ((this.Startup != null)) { + this.Startup(this, System.EventArgs.Empty); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void OnShutdown() { + if ((this.Shutdown != null)) { + this.Shutdown(this, System.EventArgs.Empty); + } + base.OnShutdown(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override string PrimaryCookie { + get { + return "ThisApplication"; + } + } + } +} diff --git a/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ThisApplication.cs b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ThisApplication.cs new file mode 100644 index 00000000..92543859 --- /dev/null +++ b/SDK/Macro Samples/MacroSamples_RVT/Source/MacroSamples_RVT/ThisApplication.cs @@ -0,0 +1,165 @@ +using System; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI.Selection; +using System.Collections.Generic; +using System.Linq; +using Revit.SDK.Samples.QuickPrint.CS; +using Revit.SDK.Samples.FindAndReplaceText.CS; +using Revit.SDK.Samples.CapitalizeText.CS; +using Revit.SDK.Samples.SearchAndReplaceWinType.CS; +using Revit.SDK.Samples.CreateBeamsColumnsBraces.CS; +using Revit.SDK.Samples.DeleteObject.CS; +using Revit.SDK.Samples.ProjectInfo.CS; +using Revit.SDK.Samples.Rooms.CS; +using Revit.SDK.Samples.RotateFramingObjects.CS; +using Revit.SDK.Samples.SlabProperties.CS; +using Revit.SDK.Samples.StructuralLayerFunction.CS; +using Revit.SDK.Samples.GridCreation.CS; + +namespace MacroSamples_RVT +{ + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.DB.Macros.AddInId("9EADAEFA-4C28-40FC-849F-7720890B1490")] + public partial class ThisApplication + { + private void Module_Startup(object? sender, EventArgs e) + { + + } + + private void Module_Shutdown(object? sender, EventArgs e) + { + + } + + #region Revit Macros generated code + private void InternalStartup() + { + this.Startup += new System.EventHandler(Module_Startup); + this.Shutdown += new System.EventHandler(Module_Shutdown); + } + #endregion + + public void CreateBeamsColumnsBraces() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "CreateBeamsColumnsBraces")) + { + trans.Start(); + CreateBeamsColumnsBraces sample = new CreateBeamsColumnsBraces(this); + sample.Run(); + trans.Commit(); + } + } + + public void DeleteObject() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "DeleteObject")) + { + trans.Start(); + DeleteObject sample = new DeleteObject(this); + sample.Run(); + trans.Commit(); + } + + } + public void GridCreation() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "GridCreation")) + { + trans.Start(); + Revit.SDK.Samples.GridCreation.CS.GridCreation sample = new Revit.SDK.Samples.GridCreation.CS.GridCreation(this); + sample.Run(); + trans.Commit(); + } + } + public void ProjectInfo() + { + SampleProjectInfo sample = new SampleProjectInfo(this); + sample.Run(); + } + public void Rooms() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "Rooms")) + { + trans.Start(); + SamplesRoom sample = new SamplesRoom(this); + sample.Run(); + trans.Commit(); + } + } + + public void RotateFramingObjects() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "RotateFramingObjects")) + { + trans.Start(); + RotateFramingObjects sample = new RotateFramingObjects(this); + sample.Run(); + trans.Commit(); + } + } + + public void SlabProperties() + { + SlabProperties sample = new SlabProperties(this); + sample.Run(); + } + + public void StructuralLayerFunction() + { + StructuralLayerFunction sample = new StructuralLayerFunction(this); + sample.Run(); + } + public void QuickPrint_FloorPlans() + { + QuickPrint sample = new QuickPrint(this); + sample.Print(ViewType.FloorPlan); + } + + public void QuickPrint_Elevations() + { + QuickPrint sample = new QuickPrint(this); + sample.Print(ViewType.Elevation); + } + + public void QuickPrint_Section() + { + QuickPrint sample = new QuickPrint(this); + sample.Print(ViewType.Section); + } + + public void FindAndReplaceText() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "FindAndReplaceText")) + { + trans.Start(); + FindAndReplaceText sample = new FindAndReplaceText(this); + sample.Run(); + trans.Commit(); + } + } + + public void CapitalizeText() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "CapitalizeText")) + { + trans.Start(); + CapitalizeText sample = new CapitalizeText(this); + sample.Run(); + trans.Commit(); + } + } + + public void FindAndReplaceWinType() + { + using (Transaction trans = new Transaction(this.ActiveUIDocument.Document, "FindAndReplaceWinType")) + { + trans.Start(); + FindAndReplaceWinType sample = new FindAndReplaceWinType(this); + sample.Run(); + trans.Commit(); + } + } + } +} diff --git a/SDK/Macro Samples/Rooms/Addin/Rooms.dat b/SDK/Macro Samples/Rooms/Addin/Rooms.dat index 2f910acb..25403420 100644 Binary files a/SDK/Macro Samples/Rooms/Addin/Rooms.dat and b/SDK/Macro Samples/Rooms/Addin/Rooms.dat differ diff --git a/SDK/Macro Samples/Rooms/Addin/Rooms.dll b/SDK/Macro Samples/Rooms/Addin/Rooms.dll index d3fec314..41fe8d28 100644 Binary files a/SDK/Macro Samples/Rooms/Addin/Rooms.dll and b/SDK/Macro Samples/Rooms/Addin/Rooms.dll differ diff --git a/SDK/Macro Samples/Rooms/Source/Rooms.sln b/SDK/Macro Samples/Rooms/Source/Rooms.sln deleted file mode 100644 index 0979aa08..00000000 --- a/SDK/Macro Samples/Rooms/Source/Rooms.sln +++ /dev/null @@ -1,24 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -# SharpDevelop 4.2.0.8783 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rooms", "Rooms\Rooms.csproj", "{BD8C08EF-CDCD-4D0A-AAA5-903B62FA1BF3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - RevitVSTA|Any CPU = RevitVSTA|Any CPU - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BD8C08EF-CDCD-4D0A-AAA5-903B62FA1BF3}.RevitVSTA|Any CPU.ActiveCfg = RevitVSTA|Any CPU - {BD8C08EF-CDCD-4D0A-AAA5-903B62FA1BF3}.RevitVSTA|Any CPU.Build.0 = RevitVSTA|Any CPU - {BD8C08EF-CDCD-4D0A-AAA5-903B62FA1BF3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BD8C08EF-CDCD-4D0A-AAA5-903B62FA1BF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BD8C08EF-CDCD-4D0A-AAA5-903B62FA1BF3}.Release|Any CPU.Build.0 = Release|Any CPU - {BD8C08EF-CDCD-4D0A-AAA5-903B62FA1BF3}.Release|Any CPU.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/.vscode/extensions.json b/SDK/Macro Samples/Rooms/Source/Rooms/.vscode/extensions.json new file mode 100644 index 00000000..61ae8a27 --- /dev/null +++ b/SDK/Macro Samples/Rooms/Source/Rooms/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-dotnettools.csharp", + ] +} \ No newline at end of file diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/.vscode/launch.json b/SDK/Macro Samples/Rooms/Source/Rooms/.vscode/launch.json new file mode 100644 index 00000000..a19a9b99 --- /dev/null +++ b/SDK/Macro Samples/Rooms/Source/Rooms/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Revit", + "type": "coreclr", + "request": "attach", + "processName": "revit.exe", + "justMyCode": true + } + ] +} diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/.vscode/tasks.json b/SDK/Macro Samples/Rooms/Source/Rooms/.vscode/tasks.json new file mode 100644 index 00000000..ca683426 --- /dev/null +++ b/SDK/Macro Samples/Rooms/Source/Rooms/.vscode/tasks.json @@ -0,0 +1,14 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build" + ], + "problemMatcher": "$msCompile" + }, + ] +} diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/Command.cs b/SDK/Macro Samples/Rooms/Source/Rooms/Command.cs index cb996447..17cb9e3e 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/Command.cs +++ b/SDK/Macro Samples/Rooms/Source/Rooms/Command.cs @@ -30,64 +30,64 @@ using Autodesk.Revit.DB.Structure; namespace Rooms { - /// - /// Get some properties of a slab , such as Level, Type name, Span direction, - /// Material name, Thickness, and Young Modulus for the slab's Material. - /// - public class SamplesRoom - { - /// - /// Ctor without parameter is not allowed - /// - private SamplesRoom() - { - // no code here - } + /// + /// Get some properties of a slab , such as Level, Type name, Span direction, + /// Material name, Thickness, and Young Modulus for the slab's Material. + /// + public class SamplesRoom + { + /// + /// Ctor without parameter is not allowed + /// + private SamplesRoom() + { + // no code here + } - /// - /// Default constructor of StructuralLayerFunction - /// - public SamplesRoom(ThisApplication hostApp) - { - // Init for varialbes - // this application handler - m_revit = hostApp; - } + /// + /// Default constructor of StructuralLayerFunction + /// + public SamplesRoom(ThisApplication hostApp) + { + // Init for varialbes + // this application handler + m_revit = hostApp; + } - /// - /// Run sample Rooms - /// - public void Run() - { - if (null == m_revit.ActiveUIDocument) + /// + /// Run sample Rooms + /// + public void Run() + { + if (null == m_revit?.ActiveUIDocument) + { + MessageBox.Show("No openning document."); + return; + } + + Transaction trans = new Transaction(m_revit.ActiveUIDocument.Document, "RoomInfo"); + trans.Start(); + try + { + //create a new instance of class Data + RoomsData data = new RoomsData(m_revit); + //create a form to display the room information + using (roomsInformationForm infoForm = new roomsInformationForm(data)) { - MessageBox.Show("No openning document."); - return; + infoForm.ShowDialog(); } + } + catch (Exception ex) + { + // If there are something wrong, give error information + trans.RollBack(); + MessageBox.Show(ex.Message); + } + trans.Commit(); + } - Transaction trans = new Transaction(m_revit.ActiveUIDocument.Document, "RoomInfo"); - trans.Start(); - try - { - //create a new instance of class Data - RoomsData data = new RoomsData(m_revit); - //create a form to display the room information - using (roomsInformationForm infoForm = new roomsInformationForm(data)) - { - infoForm.ShowDialog(); - } - } - catch (Exception ex) - { - // If there are something wrong, give error information - trans.RollBack(); - MessageBox.Show(ex.Message); - } - trans.Commit(); - } - - #region Class member variable - ThisApplication m_revit; - #endregion - } + #region Class member variable + ThisApplication? m_revit; + #endregion + } } diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/Properties/AssemblyInfo.cs b/SDK/Macro Samples/Rooms/Source/Rooms/Properties/AssemblyInfo.cs index 5d80068d..7f4a7cce 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/Properties/AssemblyInfo.cs +++ b/SDK/Macro Samples/Rooms/Source/Rooms/Properties/AssemblyInfo.cs @@ -1,28 +1,31 @@ -using System.Reflection; -using System.Runtime.CompilerServices; +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion -// // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -// -[assembly: AssemblyTitle("Rooms")] +[assembly: AssemblyTitle("NewModule")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Autodesk, Inc.")] -[assembly: AssemblyProduct("Rooms")] -[assembly: AssemblyCopyright("Copyright @ Autodesk, Inc. 2008")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NewModule")] +[assembly: AssemblyCopyright("Copyright 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: [assembly: AssemblyVersion("1.0.*")] diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/RoomInfoForm.cs b/SDK/Macro Samples/Rooms/Source/Rooms/RoomInfoForm.cs index 94ee64b2..24b23bda 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/RoomInfoForm.cs +++ b/SDK/Macro Samples/Rooms/Source/Rooms/RoomInfoForm.cs @@ -4,175 +4,180 @@ using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Collections.ObjectModel; -using System.Windows.Forms; using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Architecture; - +using System.Windows.Forms; namespace Rooms { - /// - /// UI to display the rooms information - /// - public partial class roomsInformationForm : System.Windows.Forms.Form - { - RoomsData m_data; + /// + /// UI to display the rooms information + /// + public partial class roomsInformationForm : System.Windows.Forms.Form + { + RoomsData? m_data; - /// - /// constructor - /// - public roomsInformationForm() - { - InitializeComponent(); - } + /// + /// constructor + /// + public roomsInformationForm() + { + InitializeComponent(); + } - /// - /// Overload the constructor - /// - /// an instanc of Data class - public roomsInformationForm(RoomsData data) - { - m_data = data; - InitializeComponent(); - } + /// + /// Overload the constructor + /// + /// an instanc of Data class + public roomsInformationForm(RoomsData data) + { + m_data = data; + InitializeComponent(); + } - /// - /// add rooms of list roomsWithTag to the listview - /// - private void DisplayRooms(ReadOnlyCollection roomList, bool isHaveTag) - { - String propertyValue = null; //value of department - String departmentName = null; //department name - Double areaValue = 0.0; //room area + /// + /// add rooms of list roomsWithTag to the listview + /// + private void DisplayRooms(ReadOnlyCollection roomList, bool isHaveTag) + { + String? propertyValue = null; //value of department + String? departmentName = null; //department name + Double areaValue = 0.0; //room area - //add rooms to the listview - foreach (Room tmpRoom in roomList) + //add rooms to the listview + foreach (Room tmpRoom in roomList) + { + string roomId = tmpRoom.Id.ToString(); + //create a list view Item + ListViewItem tmpItem = new ListViewItem(roomId); + tmpItem.SubItems.Add(tmpRoom.Name); //display room name. + tmpItem.SubItems.Add(tmpRoom.Number); //display room number. + tmpItem.SubItems.Add(tmpRoom.Level.Name); //display the level + + //get department name from Department property + departmentName = m_data?.GetProperty(tmpRoom, BuiltInParameter.ROOM_DEPARTMENT); + tmpItem.SubItems.Add(departmentName); + + //get property value + propertyValue = m_data?.GetProperty(tmpRoom, BuiltInParameter.ROOM_AREA); + //get the area value + if (propertyValue != null) + areaValue = Double.Parse(propertyValue); + tmpItem.SubItems.Add(propertyValue + " SF"); + //display whether the room with tag or not + if (isHaveTag) { - string roomId = tmpRoom.Id.ToString(); - //create a list view Item - ListViewItem tmpItem = new ListViewItem(roomId); - tmpItem.SubItems.Add(tmpRoom.Name); //display room name. - tmpItem.SubItems.Add(tmpRoom.Number); //display room number. - tmpItem.SubItems.Add(tmpRoom.Level.Name); //display the level - - //get department name from Department property - departmentName = m_data.GetProperty(tmpRoom, BuiltInParameter.ROOM_DEPARTMENT); - tmpItem.SubItems.Add(departmentName); - - //get property value - propertyValue = m_data.GetProperty(tmpRoom, BuiltInParameter.ROOM_AREA); - //get the area value - areaValue = Double.Parse(propertyValue); - tmpItem.SubItems.Add(propertyValue + " SF"); - //display whether the room with tag or not - if (isHaveTag) - { - tmpItem.SubItems.Add("Yes"); - } - else - { - tmpItem.SubItems.Add("No"); - } - - //add the item to the listview - roomsListView.Items.Add(tmpItem); - - //add the area to the department - m_data.CalculateDepartmentArea(departmentName, areaValue); + tmpItem.SubItems.Add("Yes"); + } + else + { + tmpItem.SubItems.Add("No"); } - } - /// - /// when the form was loaded, display the room information - /// - /// - /// - private void RoomInfoForm_Load(object sender, EventArgs e) - { - roomsListView.Items.Clear(); + //add the item to the listview + roomsListView.Items.Add(tmpItem); - //add rooms in the list roomsWithoutTag to the listview + //add the area to the department + if (departmentName != null) + m_data?.CalculateDepartmentArea(departmentName, areaValue); + } + } + + /// + /// when the form was loaded, display the room information + /// + /// + /// + private void RoomInfoForm_Load(object sender, EventArgs e) + { + roomsListView.Items.Clear(); + + //add rooms in the list roomsWithoutTag to the listview + if (m_data != null) + { this.DisplayRooms(m_data.RoomsWithoutTag, false); //add rooms in the list roomsWithTag to the listview this.DisplayRooms(m_data.RoomsWithTag, true); + } - //display the amount of the rooms - String numberOfRooms = "The number of rooms: " + m_data.Rooms.Count.ToString(); - allRoomLabel.Text = numberOfRooms; - //display the amount of the rooms without tags - String roomsWithoutTag = "The number of rooms without tags: " + - m_data.RoomsWithoutTag.Count.ToString(); - tagLabel.Text = roomsWithoutTag; + //display the amount of the rooms + String numberOfRooms = "The number of rooms: " + m_data?.Rooms.Count.ToString(); + allRoomLabel.Text = numberOfRooms; - // if all the rooms have tags ,the button will be set to disable - if (0 == m_data.RoomsWithoutTag.Count) + //display the amount of the rooms without tags + String roomsWithoutTag = "The number of rooms without tags: " + + m_data?.RoomsWithoutTag.Count.ToString(); + tagLabel.Text = roomsWithoutTag; + + // if all the rooms have tags ,the button will be set to disable + if (0 == m_data?.RoomsWithoutTag.Count) + { + addTagsButton.Enabled = false; + } + + //display the total area of each department + this.DisplayDartmentsInfo(); + } + + + /// + /// create room tags for the rooms without tags + /// + private void addTagButton_Click(object sender, EventArgs e) + { + //close the form + m_data?.CreateTags(); + MessageBox.Show("Add tags to rooms successfully", "Macro Sample", MessageBoxButtons.OK, MessageBoxIcon.Information); + this.Close(); + } + + + /// + /// reorder room number + /// + private void reorderButton_Click(object sender, EventArgs e) + { + m_data?.ReorderRooms(); + MessageBox.Show("Reoder rooms successfully", "Macro Sample", MessageBoxButtons.OK, MessageBoxIcon.Information); + this.Close(); + } + + + /// + /// display total room informations for each department + /// + private void DisplayDartmentsInfo() + { + for (int i = 0; i < m_data?.DepartmentInfos.Count; i++) + { + //create a listview item + ListViewItem tmpItem = new ListViewItem(m_data.DepartmentInfos[i].DepartmentName); + tmpItem.SubItems.Add(m_data.DepartmentInfos[i].DepartmentAreaValue.ToString() + " SF"); + departmentsListView.Items.Add(tmpItem); + } + } + + + /// + /// export the total area of each department to a Excel file + /// + private void exportButton_Click(object sender, EventArgs e) + { + //create a save file dialog + using (SaveFileDialog sfdlg = new SaveFileDialog()) + { + sfdlg.Title = "Export area of department to Excel file"; + sfdlg.Filter = "CSV(command delimited)(*.csv)|*.csv"; + sfdlg.RestoreDirectory = true; + + if (DialogResult.OK == sfdlg.ShowDialog()) { - addTagsButton.Enabled = false; + m_data?.ExportFile(sfdlg.FileName); } - - //display the total area of each department - this.DisplayDartmentsInfo(); - } - - - /// - /// create room tags for the rooms without tags - /// - private void addTagButton_Click(object sender, EventArgs e) - { - //close the form - m_data.CreateTags(); - MessageBox.Show("Add tags to rooms successfully", "Macro Sample", MessageBoxButtons.OK, MessageBoxIcon.Information); - this.Close(); - } - - - /// - /// reorder room number - /// - private void reorderButton_Click(object sender, EventArgs e) - { - m_data.ReorderRooms(); - MessageBox.Show("Reoder rooms successfully", "Macro Sample", MessageBoxButtons.OK, MessageBoxIcon.Information); - this.Close(); - } - - - /// - /// display total room informations for each department - /// - private void DisplayDartmentsInfo() - { - for (int i = 0; i < m_data.DepartmentInfos.Count; i++) - { - //create a listview item - ListViewItem tmpItem = new ListViewItem(m_data.DepartmentInfos[i].DepartmentName); - tmpItem.SubItems.Add(m_data.DepartmentInfos[i].DepartmentAreaValue.ToString() + " SF"); - departmentsListView.Items.Add(tmpItem); - } - } - - - /// - /// export the total area of each department to a Excel file - /// - private void exportButton_Click(object sender, EventArgs e) - { - //create a save file dialog - using (SaveFileDialog sfdlg = new SaveFileDialog()) - { - sfdlg.Title = "Export area of department to Excel file"; - sfdlg.Filter = "CSV(command delimited)(*.csv)|*.csv"; - sfdlg.RestoreDirectory = true; - - if (DialogResult.OK == sfdlg.ShowDialog()) - { - m_data.ExportFile(sfdlg.FileName); - } - } - } - } + } + } + } } \ No newline at end of file diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/RoomInfoForm.designer.cs b/SDK/Macro Samples/Rooms/Source/Rooms/RoomInfoForm.designer.cs index 5c0a113f..3ceb8091 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/RoomInfoForm.designer.cs +++ b/SDK/Macro Samples/Rooms/Source/Rooms/RoomInfoForm.designer.cs @@ -10,71 +10,71 @@ namespace Rooms /// private void InitializeComponent() { - this.allRoomLabel = new System.Windows.Forms.Label(); - this.addTagsButton = new System.Windows.Forms.Button(); - this.closeButton = new System.Windows.Forms.Button(); - this.roomsGroupBox = new System.Windows.Forms.GroupBox(); - this.roomsListView = new System.Windows.Forms.ListView(); - this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader8 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader9 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader10 = new System.Windows.Forms.ColumnHeader(); - this.tagLabel = new System.Windows.Forms.Label(); - this.reorderButton = new System.Windows.Forms.Button(); - this.exportButton = new System.Windows.Forms.Button(); - this.departmentGroupBox = new System.Windows.Forms.GroupBox(); - this.departmentsListView = new System.Windows.Forms.ListView(); - this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader7 = new System.Windows.Forms.ColumnHeader(); - this.roomsGroupBox.SuspendLayout(); - this.departmentGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // allRoomLabel - // - this.allRoomLabel.AutoSize = true; - this.allRoomLabel.Location = new System.Drawing.Point(272, 349); - this.allRoomLabel.Name = "allRoomLabel"; - this.allRoomLabel.Size = new System.Drawing.Size(112, 13); - this.allRoomLabel.TabIndex = 9; - this.allRoomLabel.Text = "amountOfRoomsLabel"; - // - // addTagsButton - // - this.addTagsButton.Location = new System.Drawing.Point(431, 412); - this.addTagsButton.Name = "addTagsButton"; - this.addTagsButton.Size = new System.Drawing.Size(75, 23); - this.addTagsButton.TabIndex = 1; - this.addTagsButton.Text = "&Add Tags"; - this.addTagsButton.UseVisualStyleBackColor = true; - this.addTagsButton.Click += new System.EventHandler(this.addTagButton_Click); - // - // closeButton - // - this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.closeButton.Location = new System.Drawing.Point(431, 499); - this.closeButton.Name = "closeButton"; - this.closeButton.Size = new System.Drawing.Size(75, 23); - this.closeButton.TabIndex = 4; - this.closeButton.Text = "&Close"; - this.closeButton.UseVisualStyleBackColor = true; - // - // roomsGroupBox - // - this.roomsGroupBox.Controls.Add(this.roomsListView); - this.roomsGroupBox.Location = new System.Drawing.Point(2, 12); - this.roomsGroupBox.Name = "roomsGroupBox"; - this.roomsGroupBox.Size = new System.Drawing.Size(515, 303); - this.roomsGroupBox.TabIndex = 7; - this.roomsGroupBox.TabStop = false; - this.roomsGroupBox.Text = "Rooms information"; - // - // roomsListView - // - this.roomsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.allRoomLabel = new System.Windows.Forms.Label(); + this.addTagsButton = new System.Windows.Forms.Button(); + this.closeButton = new System.Windows.Forms.Button(); + this.roomsGroupBox = new System.Windows.Forms.GroupBox(); + this.roomsListView = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader8 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader9 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader10 = new System.Windows.Forms.ColumnHeader(); + this.tagLabel = new System.Windows.Forms.Label(); + this.reorderButton = new System.Windows.Forms.Button(); + this.exportButton = new System.Windows.Forms.Button(); + this.departmentGroupBox = new System.Windows.Forms.GroupBox(); + this.departmentsListView = new System.Windows.Forms.ListView(); + this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader7 = new System.Windows.Forms.ColumnHeader(); + this.roomsGroupBox.SuspendLayout(); + this.departmentGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // allRoomLabel + // + this.allRoomLabel.AutoSize = true; + this.allRoomLabel.Location = new System.Drawing.Point(272, 349); + this.allRoomLabel.Name = "allRoomLabel"; + this.allRoomLabel.Size = new System.Drawing.Size(112, 13); + this.allRoomLabel.TabIndex = 9; + this.allRoomLabel.Text = "amountOfRoomsLabel"; + // + // addTagsButton + // + this.addTagsButton.Location = new System.Drawing.Point(431, 412); + this.addTagsButton.Name = "addTagsButton"; + this.addTagsButton.Size = new System.Drawing.Size(75, 23); + this.addTagsButton.TabIndex = 1; + this.addTagsButton.Text = "&Add Tags"; + this.addTagsButton.UseVisualStyleBackColor = true; + this.addTagsButton.Click += new System.EventHandler(this.addTagButton_Click); + // + // closeButton + // + this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.closeButton.Location = new System.Drawing.Point(431, 499); + this.closeButton.Name = "closeButton"; + this.closeButton.Size = new System.Drawing.Size(75, 23); + this.closeButton.TabIndex = 4; + this.closeButton.Text = "&Close"; + this.closeButton.UseVisualStyleBackColor = true; + // + // roomsGroupBox + // + this.roomsGroupBox.Controls.Add(this.roomsListView); + this.roomsGroupBox.Location = new System.Drawing.Point(2, 12); + this.roomsGroupBox.Name = "roomsGroupBox"; + this.roomsGroupBox.Size = new System.Drawing.Size(515, 303); + this.roomsGroupBox.TabIndex = 7; + this.roomsGroupBox.TabStop = false; + this.roomsGroupBox.Text = "Rooms information"; + // + // roomsListView + // + this.roomsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader4, this.columnHeader2, @@ -82,144 +82,144 @@ namespace Rooms this.columnHeader8, this.columnHeader9, this.columnHeader10}); - this.roomsListView.FullRowSelect = true; - this.roomsListView.GridLines = true; - this.roomsListView.Location = new System.Drawing.Point(5, 19); - this.roomsListView.MultiSelect = false; - this.roomsListView.Name = "roomsListView"; - this.roomsListView.Size = new System.Drawing.Size(504, 275); - this.roomsListView.Sorting = System.Windows.Forms.SortOrder.Ascending; - this.roomsListView.TabIndex = 5; - this.roomsListView.UseCompatibleStateImageBehavior = false; - this.roomsListView.View = System.Windows.Forms.View.Details; - // - // columnHeader1 - // - this.columnHeader1.Text = "ID"; - this.columnHeader1.Width = 80; - // - // columnHeader4 - // - this.columnHeader4.Text = "Name"; - // - // columnHeader2 - // - this.columnHeader2.Text = "Number"; - this.columnHeader2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - // - // columnHeader3 - // - this.columnHeader3.Text = "level"; - this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - // - // columnHeader8 - // - this.columnHeader8.Text = "Department"; - this.columnHeader8.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - this.columnHeader8.Width = 80; - // - // columnHeader9 - // - this.columnHeader9.Text = "Area"; - this.columnHeader9.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - this.columnHeader9.Width = 80; - // - // columnHeader10 - // - this.columnHeader10.Text = "Have tag"; - this.columnHeader10.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - // - // tagLabel - // - this.tagLabel.AutoSize = true; - this.tagLabel.Location = new System.Drawing.Point(272, 379); - this.tagLabel.Name = "tagLabel"; - this.tagLabel.Size = new System.Drawing.Size(168, 13); - this.tagLabel.TabIndex = 10; - this.tagLabel.Text = "amountOfRoomsWithoutTagLabel"; - // - // reorderButton - // - this.reorderButton.Location = new System.Drawing.Point(431, 441); - this.reorderButton.Name = "reorderButton"; - this.reorderButton.Size = new System.Drawing.Size(75, 23); - this.reorderButton.TabIndex = 2; - this.reorderButton.Text = "&Reorder"; - this.reorderButton.UseVisualStyleBackColor = true; - this.reorderButton.Click += new System.EventHandler(this.reorderButton_Click); - // - // exportButton - // - this.exportButton.Location = new System.Drawing.Point(431, 470); - this.exportButton.Name = "exportButton"; - this.exportButton.Size = new System.Drawing.Size(75, 23); - this.exportButton.TabIndex = 3; - this.exportButton.Text = "&Export"; - this.exportButton.UseVisualStyleBackColor = true; - this.exportButton.Click += new System.EventHandler(this.exportButton_Click); - // - // departmentGroupBox - // - this.departmentGroupBox.Controls.Add(this.departmentsListView); - this.departmentGroupBox.Location = new System.Drawing.Point(2, 330); - this.departmentGroupBox.Name = "departmentGroupBox"; - this.departmentGroupBox.Size = new System.Drawing.Size(264, 201); - this.departmentGroupBox.TabIndex = 8; - this.departmentGroupBox.TabStop = false; - this.departmentGroupBox.Text = "Area of departments"; - // - // departmentsListView - // - this.departmentsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.roomsListView.FullRowSelect = true; + this.roomsListView.GridLines = true; + this.roomsListView.Location = new System.Drawing.Point(5, 19); + this.roomsListView.MultiSelect = false; + this.roomsListView.Name = "roomsListView"; + this.roomsListView.Size = new System.Drawing.Size(504, 275); + this.roomsListView.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.roomsListView.TabIndex = 5; + this.roomsListView.UseCompatibleStateImageBehavior = false; + this.roomsListView.View = System.Windows.Forms.View.Details; + // + // columnHeader1 + // + this.columnHeader1.Text = "ID"; + this.columnHeader1.Width = 80; + // + // columnHeader4 + // + this.columnHeader4.Text = "Name"; + // + // columnHeader2 + // + this.columnHeader2.Text = "Number"; + this.columnHeader2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + // + // columnHeader3 + // + this.columnHeader3.Text = "level"; + this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + // + // columnHeader8 + // + this.columnHeader8.Text = "Department"; + this.columnHeader8.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.columnHeader8.Width = 80; + // + // columnHeader9 + // + this.columnHeader9.Text = "Area"; + this.columnHeader9.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.columnHeader9.Width = 80; + // + // columnHeader10 + // + this.columnHeader10.Text = "Have tag"; + this.columnHeader10.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + // + // tagLabel + // + this.tagLabel.AutoSize = true; + this.tagLabel.Location = new System.Drawing.Point(272, 379); + this.tagLabel.Name = "tagLabel"; + this.tagLabel.Size = new System.Drawing.Size(168, 13); + this.tagLabel.TabIndex = 10; + this.tagLabel.Text = "amountOfRoomsWithoutTagLabel"; + // + // reorderButton + // + this.reorderButton.Location = new System.Drawing.Point(431, 441); + this.reorderButton.Name = "reorderButton"; + this.reorderButton.Size = new System.Drawing.Size(75, 23); + this.reorderButton.TabIndex = 2; + this.reorderButton.Text = "&Reorder"; + this.reorderButton.UseVisualStyleBackColor = true; + this.reorderButton.Click += new System.EventHandler(this.reorderButton_Click); + // + // exportButton + // + this.exportButton.Location = new System.Drawing.Point(431, 470); + this.exportButton.Name = "exportButton"; + this.exportButton.Size = new System.Drawing.Size(75, 23); + this.exportButton.TabIndex = 3; + this.exportButton.Text = "&Export"; + this.exportButton.UseVisualStyleBackColor = true; + this.exportButton.Click += new System.EventHandler(this.exportButton_Click); + // + // departmentGroupBox + // + this.departmentGroupBox.Controls.Add(this.departmentsListView); + this.departmentGroupBox.Location = new System.Drawing.Point(2, 330); + this.departmentGroupBox.Name = "departmentGroupBox"; + this.departmentGroupBox.Size = new System.Drawing.Size(264, 201); + this.departmentGroupBox.TabIndex = 8; + this.departmentGroupBox.TabStop = false; + this.departmentGroupBox.Text = "Area of departments"; + // + // departmentsListView + // + this.departmentsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader6, this.columnHeader7}); - this.departmentsListView.FullRowSelect = true; - this.departmentsListView.GridLines = true; - this.departmentsListView.Location = new System.Drawing.Point(6, 19); - this.departmentsListView.Name = "departmentsListView"; - this.departmentsListView.Size = new System.Drawing.Size(252, 174); - this.departmentsListView.Sorting = System.Windows.Forms.SortOrder.Ascending; - this.departmentsListView.TabIndex = 6; - this.departmentsListView.UseCompatibleStateImageBehavior = false; - this.departmentsListView.View = System.Windows.Forms.View.Details; - // - // columnHeader6 - // - this.columnHeader6.Text = "Department"; - this.columnHeader6.Width = 120; - // - // columnHeader7 - // - this.columnHeader7.Text = "Total Area"; - this.columnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - this.columnHeader7.Width = 120; - // - // roomsInformationForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.closeButton; - this.ClientSize = new System.Drawing.Size(518, 536); - this.Controls.Add(this.departmentGroupBox); - this.Controls.Add(this.exportButton); - this.Controls.Add(this.reorderButton); - this.Controls.Add(this.tagLabel); - this.Controls.Add(this.roomsGroupBox); - this.Controls.Add(this.closeButton); - this.Controls.Add(this.addTagsButton); - this.Controls.Add(this.allRoomLabel); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "roomsInformationForm"; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Room Information"; - this.Load += new System.EventHandler(this.RoomInfoForm_Load); - this.roomsGroupBox.ResumeLayout(false); - this.departmentGroupBox.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); + this.departmentsListView.FullRowSelect = true; + this.departmentsListView.GridLines = true; + this.departmentsListView.Location = new System.Drawing.Point(6, 19); + this.departmentsListView.Name = "departmentsListView"; + this.departmentsListView.Size = new System.Drawing.Size(252, 174); + this.departmentsListView.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.departmentsListView.TabIndex = 6; + this.departmentsListView.UseCompatibleStateImageBehavior = false; + this.departmentsListView.View = System.Windows.Forms.View.Details; + // + // columnHeader6 + // + this.columnHeader6.Text = "Department"; + this.columnHeader6.Width = 120; + // + // columnHeader7 + // + this.columnHeader7.Text = "Total Area"; + this.columnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.columnHeader7.Width = 120; + // + // roomsInformationForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.closeButton; + this.ClientSize = new System.Drawing.Size(518, 536); + this.Controls.Add(this.departmentGroupBox); + this.Controls.Add(this.exportButton); + this.Controls.Add(this.reorderButton); + this.Controls.Add(this.tagLabel); + this.Controls.Add(this.roomsGroupBox); + this.Controls.Add(this.closeButton); + this.Controls.Add(this.addTagsButton); + this.Controls.Add(this.allRoomLabel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "roomsInformationForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Room Information"; + this.Load += new System.EventHandler(this.RoomInfoForm_Load); + this.roomsGroupBox.ResumeLayout(false); + this.departmentGroupBox.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/Rooms.csproj b/SDK/Macro Samples/Rooms/Source/Rooms/Rooms.csproj index af093c4f..6d5be243 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/Rooms.csproj +++ b/SDK/Macro Samples/Rooms/Source/Rooms/Rooms.csproj @@ -1,177 +1,39 @@ - + - - None - - - - - - - {A860303F-1F3F-4691-B57E-529FC101A107};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - RevitVSTA - AnyCPU - 9.0.30729 - 2.0 - Library - Properties - Rooms - v4.5 - {BD8C08EF-CDCD-4D0A-AAA5-903B62FA1BF3} - - - False - False - OnBuildSuccess - False - False - 4 - false - - - - 4 - - - False + net8.0-windows + enable + enable + true - False - Auto - 4194304 - AnyCPU - 4096 - True - False - None - TRACE + x64 + false + false + False + True + Portable ..\..\Addin\ Rooms + obj\ + DEBUG;TRACE + obj\Debug + false + false + false + false + false + false + false - - - ..\..\..\..\..\RevitAPI.dll + False - - ..\..\..\..\..\RevitAPIUI.dll + False - - - 3.5 - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - RoomInfoForm.cs - - - True - Resources.resx - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - Form - - - RoomInfoForm.cs - - - - Code - - - ThisApplication.cs - - - - - - Never - - - - - Never - - - - - - - - - - - - - - - MEP2011 - {f2d1070d-feff-4610-9403-9476ff28253d} - - - - - + \ No newline at end of file diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/RoomsData.cs b/SDK/Macro Samples/Rooms/Source/Rooms/RoomsData.cs index 9331474f..f43fcf48 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/RoomsData.cs +++ b/SDK/Macro Samples/Rooms/Source/Rooms/RoomsData.cs @@ -13,406 +13,408 @@ using Autodesk.Revit.DB.Architecture; namespace Rooms { - /// - /// Iterates through the rooms in the project and get the information of all the rooms - /// - public class RoomsData - { - ThisApplication m_thisApp; + /// + /// Iterates through the rooms in the project and get the information of all the rooms + /// + public class RoomsData + { + ThisApplication m_thisApp; - List m_rooms = new List(); //a list to store all rooms in the project - List m_roomTags = new List(); //a list to store all room tags in the project - List m_roomsWithTag = new List(); //a list to store all rooms with tag - List m_roomsWithoutTag = new List(); //a list to store all rooms without tag - List m_departmentInfos = new List(); //a list to store department + List m_rooms = new List(); //a list to store all rooms in the project + List m_roomTags = new List(); //a list to store all room tags in the project + List m_roomsWithTag = new List(); //a list to store all rooms with tag + List m_roomsWithoutTag = new List(); //a list to store all rooms without tag + List m_departmentInfos = new List(); //a list to store department - /// - /// a class to stor the value of property Area and Department - /// - public struct DepartmentInfo - { - String m_departmentName; - double m_departmentAreaValue; + /// + /// a class to stor the value of property Area and Department + /// + public struct DepartmentInfo + { + String m_departmentName; + double m_departmentAreaValue; - /// - /// constructor - /// - public DepartmentInfo(String departmentName, double areaValue) - { - m_departmentName = departmentName; - m_departmentAreaValue = areaValue; - } + /// + /// constructor + /// + public DepartmentInfo(String departmentName, double areaValue) + { + m_departmentName = departmentName; + m_departmentAreaValue = areaValue; + } - /// - /// the name of department - /// - public String DepartmentName - { - get - { - return m_departmentName; - } - } - - - /// - /// the total area of the rooms in department - /// - public double DepartmentAreaValue - { - get - { - return m_departmentAreaValue; - } - } - } - - - /// - /// a list of all department - /// - public ReadOnlyCollection DepartmentInfos - { + /// + /// the name of department + /// + public String DepartmentName + { get { - return new ReadOnlyCollection(m_departmentInfos); + return m_departmentName; } - } + } - /// - /// a list of all the rooms in the project - /// - public ReadOnlyCollection Rooms - { + /// + /// the total area of the rooms in department + /// + public double DepartmentAreaValue + { get { - return new ReadOnlyCollection(m_rooms); + return m_departmentAreaValue; } - } + } + } - /// - /// a list of all the room tags in the project - /// - public ReadOnlyCollection RoomTags - { - get + /// + /// a list of all department + /// + public ReadOnlyCollection DepartmentInfos + { + get + { + return new ReadOnlyCollection(m_departmentInfos); + } + } + + + /// + /// a list of all the rooms in the project + /// + public ReadOnlyCollection Rooms + { + get + { + return new ReadOnlyCollection(m_rooms); + } + } + + + /// + /// a list of all the room tags in the project + /// + public ReadOnlyCollection RoomTags + { + get + { + return new ReadOnlyCollection(m_roomTags); + } + } + + + /// + /// a list of the rooms that had tag + /// + public ReadOnlyCollection RoomsWithTag + { + get + { + return new ReadOnlyCollection(m_roomsWithTag); + } + } + + + /// + /// a list of the rooms without tags + /// + public ReadOnlyCollection RoomsWithoutTag + { + get + { + return new ReadOnlyCollection(m_roomsWithoutTag); + } + } + + + /// + ///constructor + /// + public RoomsData(ThisApplication application) + { + m_thisApp = application; + + ElementFilter filterRoom = new ElementClassFilter(typeof(SpatialElement)); + FilteredElementCollector roomCollector = new FilteredElementCollector(m_thisApp.ActiveUIDocument.Document); + roomCollector.WherePasses(filterRoom); + + foreach (Autodesk.Revit.DB.Element ee in roomCollector) + { + Room? tmpRoom = ee as Room; + if (null != tmpRoom) { - return new ReadOnlyCollection(m_roomTags); + m_rooms.Add(tmpRoom); + continue; } - } + + } + ElementFilter filterRoomTag = new ElementClassFilter(typeof(SpatialElementTag)); + FilteredElementCollector roomTagCollector = new FilteredElementCollector(m_thisApp.ActiveUIDocument.Document); + roomTagCollector.WherePasses(filterRoomTag); - /// - /// a list of the rooms that had tag - /// - public ReadOnlyCollection RoomsWithTag - { - get + foreach (Autodesk.Revit.DB.Element ee in roomTagCollector) + { + // find the room tags + RoomTag? tmpTag = ee as RoomTag; + if (null != tmpTag) { - return new ReadOnlyCollection(m_roomsWithTag); + m_roomTags.Add(tmpTag); + continue; } - } + } + + //find out the rooms that without tag + ClassifyRooms(); + } - /// - /// a list of the rooms without tags - /// - public ReadOnlyCollection RoomsWithoutTag - { - get - { - return new ReadOnlyCollection(m_roomsWithoutTag); - } - } + /// + /// find out the rooms that without tag + /// + private void ClassifyRooms() + { + //copy the all the elements in list Rooms to list RoomsWithoutTag + m_roomsWithoutTag.AddRange(m_rooms); - - /// - ///constructor - /// - public RoomsData(ThisApplication application) - { - m_thisApp = application; - - ElementFilter filterRoom = new ElementClassFilter(typeof(SpatialElement)); - FilteredElementCollector roomCollector = new FilteredElementCollector(m_thisApp.ActiveUIDocument.Document); - roomCollector.WherePasses(filterRoom); - - foreach (Autodesk.Revit.DB.Element ee in roomCollector) - { - Room tmpRoom = ee as Room; - if (null != tmpRoom) - { - m_rooms.Add(tmpRoom); - continue; - } - } - - ElementFilter filterRoomTag = new ElementClassFilter(typeof(SpatialElementTag)); - FilteredElementCollector roomTagCollector = new FilteredElementCollector(m_thisApp.ActiveUIDocument.Document); - roomTagCollector.WherePasses(filterRoomTag); - - foreach (Autodesk.Revit.DB.Element ee in roomTagCollector) - { - // find the room tags - RoomTag tmpTag = ee as RoomTag; - if (null != tmpTag) - { - m_roomTags.Add(tmpTag); - continue; - } - } - - //find out the rooms that without tag - ClassifyRooms(); - } - - - /// - /// find out the rooms that without tag - /// - private void ClassifyRooms() - { - //copy the all the elements in list Rooms to list RoomsWithoutTag - m_roomsWithoutTag.AddRange(m_rooms); - - //get the room id from room tag via room property - //if find the room id in list RoomWithoutTag, - //add it to the list RoomWithTag and delete it from list RoomWithoutTag - foreach (RoomTag tmpTag in m_roomTags) - { - m_roomsWithTag.Add(tmpTag.Room); - //search the id for list RoomWithoutTag - foreach (Room tmpRoom in m_rooms) - { - if (tmpTag.Room.Id == tmpRoom.Id) - { - m_roomsWithoutTag.Remove(tmpRoom); - } - } - } - } - - - /// - /// create the room tag for the rooms without tags - /// - public void CreateTags() - { - foreach (Room tmpRoom in m_roomsWithoutTag) - { - //get the location point of the room - LocationPoint locPoint = tmpRoom.Location as LocationPoint; - if(null != locPoint) - { - //create a instance of UV class - double u = locPoint.Point.X; - double v = locPoint.Point.Y; - - UV point = m_thisApp.Application.Create.NewUV(u, v); - - //create room tag - - m_thisApp.ActiveUIDocument.Document.Create.NewRoomTag(new LinkElementId(tmpRoom.Id), point, null); - } - } - } - - - /// - /// sort all the rooms by ascending order according their coordinate - /// - private void SortRooms() - { - LocationPoint tmpPoint = null; - LocationPoint roomPoint = null; - Room listRoom = null; - int result = 0; - int flag = 0; - int amount = m_rooms.Count; - - //sort the rooms according their location point - for (int i = 0; i < amount - 1; i++) - { - Room tmpRoom = m_rooms[i]; - tmpPoint = tmpRoom.Location as LocationPoint; - if(null == tmpPoint) - continue; - for (int j = i + 1; j < amount; j++) - { - listRoom = m_rooms[j]; - roomPoint = listRoom.Location as LocationPoint; - if(null == roomPoint) - continue; - - //rooms in different level - if (tmpPoint.Point.Z > roomPoint.Point.Z) - { - tmpRoom = listRoom; - result = j; - //if tmpRoom was changed,set flag to 1 - flag = 1; - } - //the two rooms in the same level - else if (tmpPoint.Point.Z == roomPoint.Point.Z) - { - if (tmpPoint.Point.X > roomPoint.Point.X) - { - tmpRoom = listRoom; - result = j; - flag = 1; - } - else if (tmpPoint.Point.X == roomPoint.Point.X && - tmpPoint.Point.Y > roomPoint.Point.Y) - { - tmpRoom = listRoom; - result = j; - flag = 1; - } - } - } - - //if flag equals 1 ,move the room to the front of list - if (1 == flag) - { - Room tempRoom = m_rooms[i]; - m_rooms[i] = m_rooms[result]; - m_rooms[result] = tempRoom; - flag = 0; - } - } - } - - - /// - /// reorder all the rooms' number - /// - /// a list of rooms - public void ReorderRooms() - { - //sort all the rooms by ascending order according their coordinate - this.SortRooms(); - - //to avoid revit display the warning message, - //change the rooms' name to a temp name + //get the room id from room tag via room property + //if find the room id in list RoomWithoutTag, + //add it to the list RoomWithTag and delete it from list RoomWithoutTag + foreach (RoomTag tmpTag in m_roomTags) + { + m_roomsWithTag.Add(tmpTag.Room); + //search the id for list RoomWithoutTag foreach (Room tmpRoom in m_rooms) { - tmpRoom.Number += "XXX"; + if (tmpTag.Room.Id == tmpRoom.Id) + { + m_roomsWithoutTag.Remove(tmpRoom); + } } + } + } - //set the rooms number to a new order - for (int i = 1; i <= m_rooms.Count; i++) + + /// + /// create the room tag for the rooms without tags + /// + public void CreateTags() + { + foreach (Room tmpRoom in m_roomsWithoutTag) + { + //get the location point of the room + LocationPoint? locPoint = tmpRoom.Location as LocationPoint; + if (null != locPoint) { - m_rooms[i - 1].Number = i.ToString(); + //create a instance of UV class + double u = locPoint.Point.X; + double v = locPoint.Point.Y; + + UV point = m_thisApp.Application.Create.NewUV(u, v); + + //create room tag + + m_thisApp.ActiveUIDocument.Document.Create.NewRoomTag(new LinkElementId(tmpRoom.Id), point, null); } - } + } + } - /// - /// get the room property and Department property according the property name - /// - /// a instance of room class - /// the property name - /// the value of property - public String GetProperty(Room room, BuiltInParameter paramEnum) - { - String propertyValue = null; //the value of parameter + /// + /// sort all the rooms by ascending order according their coordinate + /// + private void SortRooms() + { + LocationPoint? tmpPoint = null; + LocationPoint? roomPoint = null; + Room? listRoom = null; + int result = 0; + int flag = 0; + int amount = m_rooms.Count; - //get the parameter via the parameterId - Parameter param = room.get_Parameter(paramEnum); - //get the parameter's storage type - StorageType storageType = param.StorageType; - switch (storageType) + //sort the rooms according their location point + for (int i = 0; i < amount - 1; i++) + { + Room tmpRoom = m_rooms[i]; + tmpPoint = tmpRoom.Location as LocationPoint; + if (null == tmpPoint) + continue; + for (int j = i + 1; j < amount; j++) { - case StorageType.Integer: - int iVal = param.AsInteger(); - propertyValue = iVal.ToString(); - break; - case StorageType.String: - String stringVal = param.AsString(); - propertyValue = stringVal; - break; - case StorageType.Double: - Double dVal = param.AsDouble(); - dVal = Math.Round(dVal, 2); - propertyValue = dVal.ToString(); - break; - default: - break; + listRoom = m_rooms[j]; + roomPoint = listRoom.Location as LocationPoint; + if (null == roomPoint) + continue; + + //rooms in different level + if (tmpPoint.Point.Z > roomPoint.Point.Z) + { + tmpRoom = listRoom; + result = j; + //if tmpRoom was changed,set flag to 1 + flag = 1; + } + //the two rooms in the same level + else if (tmpPoint.Point.Z == roomPoint.Point.Z) + { + if (tmpPoint.Point.X > roomPoint.Point.X) + { + tmpRoom = listRoom; + result = j; + flag = 1; + } + else if (tmpPoint.Point.X == roomPoint.Point.X && + tmpPoint.Point.Y > roomPoint.Point.Y) + { + tmpRoom = listRoom; + result = j; + flag = 1; + } + } } - return propertyValue; - } - - /// - /// calculate the area of rooms for each department - /// - /// the department name - /// the value of room area - public void CalculateDepartmentArea(String deparName, Double areaValue) - { - //if the array list is empty add a new instance of DepartmentArea to the list - if (0 == m_departmentInfos.Count) + //if flag equals 1 ,move the room to the front of list + if (1 == flag) { - //create a new instance of DepartmentArea struct and insert it to the list - DepartmentInfo tmpDep = new DepartmentInfo(deparName, areaValue); - m_departmentInfos.Add(tmpDep); + Room tempRoom = m_rooms[i]; + m_rooms[i] = m_rooms[result]; + m_rooms[result] = tempRoom; + flag = 0; } - else + } + } + + + /// + /// reorder all the rooms' number + /// + /// a list of rooms + public void ReorderRooms() + { + //sort all the rooms by ascending order according their coordinate + this.SortRooms(); + + //to avoid revit display the warning message, + //change the rooms' name to a temp name + foreach (Room tmpRoom in m_rooms) + { + tmpRoom.Number += "XXX"; + } + + //set the rooms number to a new order + for (int i = 1; i <= m_rooms.Count; i++) + { + m_rooms[i - 1].Number = i.ToString(); + } + } + + + /// + /// get the room property and Department property according the property name + /// + /// a instance of room class + /// the property name + /// the value of property + public String GetProperty(Room room, BuiltInParameter paramEnum) + { + String? propertyValue = null; //the value of parameter + + //get the parameter via the parameterId + Parameter param = room.get_Parameter(paramEnum); + //get the parameter's storage type + StorageType storageType = param.StorageType; + switch (storageType) + { + case StorageType.Integer: + int iVal = param.AsInteger(); + propertyValue = iVal.ToString(); + break; + case StorageType.String: + String stringVal = param.AsString(); + propertyValue = stringVal; + break; + case StorageType.Double: + Double dVal = param.AsDouble(); + dVal = Math.Round(dVal, 2); + propertyValue = dVal.ToString(); + break; + default: + break; + } + + return propertyValue != null? propertyValue :String.Empty; + } + + + /// + /// calculate the area of rooms for each department + /// + /// the department name + /// the value of room area + public void CalculateDepartmentArea(String deparName, Double areaValue) + { + //if the array list is empty add a new instance of DepartmentArea to the list + if (0 == m_departmentInfos.Count) + { + //create a new instance of DepartmentArea struct and insert it to the list + DepartmentInfo tmpDep = new DepartmentInfo(deparName, areaValue); + m_departmentInfos.Add(tmpDep); + } + else + { + int flag = 0; + //find whether the department exist in the project + for (int i = 0; i < m_departmentInfos.Count; i++) { - int flag = 0; - //find whether the department exist in the project - for (int i = 0; i < m_departmentInfos.Count; i++) - { - if (deparName == m_departmentInfos[i].DepartmentName) - { - double tempValue = m_departmentInfos[i].DepartmentAreaValue + areaValue; - DepartmentInfo tempInstance = new DepartmentInfo(deparName, tempValue); - m_departmentInfos[i] = tempInstance; - flag = 1; - } - } - //if found a new department, - //create a new instance of DepartmentArea struct and insert it to the list - if (0 == flag) - { - DepartmentInfo tmpDep = new DepartmentInfo(deparName, areaValue); - m_departmentInfos.Add(tmpDep); - } + if (deparName == m_departmentInfos[i].DepartmentName) + { + double tempValue = m_departmentInfos[i].DepartmentAreaValue + areaValue; + DepartmentInfo tempInstance = new DepartmentInfo(deparName, tempValue); + m_departmentInfos[i] = tempInstance; + flag = 1; + } } - } - - - - /// - /// export data into an Excel file - /// - /// - public void ExportFile(String fileName) - { - //store all the information that to be exported - String allData = ""; - - //get the project title - String projectTitle = m_thisApp.ActiveUIDocument.Document.Title; //the name of the project - allData += "Total Rooms area of " + projectTitle + "\n"; - allData += "Department" + "," + "Area" + "\n"; - - foreach (DepartmentInfo tmp in m_departmentInfos) + //if found a new department, + //create a new instance of DepartmentArea struct and insert it to the list + if (0 == flag) { - allData += tmp.DepartmentName + "," + tmp.DepartmentAreaValue + " SF\n"; + DepartmentInfo tmpDep = new DepartmentInfo(deparName, areaValue); + m_departmentInfos.Add(tmpDep); } + } + } - //save the information into a Excel file - if (allData.Length > 0) - { - System.IO.StreamWriter exportinfo = new System.IO.StreamWriter(fileName); - exportinfo.WriteLine(allData); - exportinfo.Close(); - } - } - } + + + /// + /// export data into an Excel file + /// + /// + public void ExportFile(String fileName) + { + //store all the information that to be exported + String allData = ""; + + //get the project title + String projectTitle = m_thisApp.ActiveUIDocument.Document.Title; //the name of the project + allData += "Total Rooms area of " + projectTitle + "\n"; + allData += "Department" + "," + "Area" + "\n"; + + foreach (DepartmentInfo tmp in m_departmentInfos) + { + allData += tmp.DepartmentName + "," + tmp.DepartmentAreaValue + " SF\n"; + } + + //save the information into a Excel file + if (allData.Length > 0) + { + System.IO.StreamWriter exportinfo = new System.IO.StreamWriter(fileName); + exportinfo.WriteLine(allData); + exportinfo.Close(); + } + } + } } diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/ThisApplication.cs b/SDK/Macro Samples/Rooms/Source/Rooms/ThisApplication.cs index aeb623ec..6982d30c 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/ThisApplication.cs +++ b/SDK/Macro Samples/Rooms/Source/Rooms/ThisApplication.cs @@ -1,33 +1,37 @@ using System; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI.Selection; +using System.Collections.Generic; +using System.Linq; namespace Rooms { - [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] - [Autodesk.Revit.DB.Macros.AddInIdAttribute("51FFA7F2-0DA4-4D7B-8D7E-FED1897D4F8D")] - public partial class ThisApplication - { - private void Module_Startup(object sender, EventArgs e) - { + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.DB.Macros.AddInId("BF1E6F6A-4B74-4218-9D35-7AC448FBFCB4")] + public partial class ThisApplication + { + private void Module_Startup(object? sender, EventArgs e) + { - } + } - private void Module_Shutdown(object sender, EventArgs e) - { + private void Module_Shutdown(object? sender, EventArgs e) + { - } + } - #region Revit Macros generated code - private void InternalStartup() - { - this.Startup += new System.EventHandler(Module_Startup); - this.Shutdown += new System.EventHandler(Module_Shutdown); - } - #endregion - - public void GetAllRoomsInformation() - { - SamplesRoom sampleRoom = new SamplesRoom(this); - sampleRoom.Run(); - } - } + #region Revit Macros generated code + private void InternalStartup() + { + this.Startup += new System.EventHandler(Module_Startup); + this.Shutdown += new System.EventHandler(Module_Shutdown); + } + #endregion + public void GetAllRoomsInformation() + { + SamplesRoom sampleRoom = new SamplesRoom(this); + sampleRoom.Run(); + } + } } diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/ThisApplication.designer.cs b/SDK/Macro Samples/Rooms/Source/Rooms/ThisApplication.designer.cs index 99574abc..c6b03fac 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/ThisApplication.designer.cs +++ b/SDK/Macro Samples/Rooms/Source/Rooms/ThisApplication.designer.cs @@ -1,18 +1,5 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3603 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ +namespace Rooms { -namespace Rooms { - - - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Applications.ProgrammingModel.dll", "9.0.0.0")] public sealed partial class ThisApplication : Autodesk.Revit.UI.Macros.ApplicationEntryPoint { public event System.EventHandler Startup; @@ -23,7 +10,6 @@ namespace Rooms { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] private void OnStartup() { - Globals.ThisApplication = this; } /// @@ -56,24 +42,4 @@ namespace Rooms { } } } - - /// - public sealed partial class Globals { - - private static ThisApplication _ThisApplication; - - internal static ThisApplication ThisApplication { - get { - return _ThisApplication; - } - set { - if ((_ThisApplication == null)) { - _ThisApplication = value; - } - else { - throw new System.NotSupportedException(); - } - } - } - } } diff --git a/SDK/Read Me First.doc b/SDK/Read Me First.doc index 9ffa9e5b..f9021297 100644 Binary files a/SDK/Read Me First.doc and b/SDK/Read Me First.doc differ diff --git a/SDK/Revit Platform API Changes and Additions.docx b/SDK/Revit Platform API Changes and Additions.docx index 99b8a6da..31767fce 100644 Binary files a/SDK/Revit Platform API Changes and Additions.docx and b/SDK/Revit Platform API Changes and Additions.docx differ diff --git a/SDK/RevitAPI.chm b/SDK/RevitAPI.chm index d44ee573..af6c00ef 100644 Binary files a/SDK/RevitAPI.chm and b/SDK/RevitAPI.chm differ diff --git a/SDK/RevitAddInUtility.chm b/SDK/RevitAddInUtility.chm index d7e0e32e..a31a6532 100644 Binary files a/SDK/RevitAddInUtility.chm and b/SDK/RevitAddInUtility.chm differ diff --git a/SDK/Samples/APIAppStartup/CS/APIAppStartup.csproj b/SDK/Samples/APIAppStartup/CS/APIAppStartup.csproj index 0650bb80..dc34d568 100644 --- a/SDK/Samples/APIAppStartup/CS/APIAppStartup.csproj +++ b/SDK/Samples/APIAppStartup/CS/APIAppStartup.csproj @@ -1,105 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D6C256D4-B518-464F-9E68-CB282202E846} - Library - Properties - APIAppStartup - APIAppStartup - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - True - True - Resources.resx - - - Form - - - SplashWindow.cs - - - - - Designer - ResXFileCodeGenerator - Resources.Designer.cs - - - Designer - SplashWindow.cs - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/APIAppStartup/CS/AppSample.cs b/SDK/Samples/APIAppStartup/CS/AppSample.cs index 1e9dca37..d223d501 100644 --- a/SDK/Samples/APIAppStartup/CS/AppSample.cs +++ b/SDK/Samples/APIAppStartup/CS/AppSample.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted @@ -21,16 +21,11 @@ // (Rights in Technical Data and Computer Software), as applicable. using System; -using System.Collections.Generic; -using System.Text; using System.Windows.Forms; -using System.IO; -using Autodesk; -using Autodesk.Revit; -using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using Autodesk.Revit.ApplicationServices; + +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace APIAppStartup { diff --git a/SDK/Samples/APIAppStartup/CS/Properties/AssemblyInfo.cs b/SDK/Samples/APIAppStartup/CS/Properties/AssemblyInfo.cs index 64cbb6e8..8b456f8a 100644 --- a/SDK/Samples/APIAppStartup/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/APIAppStartup/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -10,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("APIAppStartup")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -33,3 +32,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/AddSpaceAndZone/CS/AddSpaceAndZone.csproj b/SDK/Samples/AddSpaceAndZone/CS/AddSpaceAndZone.csproj index b09748ae..dc34d568 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/AddSpaceAndZone.csproj +++ b/SDK/Samples/AddSpaceAndZone/CS/AddSpaceAndZone.csproj @@ -1,108 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {8CA72C14-FB27-42F8-8F6E-18BBCEA10ECB} - Library - Properties - AddSpaceAndZone - AddSpaceAndZone - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - MainForm.cs - - - - - - - Form - - - ZoneEditorForm.cs - - - - - - - Designer - MainForm.cs - - - Designer - ZoneEditorForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/AddSpaceAndZone/CS/Command.cs b/SDK/Samples/AddSpaceAndZone/CS/Command.cs index 7f66cedd..a35cbba7 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/Command.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/DataManager.cs b/SDK/Samples/AddSpaceAndZone/CS/DataManager.cs index 4870e11e..8382fe66 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/DataManager.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/DataManager.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/MainForm.Designer.cs b/SDK/Samples/AddSpaceAndZone/CS/MainForm.Designer.cs index 13ae72a0..0a2c4d2a 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/MainForm.Designer.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/MainForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/MainForm.cs b/SDK/Samples/AddSpaceAndZone/CS/MainForm.cs index a19e5c07..8ad68446 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/MainForm.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/MainForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/Properties/AssemblyInfo.cs b/SDK/Samples/AddSpaceAndZone/CS/Properties/AssemblyInfo.cs index 1ad9f254..9c2abd3c 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,7 +21,6 @@ // using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -32,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AddSpaceAndZone")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -55,3 +54,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/AddSpaceAndZone/CS/SpaceItem.cs b/SDK/Samples/AddSpaceAndZone/CS/SpaceItem.cs index 758aaf87..7fd933de 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/SpaceItem.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/SpaceItem.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/SpaceManager.cs b/SDK/Samples/AddSpaceAndZone/CS/SpaceManager.cs index f5588dca..8e725ade 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/SpaceManager.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/SpaceManager.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/SpaceNode.cs b/SDK/Samples/AddSpaceAndZone/CS/SpaceNode.cs index 0638a83e..394cee90 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/SpaceNode.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/SpaceNode.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/ZoneEditorForm.Designer.cs b/SDK/Samples/AddSpaceAndZone/CS/ZoneEditorForm.Designer.cs index 79566a15..29bb283a 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/ZoneEditorForm.Designer.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/ZoneEditorForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/ZoneEditorForm.cs b/SDK/Samples/AddSpaceAndZone/CS/ZoneEditorForm.cs index f27a0444..564a15e6 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/ZoneEditorForm.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/ZoneEditorForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/ZoneManager.cs b/SDK/Samples/AddSpaceAndZone/CS/ZoneManager.cs index abe5dac6..1500272a 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/ZoneManager.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/ZoneManager.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AddSpaceAndZone/CS/ZoneNode.cs b/SDK/Samples/AddSpaceAndZone/CS/ZoneNode.cs index 3ed829ed..08fdb1a1 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/ZoneNode.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/ZoneNode.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,10 +21,7 @@ // using System; -using System.Collections.Generic; -using System.Text; using System.Windows.Forms; -using Autodesk.Revit.DB; using Autodesk.Revit.DB.Mechanical; namespace Revit.SDK.Samples.AddSpaceAndZone.CS @@ -34,6 +31,7 @@ namespace Revit.SDK.Samples.AddSpaceAndZone.CS /// to display the Zones is a TreeView, each ZoneNode contains /// a Zone element. /// + [Serializable] public class ZoneNode : TreeNode { Zone m_zone; diff --git a/SDK/Samples/AllViews/CS/AllViews.cs b/SDK/Samples/AllViews/CS/AllViews.cs index 2b255f07..d2c83e24 100644 --- a/SDK/Samples/AllViews/CS/AllViews.cs +++ b/SDK/Samples/AllViews/CS/AllViews.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2022 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -93,7 +93,7 @@ namespace Revit.SDK.Samples.AllViews.CS /// Generating a new sheet that has all the selected views placed in. /// Updating and retrieving properties of a selected viewport. /// - public class ViewsMgr + public class ViewsMgr : IDisposable { private TreeNode m_allViewsNames = new TreeNode("Views (all)"); private ViewSet m_allViews = new ViewSet(); @@ -588,5 +588,24 @@ namespace Revit.SDK.Samples.AllViews.CS view.Scale = (int)(view.Scale * Rescale); } } - } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + m_allViews.Dispose(); + m_selectedViews.Dispose(); + } + + // TODO: free unmanaged resources (unmanaged objects) and override finalizer + // TODO: set large fields to null + } + + public void Dispose() + { + // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + } } diff --git a/SDK/Samples/AllViews/CS/AllViews.csproj b/SDK/Samples/AllViews/CS/AllViews.csproj index 1085dd06..75a295a5 100644 --- a/SDK/Samples/AllViews/CS/AllViews.csproj +++ b/SDK/Samples/AllViews/CS/AllViews.csproj @@ -1,100 +1,11 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F749EB68-5DEE-4029-8669-49CE5C32CE20} - Library - Properties - AllViews - AllViews - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - AllViewsForm.cs - - - - - - Designer - AllViewsForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/AllViews/CS/AllViewsForm.Designer.cs b/SDK/Samples/AllViews/CS/AllViewsForm.Designer.cs index 086cb46a..bfad9666 100644 --- a/SDK/Samples/AllViews/CS/AllViewsForm.Designer.cs +++ b/SDK/Samples/AllViews/CS/AllViewsForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AllViews/CS/AllViewsForm.cs b/SDK/Samples/AllViews/CS/AllViewsForm.cs index c1201253..64fe469c 100644 --- a/SDK/Samples/AllViews/CS/AllViewsForm.cs +++ b/SDK/Samples/AllViews/CS/AllViewsForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AllViews/CS/Properties/AssemblyInfo.cs b/SDK/Samples/AllViews/CS/Properties/AssemblyInfo.cs index 76151d61..a6f6f9c3 100644 --- a/SDK/Samples/AllViews/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/AllViews/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,7 +21,6 @@ // using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -32,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AllViews")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -55,3 +54,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/Command.cs b/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/Command.cs deleted file mode 100644 index 2411d0ba..00000000 --- a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/Command.cs +++ /dev/null @@ -1,207 +0,0 @@ -// -// (C) Copyright 2003-2019 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// - -using System; -using System.Linq; -using System.Collections.Generic; -using Autodesk.Revit; -using Autodesk.Revit.DB; -using Autodesk.Revit.DB.Events; -using Autodesk.Revit.DB.Analysis; -using Autodesk.Revit.UI; - - -namespace Revit.SDK.Samples.AnalysisVisualizationFramework.CS -{ - [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] - [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] - public class DistanceToSurfaces : IExternalApplication - { - public Result OnStartup(UIControlledApplication uiControlledApplication) - { - uiControlledApplication.ControlledApplication.DocumentOpened += new EventHandler(docOpen); - return Result.Succeeded; - } - - private void docOpen(object sender, DocumentOpenedEventArgs e) - { - Autodesk.Revit.ApplicationServices.Application app = sender as Autodesk.Revit.ApplicationServices.Application; - UIApplication uiApp = new UIApplication(app); - Document doc = uiApp.ActiveUIDocument.Document; - - FilteredElementCollector collector = new FilteredElementCollector(doc); - collector.WherePasses(new ElementClassFilter(typeof(FamilyInstance))); - var sphereElements = from element in collector where element.Name == "sphere" select element; - if (sphereElements.Count() == 0) - { - TaskDialog.Show("Error", "Sphere family must be loaded"); - return; - } - FamilyInstance sphere = sphereElements.Cast().First(); - FilteredElementCollector viewCollector = new FilteredElementCollector(doc); - ICollection views = viewCollector.OfClass(typeof(View3D)).ToElements(); - var viewElements = from element in viewCollector where element.Name == "AVF" select element; - if (viewElements.Count() == 0) - { - TaskDialog.Show("Error", "A 3D view named 'AVF' must exist to run this application."); - return; - } - View view = viewElements.Cast().First(); - - SpatialFieldUpdater updater = new SpatialFieldUpdater(uiApp.ActiveAddInId, sphere.Id, view.Id); - if (!UpdaterRegistry.IsUpdaterRegistered(updater.GetUpdaterId())) UpdaterRegistry.RegisterUpdater(updater); - ElementCategoryFilter wallFilter = new ElementCategoryFilter(BuiltInCategory.OST_Walls); - ElementClassFilter familyFilter = new ElementClassFilter(typeof(FamilyInstance)); - ElementCategoryFilter massFilter = new ElementCategoryFilter(BuiltInCategory.OST_Mass); - IList filterList = new List(); - filterList.Add(wallFilter); - filterList.Add(familyFilter); - filterList.Add(massFilter); - LogicalOrFilter filter = new LogicalOrFilter(filterList); - - UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), filter, Element.GetChangeTypeGeometry()); - UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), filter, Element.GetChangeTypeElementDeletion()); - } - public Result OnShutdown(UIControlledApplication application) {return Result.Succeeded;} - } - - public class SpatialFieldUpdater : IUpdater - { - AddInId addinID; - UpdaterId updaterID; - ElementId sphereID; - ElementId viewID; - public SpatialFieldUpdater(AddInId id, ElementId sphere, ElementId view) - { - addinID = id; - sphereID = sphere; - viewID = view; - updaterID = new UpdaterId(addinID, new Guid("FBF2F6B2-4C06-42d4-97C1-D1B4EB593EFF")); - } - public void Execute(UpdaterData data) - { - Document doc = data.GetDocument(); - Autodesk.Revit.ApplicationServices.Application app = doc.Application; - - View view = doc.GetElement(viewID) as View; - FamilyInstance sphere = doc.GetElement(sphereID) as FamilyInstance; - LocationPoint sphereLP = sphere.Location as LocationPoint; - XYZ sphereXYZ = sphereLP.Point; - - SpatialFieldManager sfm = SpatialFieldManager.GetSpatialFieldManager(view); - if (sfm == null) sfm = SpatialFieldManager.CreateSpatialFieldManager(view, 3); // Three measurement values for each point - sfm.Clear(); - - FilteredElementCollector collector = new FilteredElementCollector(doc,view.Id); - ElementCategoryFilter wallFilter = new ElementCategoryFilter(BuiltInCategory.OST_Walls); - ElementCategoryFilter massFilter = new ElementCategoryFilter(BuiltInCategory.OST_Mass); - LogicalOrFilter filter = new LogicalOrFilter(wallFilter, massFilter); - ICollection elements = collector.WherePasses(filter).WhereElementIsNotElementType().ToElements(); - - foreach (Face face in GetFaces(elements)) - { - int idx = sfm.AddSpatialFieldPrimitive(face.Reference); - List doubleList = new List(); - IList uvPts = new List(); - IList valList = new List(); - BoundingBoxUV bb = face.GetBoundingBox(); - for (double u = bb.Min.U; u < bb.Max.U; u = u + (bb.Max.U - bb.Min.U) / 15) - { - for (double v = bb.Min.V; v < bb.Max.V; v = v + (bb.Max.V - bb.Min.V) / 15) - { - UV uvPnt = new UV(u, v); - uvPts.Add(uvPnt); - XYZ faceXYZ = face.Evaluate(uvPnt); - // Specify three values for each point - doubleList.Add(faceXYZ.DistanceTo(sphereXYZ)); - doubleList.Add(-faceXYZ.DistanceTo(sphereXYZ)); - doubleList.Add(faceXYZ.DistanceTo(sphereXYZ) * 10); - valList.Add(new ValueAtPoint(doubleList)); - doubleList.Clear(); - } - } - FieldDomainPointsByUV pnts = new FieldDomainPointsByUV(uvPts); - FieldValues vals = new FieldValues(valList); - - AnalysisResultSchema resultSchema1 = new AnalysisResultSchema("Schema 1", "Schema 1 Description"); - IList registeredResults = new List(); - registeredResults = sfm.GetRegisteredResults(); - int idx1 = 0; - if (registeredResults.Count == 0) - { - idx1 = sfm.RegisterResult(resultSchema1); - } - else - { - idx1 = registeredResults.First(); - } - sfm.UpdateSpatialFieldPrimitive(idx, pnts, vals, idx1); - } - } - public string GetAdditionalInformation() { return "Calculate distance from sphere to walls and display results"; } - public ChangePriority GetChangePriority() { return ChangePriority.FloorsRoofsStructuralWalls; } - public UpdaterId GetUpdaterId() { return updaterID; } - public string GetUpdaterName() { return "Distance to Surfaces"; } - - private FaceArray GetFaces(ICollection elements) - { - FaceArray faceArray = new FaceArray(); - Options options = new Options(); - options.ComputeReferences = true; - foreach (Element element in elements) - { - GeometryElement geomElem = element.get_Geometry(options); - if (geomElem != null) - { - foreach (GeometryObject geomObj in geomElem) - { - Solid solid = geomObj as Solid; - if (solid != null) - { - foreach (Face f in solid.Faces) - { - faceArray.Append(f); - } - } - GeometryInstance inst = geomObj as GeometryInstance; - if (inst != null) // in-place family walls - { - foreach (Object o in inst.SymbolGeometry) - { - Solid s = o as Solid; - if (s != null) - { - foreach (Face f in s.Faces) - { - faceArray.Append(f); - } - } - } - } - } - } - } - return faceArray; - } - } -} - \ No newline at end of file diff --git a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.addin b/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.addin deleted file mode 100644 index f6164c3c..00000000 --- a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.addin +++ /dev/null @@ -1,12 +0,0 @@ - - - - DistanceToSurfaces.dll - D6FF1547-0B82-44ee-B2E9-7D51C9CA9B8E - Revit.SDK.Samples.AnalysisVisualizationFramework.CS.DistanceToSurfaces - DistanceToSurfaces - Display distance between sphere and surfaces - ADSK - Autodesk, www.autodesk.com - - diff --git a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.csproj b/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.csproj deleted file mode 100644 index b60d4c7d..00000000 --- a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.csproj +++ /dev/null @@ -1,84 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {5895043F-7D42-4990-9497-108FD0D8947E} - Library - Properties - DistanceToSurfaces - DistanceToSurfaces - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - - - bin\x64\Release\ - TRACE - true - true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - - - - None - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" -if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - - \ No newline at end of file diff --git a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/ReadMe_DistanceToSurfaces.rtf b/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/ReadMe_DistanceToSurfaces.rtf deleted file mode 100644 index a8edcc4b..00000000 --- a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/ReadMe_DistanceToSurfaces.rtf +++ /dev/null @@ -1,345 +0,0 @@ -{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe2052\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} -{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f13\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt SimSun};} -{\f13\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt SimSun};}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f43\fbidi \fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Tahoma;} -{\f44\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@SimSun;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} -{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} -{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f61\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f62\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\f64\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f65\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f66\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f67\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\f68\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f69\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f71\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f72\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} -{\f74\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f75\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f76\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f77\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} -{\f78\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f79\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f81\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f82\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} -{\f84\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f85\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f86\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f87\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} -{\f88\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f89\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f193\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};} -{\f193\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f431\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f432\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f434\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;} -{\f435\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f436\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\f437\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f438\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} -{\f439\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\f491\fbidi \fswiss\fcharset238\fprq2 Tahoma CE;}{\f492\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f494\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek;} -{\f495\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur;}{\f496\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f497\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f498\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic;} -{\f499\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese);}{\f500\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai);}{\f503\fbidi \fnil\fcharset0\fprq2 @SimSun Western;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} -{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} -{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} -{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} -{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} -{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} -{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; -\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red3\green0\blue3;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1 -\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 -\fs22\lang1033\langfe1041\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1041 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* -\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1 -\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext11 \ssemihidden \sunhideused -Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \spriority0 \styrsid3814352 selflink;}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \spriority0 \styrsid3814352 cs;}{\*\cs17 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 -\sbasedon10 \spriority0 \styrsid3814352 vb;}{\*\cs18 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \spriority0 \styrsid3814352 cpp;}{\*\cs19 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \spriority0 \styrsid3814352 nu;}{\*\cs20 \additive -\rtlch\fcs1 \af0\afs16 \ltrch\fcs0 \fs16 \sbasedon10 \ssemihidden \sunhideused \styrsid2040412 annotation reference;}{\s21\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 -\af0\afs20\alang1025 \ltrch\fcs0 \fs20\lang1033\langfe1041\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1041 \sbasedon0 \snext21 \slink22 \ssemihidden \sunhideused \styrsid2040412 annotation text;}{\*\cs22 \additive \rtlch\fcs1 -\af0\afs20 \ltrch\fcs0 \fs20\lang0\langfe1041\langnp0\langfenp1041 \sbasedon10 \slink21 \slocked \ssemihidden \styrsid2040412 Comment Text Char;}{\s23\ql \li0\ri0\sa200\sl276\slmult1 -\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ab\af0\afs20\alang1025 \ltrch\fcs0 \b\fs20\lang1033\langfe1041\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1041 -\sbasedon21 \snext21 \slink24 \ssemihidden \sunhideused \styrsid2040412 annotation subject;}{\*\cs24 \additive \rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\lang0\langfe1041\langnp0\langfenp1041 \sbasedon22 \slink23 \slocked \ssemihidden \styrsid2040412 -Comment Subject Char;}{\s25\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af43\afs16\alang1025 \ltrch\fcs0 \fs16\lang1033\langfe1041\loch\f43\hich\af43\dbch\af31505\cgrid\langnp1033\langfenp1041 -\sbasedon0 \snext25 \slink26 \ssemihidden \sunhideused \styrsid2040412 Balloon Text;}{\*\cs26 \additive \rtlch\fcs1 \af43\afs16 \ltrch\fcs0 \f43\fs16\lang0\langfe1041\langnp0\langfenp1041 \sbasedon10 \slink25 \slocked \ssemihidden \styrsid2040412 -Balloon Text Char;}}{\*\listtable{\list\listtemplateid-1577809678\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid1781463686\'02\'00.;}{\levelnumbers\'01;} -\rtlch\fcs1 \af0 \ltrch\fcs0 \b0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid1456374382\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 -\af0 \ltrch\fcs0 \b0\hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 -\af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 -\af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 -\af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 -\af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 -\af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 -\af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 -\af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid2099100}{\list\listtemplateid1437879080\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext -\leveltemplateid67698703\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext -\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid58524475}{\list\listtemplateid1524382028\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0 -\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid260142452}{\list\listtemplateid-660692254\listhybrid -{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid1781463686\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \b0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel -\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel -\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel -\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel -\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel -\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel -\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel -\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel -\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname -;}\listid325397769}{\list\listtemplateid1183870798\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 -\ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 -\ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 -\ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 -\ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 -\ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 -\ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 -\ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 -\ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 -\ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid608512451}{\list\listtemplateid-1190887710\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext -\leveltemplateid67698703\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext -\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid758987368}{\list\listtemplateid1437879080\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0 -\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1 -\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid1088624051}{\list\listtemplateid-1676104582\listhybrid -{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li720\lin720 }{\listlevel -\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel -\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel -\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel -\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel -\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel -\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel -\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel -\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname -;}\listid1967156383}}{\*\listoverridetable{\listoverride\listid1967156383\listoverridecount0\ls1}{\listoverride\listid608512451\listoverridecount0\ls2}{\listoverride\listid758987368\listoverridecount0\ls3}{\listoverride\listid58524475 -\listoverridecount0\ls4}{\listoverride\listid1088624051\listoverridecount0\ls5}{\listoverride\listid260142452\listoverridecount0\ls6}{\listoverride\listid2099100\listoverridecount0\ls7}{\listoverride\listid325397769\listoverridecount0\ls8}} -{\*\rsidtbl \rsid138306\rsid472369\rsid665282\rsid868677\rsid935519\rsid985856\rsid987675\rsid1064215\rsid1122856\rsid1268631\rsid1598015\rsid1721570\rsid1849922\rsid2040412\rsid2053216\rsid2236971\rsid2580341\rsid2848959\rsid2899181\rsid3036618 -\rsid3106549\rsid3166103\rsid3547805\rsid3549023\rsid3565660\rsid3571037\rsid3679735\rsid3749976\rsid3814352\rsid3939404\rsid4027810\rsid4133291\rsid4330312\rsid4484724\rsid4547454\rsid4683337\rsid4809662\rsid4877061\rsid5182184\rsid5259210\rsid5259351 -\rsid5339345\rsid5403220\rsid5601285\rsid5641147\rsid5722102\rsid5914351\rsid6110638\rsid6244299\rsid6305885\rsid6828333\rsid7017122\rsid7110112\rsid7159152\rsid7486992\rsid7489790\rsid7499088\rsid7815085\rsid7954692\rsid8137515\rsid8200769\rsid8258173 -\rsid8338354\rsid8593867\rsid8857382\rsid9055397\rsid9205206\rsid9271364\rsid9458779\rsid9583235\rsid9717885\rsid9917075\rsid9928366\rsid9990429\rsid10451750\rsid10683258\rsid10699166\rsid10749124\rsid10758191\rsid11020504\rsid11143805\rsid11276223 -\rsid11356721\rsid11807847\rsid12330482\rsid12649470\rsid13385624\rsid13396438\rsid13455614\rsid13505903\rsid13514011\rsid13763921\rsid13833111\rsid14165659\rsid14290013\rsid14747198\rsid14822548\rsid14835148\rsid15015276\rsid15212033\rsid15366489 -\rsid15739484\rsid16081945\rsid16263964\rsid16348993\rsid16478001\rsid16733537}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Carl Zhang} -{\operator Jennifer (Xue) Li}{\creatim\yr2010\mo2\dy14\hr15\min46}{\revtim\yr2018\mo1\dy15\hr13\min39}{\version9}{\edmins50}{\nofpages1}{\nofwords270}{\nofchars1545}{\*\company Autodesk, Inc.}{\nofcharsws1812}{\vern37}}{\*\xmlnstbl {\xmlns1 http://schemas -.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect -\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701 -\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot3814352 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2 -\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6 -\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang -{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1041\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1041 {\rtlch\fcs1 -\ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 -\ltrch\fcs0 \f1\fs20\insrsid11356721 \hich\af1\dbch\af31505\loch\f1 DistanceToSurfaces}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 -\hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 -\hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3679735\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13455614\charrsid7815085 -\hich\af1\dbch\af31505\loch\f1 2011}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13455614 .0}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 -\b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid13455614\charrsid7815085 \hich\af1\dbch\af31505\loch\f1 2011}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13455614 .0}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \line }{\rtlch\fcs1 \ab\af1\afs20 -\ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 -\ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid4027810\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Advanced}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 -\hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\fs20\lang1033\langfe2052\loch\af1\hich\af1\dbch\af13\langfenp2052\insrsid11276223\charrsid8137515 \hich\af1\dbch\af13\loch\f1 Geometry}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\fs20\lang1033\langfe2052\loch\af1\hich\af1\dbch\af13\langfenp2052\insrsid11020504\charrsid8137515 -\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 -\ltrch\fcs0 \f1\fs20\insrsid11356721 \hich\af1\dbch\af31505\loch\f1 ExternalApplication}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 -\b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11356721 -\hich\af1\dbch\af31505\loch\f1 Display analysis results in a Revit model}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9271364 \hich\af1\dbch\af31505\loch\f1 using Dynamic Model Update}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5722102 - -\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3939404\charrsid8137515 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3939404 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 \line }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3939404 \hich\af1\dbch\af31505\loch\f1 On startup, the external application creates a trigger}{\rtlch\fcs1 \af1\afs20 -\ltrch\fcs0 \f1\fs20\insrsid2848959 \hich\af1\dbch\af31505\loch\f1 that will execute when walls, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3939404 \hich\af1\dbch\af31505\loch\f1 masses}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid2848959 \hich\af1\dbch\af31505\loch\f1 , and family instances}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3939404 \hich\af1\dbch\af31505\loch\f1 - in the project change. When this occurs, Revit calculates the distance from a family instance (sphere.rfa) to several points on each face. These distances are used as values for the analysis visualization display.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid3939404\charrsid8137515 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3939404\charrsid8137515 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11020504 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid472369 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369\charrsid3939404 \hich\af31506\dbch\af31505\loch\f31506 Autodesk.Revit.DB.Analysis.Fie -\hich\af31506\dbch\af31505\loch\f31506 ldDomainPointsByUV}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369 -\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369\charrsid3939404 \hich\af31506\dbch\af31505\loch\f31506 Autodesk.Revit.DB.Analysis.FieldValues}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369 -\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369\charrsid3939404 \hich\af31506\dbch\af31505\loch\f31506 Autodesk.Revit.DB.Analysis.SpatialFieldManager}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369 -\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369\charrsid3939404 \hich\af31506\dbch\af31505\loch\f31506 Autodesk.Revit.DB.BoundingBoxUV}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369 -\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369\charrsid3939404 \hich\af31506\dbch\af31505\loch\f31506 Autodesk.Revit.DB.Events.DocumentOpenedEventArgs}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369 -\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369\charrsid3939404 \hich\af31506\dbch\af31505\loch\f31506 Autodesk.Revit.DB.FaceArray}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid472369 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid3939404\charrsid3939404 \hich\af31506\dbch\af31505\loch\f31506 Autodesk.Revit.DB.FilteredElementCollector}{\rtlch\fcs1 \af0 \ltrch\fcs0 -\insrsid5722102 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid472369 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid472369\charrsid3939404 \hich\af31506\dbch\af31505\loch\f31506 Autodesk.Revit.DB.LocationPoint}{\rtlch\fcs1 \af0 \ltrch\fcs0 -\insrsid472369 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid3939404\charrsid3939404 \hich\af31506\dbch\af31505\loch\f31506 Autodesk.Revit.DB.UpdaterRegistry}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid3939404 - -\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3939404\charrsid8137515 -\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Project Files}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3036618\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 :}{\rtlch\fcs1 -\ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8857382\charrsid8137515 -\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3939404 \hich\af1\dbch\af31505\loch\f1 Command.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504 -\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3939404\charrsid8137515 -\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid3939404\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 1.\tab}}\pard \ltrpar -\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls7\rin0\lin720\itap0\pararsid3939404 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \insrsid3939404\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 -On startup, register a DocumentOpened event. When a document is opened}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\insrsid3939404\charrsid472369 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid3939404\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 a.\tab}}\pard \ltrpar -\ql \fi-360\li1440\ri0\nowidctlpar\wrapdefault\faauto\ls7\ilvl1\rin0\lin1440\itap0\pararsid3939404 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \insrsid3939404\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 Check for the presence of the sphere family -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid3939404\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 b.\tab}\hich\af31506\dbch\af31505\loch\f31506 \hich\f31506 -Check for the presence of a 3D view named \'93\loch\f31506 \hich\f31506 AVF\'94 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid3939404\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 c.\tab}\hich\af31506\dbch\af31505\loch\f31506 Create a }{\rtlch\fcs1 -\af2 \ltrch\fcs0 \cf17\lang1024\langfe1024\noproof\langfenp1033\insrsid3939404\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 GetChangeTypeGeometry trigger }{\rtlch\fcs1 \af2 \ltrch\fcs0 -\cf17\lang1024\langfe1024\noproof\langfenp1033\insrsid2848959\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 that will activate when a wall, mass, or family instance changes}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \insrsid2848959\charrsid472369 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid2848959\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 2.\tab}}\pard \ltrpar -\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls7\rin0\lin720\itap0\pararsid2848959 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \insrsid2848959\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 When this trigger occurs -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid2848959\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 a.\tab}}\pard \ltrpar -\ql \fi-360\li1440\ri0\nowidctlpar\wrapdefault\faauto\ls7\ilvl1\rin0\lin1440\itap0\pararsid2848959 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \insrsid2848959\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 Find the XYZ location of the sphere -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid2848959\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 b.\tab}\hich\af31506\dbch\af31505\loch\f31506 -Get the existing spatial field \hich\af31506\dbch\af31505\loch\f31506 manager object, or create one if one does not already exist -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid472369\charrsid472369 \hich\af31506\dbch\af31505\loch\f31506 c.\tab}}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \insrsid472369\charrsid472369 -\hich\af31506\dbch\af31505\loch\f31506 Create a face array containing every face of a wall or mass in the project, including in-place geometry -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid472369\charrsid5403220 \hich\af31506\dbch\af31505\loch\f31506 d.\tab}}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \insrsid472369\charrsid5403220 -\hich\af31506\dbch\af31505\loch\f31506 Calculate the distance between the sphere\hich\f31506 \rquote \loch\f31506 s origin and several points on each face -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \ab\af0\afs22 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1041\langfenp1041\insrsid472369\charrsid5403220 \hich\af31506\dbch\af31505\loch\f31506 e.\tab}\hich\af31506\dbch\af31505\loch\f31506 -Display these distances as analysis results on the faces by updating the spatial field primitive}{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\insrsid3939404\charrsid472369 \line }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\insrsid10749124\charrsid472369 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid11020504\charrsid8137515 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11020504 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe1041\langfenp1041\insrsid5403220 \hich\af1\dbch\af31505\loch\f1 1.\tab}}\pard \ltrpar -\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls8\rin0\lin720\itap0\pararsid5403220 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5403220 \hich\af1\dbch\af31505\loch\f1 Open }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid5403220\charrsid5403220 \hich\af1\dbch\af31505\loch\f1 DistanceToSurfaces.rvt}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid5403220\charrsid5403220 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe1041\langfenp1041\insrsid5403220 \hich\af1\dbch\af31505\loch\f1 2.\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5403220 \hich\af1\dbch\af31505\loch\f1 -Move any wall, mass, or the sphere family instance}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid5403220\charrsid5403220 -\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a -9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad -5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 -b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 -0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 -a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f -c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 -0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 -a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 -6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b -4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b -4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f -7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87 -615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad -79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b -5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab -999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9 -699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586 -8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6 -0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f -9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be -15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979 -3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d -32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a -f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86 -e877f0034e16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb -44f95d843b5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a -6409fb44d08741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c -3d9058edf2c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db0256 -5e85f3b9660d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276 -b9f7dec44b7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8 -c33585b5fb9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e -51440ca2e0088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95 -b21be5ceaf8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff -6dce591a26ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec6 -9ffb9e65d028d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239 -b75a5bb1e6345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a449 -59d366ad93b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e8 -2db8df9f30254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468 -656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4 -350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d2624 -52282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe5141 -73d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000 -0000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000 -000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019 -0200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b00001600000000 -000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027 -00000000000000000000000000a00900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d0100009b0a00000000} -{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d -617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 -6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 -656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} -{\*\latentstyles\lsdstimax375\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong; -\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdsemihidden1 \lsdunhideused1 \lsdpriority59 \lsdlocked0 Table Grid; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List; -\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1; -\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid; -\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1; -\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote; -\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1; -\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2; -\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2; -\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3; -\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3; -\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4; -\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; -\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5; -\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; -\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; -\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; -\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; -\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; -\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; -\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; -\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; -\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; -\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; -\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; -\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; -\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; -\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; -\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; -\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; -\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; -\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; -\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; -\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; -\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; -\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; -\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; -\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; -\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; -\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; -\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; -\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; -\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;}}{\*\datastore 010500000200000018000000 -4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 -d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e500000000000000000000000070b6 -0a35c38dd301feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 -000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/SDK/Samples/AnalysisVisualizationFramework/MultithreadedCalculation/CS/MultithreadedCalculation.csproj b/SDK/Samples/AnalysisVisualizationFramework/MultithreadedCalculation/CS/MultithreadedCalculation.csproj index af7e9dc3..c57c80df 100644 --- a/SDK/Samples/AnalysisVisualizationFramework/MultithreadedCalculation/CS/MultithreadedCalculation.csproj +++ b/SDK/Samples/AnalysisVisualizationFramework/MultithreadedCalculation/CS/MultithreadedCalculation.csproj @@ -1,79 +1,23 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {498C1FF1-3FA1-4146-836D-436914AFDC4B} - Library - Properties Revit.SDK.Samples.MultithreadedCalculation.CS - MultithreadedCalculation - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + + false + false + true + 1.0.0.0 - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - - + None diff --git a/SDK/Samples/AnalysisVisualizationFramework/SpatialFieldGradient/CS/SpatialFieldGradient.csproj b/SDK/Samples/AnalysisVisualizationFramework/SpatialFieldGradient/CS/SpatialFieldGradient.csproj index 58945d8f..a81d0225 100644 --- a/SDK/Samples/AnalysisVisualizationFramework/SpatialFieldGradient/CS/SpatialFieldGradient.csproj +++ b/SDK/Samples/AnalysisVisualizationFramework/SpatialFieldGradient/CS/SpatialFieldGradient.csproj @@ -1,82 +1,24 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {493640CC-B6A2-4746-ADA1-9319B3C003FB} - Library - Properties - SpatialFieldGradient - SpatialFieldGradient - v4.8 - 512 - + true + 1.0.0.0 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - - None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/AppearanceAssetEditing/CS/AppearanceAssetEditing.csproj b/SDK/Samples/AppearanceAssetEditing/CS/AppearanceAssetEditing.csproj index 30e797fa..3a8324b1 100644 --- a/SDK/Samples/AppearanceAssetEditing/CS/AppearanceAssetEditing.csproj +++ b/SDK/Samples/AppearanceAssetEditing/CS/AppearanceAssetEditing.csproj @@ -1,105 +1,11 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {A2708398-8FA7-4582-B15A-D57D7058D3C2} - Library - Properties Revit.SDK.Samples.AppearanceAssetEditing.CS - AppearanceAssetEditing - - - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\AppearanceAssetEditing.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - OnOutputUpdated - - - - - - - - - - 4.5.2 - - - - - Form - - - AppearanceAssetEditingForm.cs - - - - - - True - True - Resources.resx - - - - - - - AppearanceAssetEditingForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - - - - - - - + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/AppearanceAssetEditing/CS/Properties/AssemblyInfo.cs b/SDK/Samples/AppearanceAssetEditing/CS/Properties/AssemblyInfo.cs index eee9fceb..8478e270 100644 --- a/SDK/Samples/AppearanceAssetEditing/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/AppearanceAssetEditing/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/ArchSample/VB.NET/ArchSample.vbproj b/SDK/Samples/ArchSample/VB.NET/ArchSample.vbproj index 25244a4c..f7067be0 100644 --- a/SDK/Samples/ArchSample/VB.NET/ArchSample.vbproj +++ b/SDK/Samples/ArchSample/VB.NET/ArchSample.vbproj @@ -1,154 +1,35 @@ - - + Local - 9.0.30729 - 2.0 - {CD614892-66AC-4F28-8ACD-CC8A48209ED2} - Debug - AnyCPU - - - - - ArchSample - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.ArchSample.VB.NET - - - - Windows - - - v4.8 - - - - bin\ - ArchSample.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false - - bin\ - ArchSample.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - ArchSample.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - ArchSample.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - False - .\Microsoft.Office.Interop.Excel.dll - True - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" None + + + tlbimp + 9 + 1 + 00020813-0000-0000-c000-000000000046 + 0 + false + true + + \ No newline at end of file diff --git a/SDK/Samples/ArchSample/VB.NET/Command.vb b/SDK/Samples/ArchSample/VB.NET/Command.vb index 041363c1..38a15617 100644 --- a/SDK/Samples/ArchSample/VB.NET/Command.vb +++ b/SDK/Samples/ArchSample/VB.NET/Command.vb @@ -105,7 +105,7 @@ Public Class Command ''' Function LaunchExcel() As MsExcel.Application - Dim excel As MsExcel.Application = New MsExcel.ApplicationClass() + Dim excel As MsExcel.Application = New MsExcel.Application() If (excel Is Nothing) Then Return Nothing diff --git a/SDK/Samples/ArchSample/VB.NET/Microsoft.Office.Interop.Excel.dll b/SDK/Samples/ArchSample/VB.NET/Microsoft.Office.Interop.Excel.dll deleted file mode 100644 index bc1f5cd7..00000000 Binary files a/SDK/Samples/ArchSample/VB.NET/Microsoft.Office.Interop.Excel.dll and /dev/null differ diff --git a/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.cs b/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.cs index 098f38c5..8c04ee5f 100644 --- a/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.cs +++ b/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -23,14 +23,13 @@ namespace Revit.SDK.Samples.AreaReinCurve.CS { using System; using System.Collections.Generic; - using System.Text; - using System.Windows.Forms; - using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Structure; + using TaskDialog = Autodesk.Revit.UI.TaskDialog; + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] [Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)] diff --git a/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.csproj b/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.csproj index 30e485f7..4b8d5e29 100644 --- a/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.csproj +++ b/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.csproj @@ -1,89 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {01E38E1B-982E-48FC-89F9-75BA333A8A52} - Library - Properties Revit.SDK.Samples.AreaReinCurve.CS - AreaReinCurve - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/AreaReinCurve/CS/GeomUtil.cs b/SDK/Samples/AreaReinCurve/CS/GeomUtil.cs index 0a70dace..e0220ecc 100644 --- a/SDK/Samples/AreaReinCurve/CS/GeomUtil.cs +++ b/SDK/Samples/AreaReinCurve/CS/GeomUtil.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AreaReinCurve/CS/ParameterUtil.cs b/SDK/Samples/AreaReinCurve/CS/ParameterUtil.cs index c94b649f..4c99505e 100644 --- a/SDK/Samples/AreaReinCurve/CS/ParameterUtil.cs +++ b/SDK/Samples/AreaReinCurve/CS/ParameterUtil.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AreaReinCurve/CS/Properties/AssemblyInfo.cs b/SDK/Samples/AreaReinCurve/CS/Properties/AssemblyInfo.cs index d258a252..def418f9 100644 --- a/SDK/Samples/AreaReinCurve/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/AreaReinCurve/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -20,7 +20,6 @@ // (Rights in Technical Data and Computer Software), as applicable. // using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -31,7 +30,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AreaReinCurve")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.cs b/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.cs index 79516004..5cb6de99 100644 --- a/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.cs +++ b/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.cs @@ -252,7 +252,7 @@ namespace Revit.SDK.Samples.AreaReinParameters.CS } str = str + name + ": " + val + "\r\n"; } - TaskDialog.Show("Rebar parameters", str); + Autodesk.Revit.UI.TaskDialog.Show("Rebar parameters", str); return Autodesk.Revit.UI.Result.Succeeded; } } diff --git a/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.csproj b/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.csproj index 877d51f9..138ff931 100644 --- a/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.csproj +++ b/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.csproj @@ -1,106 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {79220891-F0E5-4FE1-A09B-499831366424} - Library - Properties Revit.SDK.Samples.AreaReinParameters.CS - AreaReinParameters - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - Form - - - AreaReinParametersForm.cs - - - - - - - - - - Designer - AreaReinParametersForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/AreaReinParameters/CS/HookTypeConverter.cs b/SDK/Samples/AreaReinParameters/CS/HookTypeConverter.cs index ca0f7dda..8275a7e1 100644 --- a/SDK/Samples/AreaReinParameters/CS/HookTypeConverter.cs +++ b/SDK/Samples/AreaReinParameters/CS/HookTypeConverter.cs @@ -47,14 +47,8 @@ namespace Revit.SDK.Samples.AreaReinParameters.CS protected ParameterConverter() { m_hash = new Hashtable(); - GetConvertHash(); } - /// - /// fill m_hashtable - /// - public abstract void GetConvertHash(); - /// /// always return true /// @@ -170,7 +164,8 @@ namespace Revit.SDK.Samples.AreaReinParameters.CS /// public class HookTypeItem : ParameterConverter { - public override void GetConvertHash() + public HookTypeItem() + : base() { m_hash = Command.HookTypes; Autodesk.Revit.DB.ElementId id = Autodesk.Revit.DB.ElementId.InvalidElementId; @@ -187,7 +182,8 @@ namespace Revit.SDK.Samples.AreaReinParameters.CS /// public class BarTypeItem : ParameterConverter { - public override void GetConvertHash() + public BarTypeItem() + : base() { m_hash = Command.BarTypes; } diff --git a/SDK/Samples/AreaReinParameters/CS/Properties/AssemblyInfo.cs b/SDK/Samples/AreaReinParameters/CS/Properties/AssemblyInfo.cs index 301bfa9f..e84f45f4 100644 --- a/SDK/Samples/AreaReinParameters/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/AreaReinParameters/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AreaReinParameters")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -56,3 +56,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/AttachedDetailGroup/CS/AttachedDetailGroup.csproj b/SDK/Samples/AttachedDetailGroup/CS/AttachedDetailGroup.csproj index 46dfa4a3..4d526002 100644 --- a/SDK/Samples/AttachedDetailGroup/CS/AttachedDetailGroup.csproj +++ b/SDK/Samples/AttachedDetailGroup/CS/AttachedDetailGroup.csproj @@ -1,96 +1,12 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D5141B38-2D06-4964-BF75-328691347361} - Library - Properties Revit.SDK.Samples.AttachedDetailGroup.CS - AttachedDetailGroup - - - v4.8 - + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\AttachedDetailGroup.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - OnOutputUpdated - - - - - - - - - - - 4.5.2 - - - - - - - - - - - True - True - Resources.resx - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - - - - + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/AttachedDetailGroup/CS/Properties/AssemblyInfo.cs b/SDK/Samples/AttachedDetailGroup/CS/Properties/AssemblyInfo.cs index cfa59285..d9d33d46 100644 --- a/SDK/Samples/AttachedDetailGroup/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/AttachedDetailGroup/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/AutoRoute/CS/AutoRoute.csproj b/SDK/Samples/AutoRoute/CS/AutoRoute.csproj index fcd8a7c9..7fdba8cf 100644 --- a/SDK/Samples/AutoRoute/CS/AutoRoute.csproj +++ b/SDK/Samples/AutoRoute/CS/AutoRoute.csproj @@ -1,119 +1,14 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {274B58C1-4995-4AC8-BDD8-BFFC52EE63AB} - Library - Properties - AutoRoute - AutoRoute - v4.8 - - - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt AllRules.ruleset true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt AllRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/AutoTagRooms/CS/AutoTagRooms.csproj b/SDK/Samples/AutoTagRooms/CS/AutoTagRooms.csproj index b160450c..e0e175e6 100644 --- a/SDK/Samples/AutoTagRooms/CS/AutoTagRooms.csproj +++ b/SDK/Samples/AutoTagRooms/CS/AutoTagRooms.csproj @@ -1,101 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {8CEED5CF-003B-4595-9EC5-8A08432719BA} - Library - Properties Revit.SDK.Samples.RoomsTag.CS - AutoTagRooms - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - Form - - - AutoTagRoomsForm.cs - - - - - Designer - AutoTagRoomsForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/AutoTagRooms/CS/AutoTagRoomsForm.cs b/SDK/Samples/AutoTagRooms/CS/AutoTagRoomsForm.cs index d07ecd8a..bab7659c 100644 --- a/SDK/Samples/AutoTagRooms/CS/AutoTagRoomsForm.cs +++ b/SDK/Samples/AutoTagRooms/CS/AutoTagRoomsForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AutoTagRooms/CS/Command.cs b/SDK/Samples/AutoTagRooms/CS/Command.cs index d47015f7..d2278132 100644 --- a/SDK/Samples/AutoTagRooms/CS/Command.cs +++ b/SDK/Samples/AutoTagRooms/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AutoTagRooms/CS/Properties/AssemblyInfo.cs b/SDK/Samples/AutoTagRooms/CS/Properties/AssemblyInfo.cs index eed305c7..4d698bdf 100644 --- a/SDK/Samples/AutoTagRooms/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/AutoTagRooms/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,7 +21,6 @@ // using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -32,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AutoTagRooms")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -55,3 +54,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/AutoTagRooms/CS/RoomsData.cs b/SDK/Samples/AutoTagRooms/CS/RoomsData.cs index cf42acec..f314f1f8 100644 --- a/SDK/Samples/AutoTagRooms/CS/RoomsData.cs +++ b/SDK/Samples/AutoTagRooms/CS/RoomsData.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AvoidObstruction/CS/AvoidObstruction.csproj b/SDK/Samples/AvoidObstruction/CS/AvoidObstruction.csproj index 8c258bc1..7a8fd197 100644 --- a/SDK/Samples/AvoidObstruction/CS/AvoidObstruction.csproj +++ b/SDK/Samples/AvoidObstruction/CS/AvoidObstruction.csproj @@ -1,70 +1,26 @@ - - + - Debug - AnyCPU - 9.0.30729 - {07E03997-2E23-4CA5-9EF1-1EE7887FFA24} - Library false - AvoidObstruction - AvoidObstruction - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - - - pdbonly - true - bin\Release\ - TRACE - true + + + + false + false + true + 1.0.0.0 - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/AvoidObstruction/CS/Command.cs b/SDK/Samples/AvoidObstruction/CS/Command.cs index 11143b62..3e6ffe2d 100644 --- a/SDK/Samples/AvoidObstruction/CS/Command.cs +++ b/SDK/Samples/AvoidObstruction/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AvoidObstruction/CS/Detector.cs b/SDK/Samples/AvoidObstruction/CS/Detector.cs index 243fe919..ba76d341 100644 --- a/SDK/Samples/AvoidObstruction/CS/Detector.cs +++ b/SDK/Samples/AvoidObstruction/CS/Detector.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AvoidObstruction/CS/Resolver.cs b/SDK/Samples/AvoidObstruction/CS/Resolver.cs index 0341c24d..c54f994f 100644 --- a/SDK/Samples/AvoidObstruction/CS/Resolver.cs +++ b/SDK/Samples/AvoidObstruction/CS/Resolver.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/AvoidObstruction/CS/Section.cs b/SDK/Samples/AvoidObstruction/CS/Section.cs index d6a8d069..e2704646 100644 --- a/SDK/Samples/AvoidObstruction/CS/Section.cs +++ b/SDK/Samples/AvoidObstruction/CS/Section.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BeamAndSlabNewParameter/CS/AssemblyInfo.cs b/SDK/Samples/BeamAndSlabNewParameter/CS/AssemblyInfo.cs index b93a70f6..4d214cc1 100644 --- a/SDK/Samples/BeamAndSlabNewParameter/CS/AssemblyInfo.cs +++ b/SDK/Samples/BeamAndSlabNewParameter/CS/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,7 +22,6 @@ using System.Reflection; -using System.Runtime.CompilerServices; // // General Information about an assembly is controlled through the following @@ -34,7 +33,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -79,3 +78,4 @@ using System.Runtime.CompilerServices; [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.cs b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.cs index 1b693040..2ad77c8c 100644 --- a/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.cs +++ b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.csproj b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.csproj index a646d41b..01d1f8cb 100644 --- a/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.csproj +++ b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.csproj @@ -1,145 +1,28 @@ - - + Local - 9.0.30729 - 2.0 - {14B16804-1586-4D7F-8B43-D48C3EA15AE8} - Debug - AnyCPU - - - - - BeamAndSlabNewParameter - - JScript Grid IE50 false - Library Revit.SDK.Samples.BeamAndSlabParameters.CS - OnBuildSuccess - - - - - - - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - true - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - true - 4 - none - prompt + + False + - true - bin\x64\Debug\ - DEBUG;TRACE 285212672 4096 - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE 285212672 - true true 4096 - x64 - prompt MinimumRecommendedRules.ruleset + - OnOutputUpdated - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - Code - - - Code - - - Form - - - BeamAndSlabNewParameterForm.cs - Designer - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameterForm.Designer.cs b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameterForm.Designer.cs new file mode 100644 index 00000000..87396914 --- /dev/null +++ b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameterForm.Designer.cs @@ -0,0 +1,127 @@ +namespace Revit.SDK.Samples.BeamAndSlabNewParameter.CS +{ + public partial class BeamAndSlabParametersForm + { + private System.Windows.Forms.Button addParameterButton; + private System.Windows.Forms.Button displayValueButton; + private System.Windows.Forms.Button exitButton; + private System.Windows.Forms.ListBox attributeValueListBox; + private System.Windows.Forms.Label attributeValueLabel; + private System.Windows.Forms.Button findButton; + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.addParameterButton = new System.Windows.Forms.Button(); + this.displayValueButton = new System.Windows.Forms.Button(); + this.exitButton = new System.Windows.Forms.Button(); + this.attributeValueListBox = new System.Windows.Forms.ListBox(); + this.attributeValueLabel = new System.Windows.Forms.Label(); + this.findButton = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // addParameterButton + // + this.addParameterButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.addParameterButton.Location = new System.Drawing.Point(311, 65); + this.addParameterButton.Name = "addParameterButton"; + this.addParameterButton.Size = new System.Drawing.Size(105, 26); + this.addParameterButton.TabIndex = 1; + this.addParameterButton.Text = "&Add"; + this.addParameterButton.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.addParameterButton.Click += new System.EventHandler(this.addParameterButton_Click); + // + // displayValueButton + // + this.displayValueButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.displayValueButton.Location = new System.Drawing.Point(311, 111); + this.displayValueButton.Name = "displayValueButton"; + this.displayValueButton.Size = new System.Drawing.Size(105, 26); + this.displayValueButton.TabIndex = 2; + this.displayValueButton.Text = "&Display Value"; + this.displayValueButton.Click += new System.EventHandler(this.displayValueButton_Click); + // + // exitButton + // + this.exitButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.exitButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.exitButton.Location = new System.Drawing.Point(311, 203); + this.exitButton.Name = "exitButton"; + this.exitButton.Size = new System.Drawing.Size(105, 26); + this.exitButton.TabIndex = 4; + this.exitButton.Text = "&Exit"; + this.exitButton.Click += new System.EventHandler(this.exitButton_Click); + // + // attributeValueListBox + // + this.attributeValueListBox.ItemHeight = 16; + this.attributeValueListBox.Location = new System.Drawing.Point(19, 46); + this.attributeValueListBox.Name = "attributeValueListBox"; + this.attributeValueListBox.Size = new System.Drawing.Size(269, 228); + this.attributeValueListBox.TabIndex = 18; + this.attributeValueListBox.TabStop = false; + // + // attributeValueLabel + // + this.attributeValueLabel.Location = new System.Drawing.Point(19, 9); + this.attributeValueLabel.Name = "attributeValueLabel"; + this.attributeValueLabel.Size = new System.Drawing.Size(279, 37); + this.attributeValueLabel.TabIndex = 19; + this.attributeValueLabel.Text = "Display the value of the Unique ID if present for all the selected elements"; + // + // findButton + // + this.findButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.findButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.findButton.Location = new System.Drawing.Point(311, 157); + this.findButton.Name = "findButton"; + this.findButton.Size = new System.Drawing.Size(105, 26); + this.findButton.TabIndex = 3; + this.findButton.Text = "&Find"; + this.findButton.Click += new System.EventHandler(this.findButton_Click); + // + // BeamAndSlabParametersForm + // + this.CancelButton = this.exitButton; + this.ClientSize = new System.Drawing.Size(438, 292); + this.Controls.Add(this.attributeValueLabel); + this.Controls.Add(this.attributeValueListBox); + this.Controls.Add(this.addParameterButton); + this.Controls.Add(this.findButton); + this.Controls.Add(this.displayValueButton); + this.Controls.Add(this.exitButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "BeamAndSlabParametersForm"; + this.ShowInTaskbar = false; + this.Text = "Beam and Slab New Parameters"; + this.ResumeLayout(false); + + } + #endregion + } +} diff --git a/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameterForm.cs b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameterForm.cs index 65387341..ed7065a7 100644 --- a/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameterForm.cs +++ b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameterForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -20,33 +20,17 @@ // (Rights in Technical Data and Computer Software), as applicable. // - -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; using System.Windows.Forms; -using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.BeamAndSlabNewParameter.CS { /// /// User Interface. /// - public class BeamAndSlabParametersForm : System.Windows.Forms.Form + public partial class BeamAndSlabParametersForm : System.Windows.Forms.Form { - private System.Windows.Forms.Button addParameterButton; - private System.Windows.Forms.Button displayValueButton; - private System.Windows.Forms.Button exitButton; - private System.Windows.Forms.ListBox attributeValueListBox; - private System.Windows.Forms.Label attributeValueLabel; - private Button findButton; - /// - /// Required designer variable. - /// - private System.ComponentModel.Container components = null; - /// /// constructor /// @@ -56,117 +40,6 @@ namespace Revit.SDK.Samples.BeamAndSlabNewParameter.CS InitializeComponent(); m_dataBuffer = dataBuffer; } - - /// - /// Clean up any resources being used. - /// - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if(components != null) - { - components.Dispose(); - } - } - base.Dispose( disposing ); - } - - #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.addParameterButton = new System.Windows.Forms.Button(); - this.displayValueButton = new System.Windows.Forms.Button(); - this.exitButton = new System.Windows.Forms.Button(); - this.attributeValueListBox = new System.Windows.Forms.ListBox(); - this.attributeValueLabel = new System.Windows.Forms.Label(); - this.findButton = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // addParameterButton - // - this.addParameterButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.addParameterButton.Location = new System.Drawing.Point(311, 65); - this.addParameterButton.Name = "addParameterButton"; - this.addParameterButton.Size = new System.Drawing.Size(105, 26); - this.addParameterButton.TabIndex = 1; - this.addParameterButton.Text = "&Add"; - this.addParameterButton.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.addParameterButton.Click += new System.EventHandler(this.addParameterButton_Click); - // - // displayValueButton - // - this.displayValueButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.displayValueButton.Location = new System.Drawing.Point(311, 111); - this.displayValueButton.Name = "displayValueButton"; - this.displayValueButton.Size = new System.Drawing.Size(105, 26); - this.displayValueButton.TabIndex = 2; - this.displayValueButton.Text = "&Display Value"; - this.displayValueButton.Click += new System.EventHandler(this.displayValueButton_Click); - // - // exitButton - // - this.exitButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.exitButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.exitButton.Location = new System.Drawing.Point(311, 203); - this.exitButton.Name = "exitButton"; - this.exitButton.Size = new System.Drawing.Size(105, 26); - this.exitButton.TabIndex = 4; - this.exitButton.Text = "&Exit"; - this.exitButton.Click += new System.EventHandler(this.exitButton_Click); - // - // attributeValueListBox - // - this.attributeValueListBox.ItemHeight = 16; - this.attributeValueListBox.Location = new System.Drawing.Point(19, 46); - this.attributeValueListBox.Name = "attributeValueListBox"; - this.attributeValueListBox.Size = new System.Drawing.Size(269, 228); - this.attributeValueListBox.TabIndex = 18; - this.attributeValueListBox.TabStop = false; - // - // attributeValueLabel - // - this.attributeValueLabel.Location = new System.Drawing.Point(19, 9); - this.attributeValueLabel.Name = "attributeValueLabel"; - this.attributeValueLabel.Size = new System.Drawing.Size(279, 37); - this.attributeValueLabel.TabIndex = 19; - this.attributeValueLabel.Text = "Display the value of the Unique ID if present for all the selected elements"; - // - // findButton - // - this.findButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.findButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.findButton.Location = new System.Drawing.Point(311, 157); - this.findButton.Name = "findButton"; - this.findButton.Size = new System.Drawing.Size(105, 26); - this.findButton.TabIndex = 3; - this.findButton.Text = "&Find"; - this.findButton.Click += new System.EventHandler(this.findButton_Click); - // - // BeamAndSlabParametersForm - // - this.CancelButton = this.exitButton; - this.ClientSize = new System.Drawing.Size(438, 292); - this.Controls.Add(this.attributeValueLabel); - this.Controls.Add(this.attributeValueListBox); - this.Controls.Add(this.addParameterButton); - this.Controls.Add(this.findButton); - this.Controls.Add(this.displayValueButton); - this.Controls.Add(this.exitButton); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "BeamAndSlabParametersForm"; - this.ShowInTaskbar = false; - this.Text = "Beam and Slab New Parameters"; - this.ResumeLayout(false); - - } - #endregion // an instance of Command class Command m_dataBuffer = null; diff --git a/SDK/Samples/BoundaryConditions/CS/BCProperties.cs b/SDK/Samples/BoundaryConditions/CS/BCProperties.cs index 2281aed1..3107453b 100644 --- a/SDK/Samples/BoundaryConditions/CS/BCProperties.cs +++ b/SDK/Samples/BoundaryConditions/CS/BCProperties.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BoundaryConditions/CS/BoundaryConditions.csproj b/SDK/Samples/BoundaryConditions/CS/BoundaryConditions.csproj index e2b40e8f..3629905a 100644 --- a/SDK/Samples/BoundaryConditions/CS/BoundaryConditions.csproj +++ b/SDK/Samples/BoundaryConditions/CS/BoundaryConditions.csproj @@ -1,117 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {8A4355DF-E929-490F-8DE9-1CA755920C4D} - Library - Properties - BoundaryConditions - BoundaryConditions - - - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900;-Microsoft.Reliability#CA2000;-Microsoft.Reliability#CA2002;-Microsoft.Reliability#CA2003;-Microsoft.Reliability#CA2004;-Microsoft.Reliability#CA2006;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900;-Microsoft.Reliability#CA2000;-Microsoft.Reliability#CA2002;-Microsoft.Reliability#CA2003;-Microsoft.Reliability#CA2004;-Microsoft.Reliability#CA2006;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124 - prompt - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - BoundaryConditionsForm.cs - - - - Form - - - SpringModulusForm.cs - - - - - - - Designer - BoundaryConditionsForm.cs - - - Designer - SpringModulusForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsData.cs b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsData.cs index 8f1b517b..a4233ad8 100644 --- a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsData.cs +++ b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsData.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.Designer.cs b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.Designer.cs index 721e583b..f5025f5a 100644 --- a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.Designer.cs +++ b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.cs b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.cs index 8146471a..27852f2a 100644 --- a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.cs +++ b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BoundaryConditions/CS/Command.cs b/SDK/Samples/BoundaryConditions/CS/Command.cs index de66ecb4..853a0582 100644 --- a/SDK/Samples/BoundaryConditions/CS/Command.cs +++ b/SDK/Samples/BoundaryConditions/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BoundaryConditions/CS/Properties/AssemblyInfo.cs b/SDK/Samples/BoundaryConditions/CS/Properties/AssemblyInfo.cs index 278665b8..630eb012 100644 --- a/SDK/Samples/BoundaryConditions/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/BoundaryConditions/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,7 +22,6 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -33,7 +32,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("BoundaryConditions")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -56,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/BoundaryConditions/CS/SpringModulusForm.Designer.cs b/SDK/Samples/BoundaryConditions/CS/SpringModulusForm.Designer.cs index c33f5d8b..9a938896 100644 --- a/SDK/Samples/BoundaryConditions/CS/SpringModulusForm.Designer.cs +++ b/SDK/Samples/BoundaryConditions/CS/SpringModulusForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BoundaryConditions/CS/SpringModulusForm.cs b/SDK/Samples/BoundaryConditions/CS/SpringModulusForm.cs index 517d575c..2d690bd9 100644 --- a/SDK/Samples/BoundaryConditions/CS/SpringModulusForm.cs +++ b/SDK/Samples/BoundaryConditions/CS/SpringModulusForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BoundaryConditions/CS/UnitConversion.cs b/SDK/Samples/BoundaryConditions/CS/UnitConversion.cs index 632db761..4b89a842 100644 --- a/SDK/Samples/BoundaryConditions/CS/UnitConversion.cs +++ b/SDK/Samples/BoundaryConditions/CS/UnitConversion.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/BrowseBindings/VB.NET/AssemblyInfo.vb b/SDK/Samples/BrowseBindings/VB.NET/AssemblyInfo.vb index 50a36831..d55d6ae8 100644 --- a/SDK/Samples/BrowseBindings/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/BrowseBindings/VB.NET/AssemblyInfo.vb @@ -51,4 +51,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/BrowseBindings/VB.NET/BrowseBindings.vbproj b/SDK/Samples/BrowseBindings/VB.NET/BrowseBindings.vbproj index 1a5604f7..476dfa0a 100644 --- a/SDK/Samples/BrowseBindings/VB.NET/BrowseBindings.vbproj +++ b/SDK/Samples/BrowseBindings/VB.NET/BrowseBindings.vbproj @@ -1,173 +1,22 @@ - - + Local - 9.0.30729 - 2.0 - {CF714DBD-56D4-4470-A344-33143D9569C6} - Debug - AnyCPU - - - - - BrowseBindings - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.BrowseBindings.VB.NET - - - - Windows - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 1.0.0.%2a - false - true - v4.8 - - - - bin\ - BrowseBindings.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false + true + true - - bin\ - BrowseBindings.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - BrowseBindings.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - BrowseBindings.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - mscorlib - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Form - - - - BindingsBrowserForm.vb - Designer - - - - - False - .NET Framework 2.0 - true - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CapitalizeAllTextNotes/CS/CapitalizeAllTextNotes.csproj b/SDK/Samples/CapitalizeAllTextNotes/CS/CapitalizeAllTextNotes.csproj index 2a471886..48bf5019 100644 --- a/SDK/Samples/CapitalizeAllTextNotes/CS/CapitalizeAllTextNotes.csproj +++ b/SDK/Samples/CapitalizeAllTextNotes/CS/CapitalizeAllTextNotes.csproj @@ -1,95 +1,20 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {98357A11-0B43-452E-998C-AD7981D8E19A} - Library - Properties Revit.SDK.Samples.CapitalizeAllTextNotes.CS - CapitalizeAllTextNotes - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\CapitalizeAllTextNotes.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\CapitalizeAllTextNotes.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 4.5.2 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/CivilAlignments/CS/CivilAlignments.csproj b/SDK/Samples/CivilAlignments/CS/CivilAlignments.csproj index e06f7a4b..e1d41239 100644 --- a/SDK/Samples/CivilAlignments/CS/CivilAlignments.csproj +++ b/SDK/Samples/CivilAlignments/CS/CivilAlignments.csproj @@ -1,96 +1,19 @@ - - + - - None - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {E2B377C6-1B67-4777-9532-EE37BA4E84DA} - Library - Properties - CivilAlignments - CivilAlignments - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\CivilAlignments.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\CivilAlignments.XML + true + - true - full - false - DEBUG;TRACE - prompt - 4 - x64 true bin\Debug\CivilAlignments.XML - pdbonly - true - TRACE - prompt - 4 - x64 true bin\Release\CivilAlignments.XML - - - - - - - - - - 4.7 - - - - - - - - - - - OnOutputUpdated - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/CivilAlignments/CS/CivilAlignmentsApp.cs b/SDK/Samples/CivilAlignments/CS/CivilAlignmentsApp.cs index 62aa30f7..04c421f9 100644 --- a/SDK/Samples/CivilAlignments/CS/CivilAlignmentsApp.cs +++ b/SDK/Samples/CivilAlignments/CS/CivilAlignmentsApp.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted @@ -20,18 +20,7 @@ // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows.Forms; -using System.Windows.Media.Imaging; -using System.IO; - -using Autodesk; -using Autodesk.Revit; -using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using Autodesk.Revit.ApplicationServices; namespace Revit.SDK.Samples.CivilAlignments.CS { diff --git a/SDK/Samples/CivilAlignments/CS/Command.cs b/SDK/Samples/CivilAlignments/CS/Command.cs index 0210b65c..e574480f 100644 --- a/SDK/Samples/CivilAlignments/CS/Command.cs +++ b/SDK/Samples/CivilAlignments/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,16 +22,13 @@ using System; using System.Linq; -using System.Windows.Forms; -using System.Collections; using System.Collections.Generic; -using Autodesk.Revit; using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Infrastructure; using Autodesk.Revit.UI; using Autodesk.Revit.UI.Selection; - -using Autodesk.Revit.DB.Infrastructure; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.CivilAlignments.CS { diff --git a/SDK/Samples/CivilAlignments/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CivilAlignments/CS/Properties/AssemblyInfo.cs index cb039e07..2206de18 100644 --- a/SDK/Samples/CivilAlignments/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CivilAlignments/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CivilAlignments")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2020")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/CloudAPISample/CS/Application.cs b/SDK/Samples/CloudAPISample/CS/Application.cs index 539170b7..055a1b1e 100644 --- a/SDK/Samples/CloudAPISample/CS/Application.cs +++ b/SDK/Samples/CloudAPISample/CS/Application.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted @@ -22,6 +22,7 @@ using System; using System.IO; +using System.Resources; using System.Windows.Media.Imaging; using Autodesk.Revit.Attributes; using Autodesk.Revit.DB; @@ -89,7 +90,7 @@ namespace Revit.SDK.Samples.CloudAPISample.CS pushButton.Enabled = true; pushButton.LargeImage = - new BitmapImage(new Uri(Path.Combine(Path.GetDirectoryName(assemblyPath) ?? string.Empty, "icon.ico"))); + new BitmapImage(new Uri(Path.Combine(Path.GetDirectoryName(assemblyPath) ?? string.Empty, "Resources", "icon.ico"))); pushButton.AvailabilityClassName = " Revit.SDK.Samples.CloudAPISample.CS.RunSampleCommand"; return Result.Succeeded; diff --git a/SDK/Samples/CloudAPISample/CS/CloudAPISample.csproj b/SDK/Samples/CloudAPISample/CS/CloudAPISample.csproj index 92f43b3c..e24870a5 100644 --- a/SDK/Samples/CloudAPISample/CS/CloudAPISample.csproj +++ b/SDK/Samples/CloudAPISample/CS/CloudAPISample.csproj @@ -1,138 +1,34 @@ - - - - - None - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {8A4EA589-A668-4824-9C1D-56B6A53DE304} - Library - Properties - CloudAPISample - CloudAPISample - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\CloudAPISample.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\CloudAPISample.XML - + + - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 true bin\Debug\CloudAPISample.XML - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x64 true bin\Release\CloudAPISample.XML - - OnOutputUpdated - - - - - - - - - - - - - - - 4.7 - - + + + - - - - - - - - - - - ViewInputMigrationInfo.xaml - - - ViewSamplePortal.xaml - - - ViewMigrationToBim360.xaml - + + Always + - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - + - + + + - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/CloudAPISample/CS/Coroutine/Coroutine.cs b/SDK/Samples/CloudAPISample/CS/Coroutine/Coroutine.cs index d0d74afe..f257215f 100644 --- a/SDK/Samples/CloudAPISample/CS/Coroutine/Coroutine.cs +++ b/SDK/Samples/CloudAPISample/CS/Coroutine/Coroutine.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted diff --git a/SDK/Samples/CloudAPISample/CS/Coroutine/CoroutineScheduler.cs b/SDK/Samples/CloudAPISample/CS/Coroutine/CoroutineScheduler.cs index afcf2997..0de0b325 100644 --- a/SDK/Samples/CloudAPISample/CS/Coroutine/CoroutineScheduler.cs +++ b/SDK/Samples/CloudAPISample/CS/Coroutine/CoroutineScheduler.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted diff --git a/SDK/Samples/CloudAPISample/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CloudAPISample/CS/Properties/AssemblyInfo.cs index 008879ff..6ea558ae 100644 --- a/SDK/Samples/CloudAPISample/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CloudAPISample/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted @@ -21,7 +21,6 @@ // (Rights in Technical Data and Computer Software), as applicable. using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -56,3 +55,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/CloudAPISample/CS/SampleContext.cs b/SDK/Samples/CloudAPISample/CS/SampleContext.cs index 03b71e4a..b7b969ce 100644 --- a/SDK/Samples/CloudAPISample/CS/SampleContext.cs +++ b/SDK/Samples/CloudAPISample/CS/SampleContext.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted diff --git a/SDK/Samples/CloudAPISample/CS/SampleEngine.cs b/SDK/Samples/CloudAPISample/CS/SampleEngine.cs index 4b0be06b..0a52deec 100644 --- a/SDK/Samples/CloudAPISample/CS/SampleEngine.cs +++ b/SDK/Samples/CloudAPISample/CS/SampleEngine.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted diff --git a/SDK/Samples/CloudAPISample/CS/Samples/Migration/IMigrationModel.cs b/SDK/Samples/CloudAPISample/CS/Samples/Migration/IMigrationModel.cs index 20533ab5..a3d73748 100644 --- a/SDK/Samples/CloudAPISample/CS/Samples/Migration/IMigrationModel.cs +++ b/SDK/Samples/CloudAPISample/CS/Samples/Migration/IMigrationModel.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted diff --git a/SDK/Samples/CloudAPISample/CS/Samples/Migration/MigrationToBim360.cs b/SDK/Samples/CloudAPISample/CS/Samples/Migration/MigrationToBim360.cs index fb04249f..63c43845 100644 --- a/SDK/Samples/CloudAPISample/CS/Samples/Migration/MigrationToBim360.cs +++ b/SDK/Samples/CloudAPISample/CS/Samples/Migration/MigrationToBim360.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted @@ -26,10 +26,10 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; -using System.Web.Script.Serialization; using System.Windows; using Autodesk.Revit.DB; using Revit.SDK.Samples.CloudAPISample.CS.View; +using Newtonsoft.Json; namespace Revit.SDK.Samples.CloudAPISample.CS.Migration { @@ -148,8 +148,7 @@ namespace Revit.SDK.Samples.CloudAPISample.CS.Migration } // All link info should be dump to local file in case something wrong happens during uploading process - JavaScriptSerializer serializer = new JavaScriptSerializer(); - var jsonString = serializer.Serialize(mapLocalModelPathToLinksName); + var jsonString = JsonConvert.SerializeObject(mapLocalModelPathToLinksName); File.WriteAllText(FLinksInfo, jsonString); @@ -186,7 +185,7 @@ namespace Revit.SDK.Samples.CloudAPISample.CS.Migration yield return null; } - jsonString = serializer.Serialize(mapModelsNameToGuid); + jsonString = JsonConvert.SerializeObject(mapModelsNameToGuid); File.WriteAllText(FModelsGuid, jsonString); view.UpdateUploadingProgress("Uploading finished", 100); @@ -218,10 +217,9 @@ namespace Revit.SDK.Samples.CloudAPISample.CS.Migration // Read mapping info var jsonString = File.ReadAllText(FLinksInfo); - JavaScriptSerializer serializer = new JavaScriptSerializer(); - var mapLocalModelPathToLinksName = serializer.Deserialize>>(jsonString); + var mapLocalModelPathToLinksName = JsonConvert.DeserializeObject>>(jsonString); jsonString = File.ReadAllText(FModelsGuid); - var mapModelsNameToGuid = serializer.Deserialize>(jsonString); + var mapModelsNameToGuid = JsonConvert.DeserializeObject>(jsonString); // Try to open each cloud model and reload if they have links, making that point to cloud path. foreach (var kvp in mapLocalModelPathToLinksName) diff --git a/SDK/Samples/CloudAPISample/CS/Samples/Migration/UIMigrationViewModel.cs b/SDK/Samples/CloudAPISample/CS/Samples/Migration/UIMigrationViewModel.cs index 7547da8e..2a175d6e 100644 --- a/SDK/Samples/CloudAPISample/CS/Samples/Migration/UIMigrationViewModel.cs +++ b/SDK/Samples/CloudAPISample/CS/Samples/Migration/UIMigrationViewModel.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted diff --git a/SDK/Samples/CloudAPISample/CS/View/ViewInputMigrationInfo.xaml.cs b/SDK/Samples/CloudAPISample/CS/View/ViewInputMigrationInfo.xaml.cs index 4372b2c9..846aa3c7 100644 --- a/SDK/Samples/CloudAPISample/CS/View/ViewInputMigrationInfo.xaml.cs +++ b/SDK/Samples/CloudAPISample/CS/View/ViewInputMigrationInfo.xaml.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted @@ -23,9 +23,9 @@ using System.IO; using System.Linq; using System.Runtime.Serialization; -using System.Web.Script.Serialization; using System.Windows; using Microsoft.Win32; +using Newtonsoft.Json; using Revit.SDK.Samples.CloudAPISample.CS.Migration; namespace Revit.SDK.Samples.CloudAPISample.CS.View @@ -64,8 +64,7 @@ namespace Revit.SDK.Samples.CloudAPISample.CS.View { var model = ((MigrationToBim360) DataContext).Model; var jsonString = File.ReadAllText(openFileDialog.FileName); - JavaScriptSerializer serializer = new JavaScriptSerializer(); - var info = serializer.Deserialize(jsonString); + var info = JsonConvert.DeserializeObject(jsonString); model.AccountGuid = info.AccountGuid; model.ProjectGuid = info.ProjectGuid; @@ -86,8 +85,7 @@ namespace Revit.SDK.Samples.CloudAPISample.CS.View ProjectGuid = model.ProjectGuid, AvailableFolders = model.AvailableFolders.ToArray() }; - JavaScriptSerializer serializer = new JavaScriptSerializer(); - var jsonString = serializer.Serialize(info); + var jsonString = JsonConvert.SerializeObject(info); File.WriteAllText(saveFileDialog.FileName, jsonString); } } diff --git a/SDK/Samples/CloudAPISample/CS/View/ViewMigrationToBim360.xaml.cs b/SDK/Samples/CloudAPISample/CS/View/ViewMigrationToBim360.xaml.cs index 208ee120..e2cf1e50 100644 --- a/SDK/Samples/CloudAPISample/CS/View/ViewMigrationToBim360.xaml.cs +++ b/SDK/Samples/CloudAPISample/CS/View/ViewMigrationToBim360.xaml.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted diff --git a/SDK/Samples/CloudAPISample/CS/View/ViewSamplePortal.xaml.cs b/SDK/Samples/CloudAPISample/CS/View/ViewSamplePortal.xaml.cs index adeee965..5f80adef 100644 --- a/SDK/Samples/CloudAPISample/CS/View/ViewSamplePortal.xaml.cs +++ b/SDK/Samples/CloudAPISample/CS/View/ViewSamplePortal.xaml.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. All rights reserved. +// (C) Copyright 2003-2023 by Autodesk, Inc. All rights reserved. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted diff --git a/SDK/Samples/ColorFill/CS/ColorFill.csproj b/SDK/Samples/ColorFill/CS/ColorFill.csproj index bfe9bf7b..db4723fa 100644 --- a/SDK/Samples/ColorFill/CS/ColorFill.csproj +++ b/SDK/Samples/ColorFill/CS/ColorFill.csproj @@ -1,108 +1,16 @@ - - - - - None - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {CC412DB6-8DFA-4A73-B0D4-5531043C4F76} - Library - Properties - ColorFill - ColorFill - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ColorFill.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\ColorFill.XML - + + - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 true bin\Debug\ColorFill.XML - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x64 true bin\Release\ColorFill.XML - - OnOutputUpdated - - - - - - - - - - 4.7 - - - - - Form - - - ColorFillForm.cs - - - - - - - - ColorFillForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/ColorFill/CS/ColorFillMgr.cs b/SDK/Samples/ColorFill/CS/ColorFillMgr.cs index f45759df..0ffe26f6 100644 --- a/SDK/Samples/ColorFill/CS/ColorFillMgr.cs +++ b/SDK/Samples/ColorFill/CS/ColorFillMgr.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/ColorFill/CS/Command.cs b/SDK/Samples/ColorFill/CS/Command.cs index eba3337c..4157734a 100644 --- a/SDK/Samples/ColorFill/CS/Command.cs +++ b/SDK/Samples/ColorFill/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2020 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/ColorFill/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ColorFill/CS/Properties/AssemblyInfo.cs index df705089..4dd633b0 100644 --- a/SDK/Samples/ColorFill/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ColorFill/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ColorFill")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2020")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -34,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/CompoundStructure/CS/CompoundStructure.csproj b/SDK/Samples/CompoundStructure/CS/CompoundStructure.csproj index 04aee8b1..e95426c8 100644 --- a/SDK/Samples/CompoundStructure/CS/CompoundStructure.csproj +++ b/SDK/Samples/CompoundStructure/CS/CompoundStructure.csproj @@ -1,99 +1,24 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {C86EB4CF-72AE-4314-B2A8-16FF5F672E7B} - Library - Properties - CompoundStructure - CompoundStructure - v4.8 - 512 - - - - - 3.5 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - true + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt AllRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt AllRules.ruleset - - OnOutputUpdated - - - - 3.5 - - - 3.5 - - - 3.5 - - - + - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - None diff --git a/SDK/Samples/ContextMenu/CS/AddInCommand.cs b/SDK/Samples/ContextMenu/CS/AddInCommand.cs new file mode 100644 index 00000000..21a083f2 --- /dev/null +++ b/SDK/Samples/ContextMenu/CS/AddInCommand.cs @@ -0,0 +1,75 @@ +// +// (C) Copyright 2003-2022 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.UI.Selection; + +namespace Revit.SDK.Samples.ContextMenu.CS +{ + /// + /// Implements the Revit add-in interface IExternalCommand, show the user selection. + /// Implements the Revit add-in interface IExternalCommandAvailability, enable/disable the command. + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + + public class ShowSelection : IExternalCommand, IExternalCommandAvailability + { + public Result Execute(ExternalCommandData revit, + ref string message, + ElementSet elements) + { + try + { + Selection selection = revit.Application.ActiveUIDocument.Selection; + System.Collections.Generic.ICollection elementIds = selection.GetElementIds(); + if (elementIds.Count == 0) + { + TaskDialog.Show("Revit", "No Element Selected"); + } + else + { + string info = "Selected Element Id: "; + foreach (ElementId elemId in elementIds) + { + info += "\n\t" + elemId.ToString(); + } + + TaskDialog.Show("Revit", info); + } + } + catch (Exception e) + { + message = e.Message; + return Result.Failed; + } + + return Result.Succeeded; + } + + public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories) + { + return true; + } + } +} diff --git a/SDK/Samples/ContextMenu/CS/ContextMenu.addin b/SDK/Samples/ContextMenu/CS/ContextMenu.addin new file mode 100644 index 00000000..2534700e --- /dev/null +++ b/SDK/Samples/ContextMenu/CS/ContextMenu.addin @@ -0,0 +1,11 @@ + + + + External Tool + ContextMenu.dll + 5F37D1FF-51C8-401C-B975-BC31202AAC5E + Revit.SDK.Samples.ContextMenu.CS.ContextMenuApplication + ADSK + Autodesk, www.autodesk.com + + \ No newline at end of file diff --git a/SDK/Samples/ContextMenu/CS/ContextMenu.cs b/SDK/Samples/ContextMenu/CS/ContextMenu.cs new file mode 100644 index 00000000..4883b6b8 --- /dev/null +++ b/SDK/Samples/ContextMenu/CS/ContextMenu.cs @@ -0,0 +1,83 @@ +// +// (C) Copyright 2003-2022 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// +using System; +using Autodesk.Revit.UI; + +namespace Revit.SDK.Samples.ContextMenu.CS +{ + /// + /// Implements the Revit add-in interface IExternalApplication, + /// register context menu creators implemented by user with application full class name. + /// + public class ContextMenuApplication : IExternalApplication + { + #region IExternalApplication Members + /// + /// Implement this method to implement the external application which should be called when + /// Revit starts before a file or default template is actually loaded. + /// + /// An object that is passed to the external application + /// which contains the controlled application. + /// Return the status of the external application. + /// A result of Succeeded means that the external application successfully started. + /// Cancelled can be used to signify that the user canceled the external operation at + /// some point. + /// If Failed is returned then Revit should inform the user that the external application + /// failed to load and the release the internal reference. + public Result OnStartup(UIControlledApplication application) + { + try + { + // register context menu creator. + application.RegisterContextMenu(typeof(ContextMenuApplication).FullName, new ContextMenuCreator()); + return Result.Succeeded; + } + catch (Exception ex) + { + TaskDialog.Show("ContextMenu Sample", ex.ToString()); + + return Result.Failed; + } + } + + /// + /// Implement this method to implement the external application which should be called when + /// Revit is about to exit, Any documents must have been closed before this method is called. + /// + /// An object that is passed to the external application + /// which contains the controlled application. + /// Return the status of the external application. + /// A result of Succeeded means that the external application successfully shutdown. + /// Cancelled can be used to signify that the user canceled the external operation at + /// some point. + /// If Failed is returned then the Revit user should be warned of the failure of the external + /// application to shut down correctly. + public Result OnShutdown(UIControlledApplication application) + { + //remove events + + return Result.Succeeded; + } + #endregion + + } +} diff --git a/SDK/Samples/ContextMenu/CS/ContextMenu.csproj b/SDK/Samples/ContextMenu/CS/ContextMenu.csproj new file mode 100644 index 00000000..5ca9e327 --- /dev/null +++ b/SDK/Samples/ContextMenu/CS/ContextMenu.csproj @@ -0,0 +1,22 @@ + + + Revit + true + + + + MinimumRecommendedRules.ruleset + + + true + MinimumRecommendedRules.ruleset + + + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" +if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + + + None + + \ No newline at end of file diff --git a/SDK/Samples/ContextMenu/CS/ContextMenuCreator.cs b/SDK/Samples/ContextMenu/CS/ContextMenuCreator.cs new file mode 100644 index 00000000..9a5e7aab --- /dev/null +++ b/SDK/Samples/ContextMenu/CS/ContextMenuCreator.cs @@ -0,0 +1,52 @@ +// +// (C) Copyright 2003-2022 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// +using Autodesk.Revit.UI; + + +namespace Revit.SDK.Samples.ContextMenu.CS +{ + /// + /// Implements the Revit add-in interface IContextMenuCreator, + /// build context menu passed in. + /// + public class ContextMenuCreator : IContextMenuCreator + { + public void BuildContextMenu(Autodesk.Revit.UI.ContextMenu menu) + { + // Add a command menu item. + var item1 = new CommandMenuItem("Show Selection", typeof(ShowSelection).FullName, typeof(ContextMenuApplication).Assembly.Location); + item1.SetAvailabilityClassName(typeof(ShowSelection).FullName); + menu.AddItem(item1); + + // Add a separator. + menu.AddItem(new SeparatorItem()); + + var subMenu = new Autodesk.Revit.UI.ContextMenu(); + var item2 = new CommandMenuItem("Show Selection", typeof(ShowSelection).FullName, typeof(ContextMenuApplication).Assembly.Location); + item2.SetAvailabilityClassName(typeof(ShowSelection).FullName); + subMenu.AddItem(item2); + // Add a sub-menu item. + menu.AddItem(new SubMenuItem("subMenu", subMenu)); + } + } + +} diff --git a/SDK/Samples/ContextMenu/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ContextMenu/CS/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..226ee75e --- /dev/null +++ b/SDK/Samples/ContextMenu/CS/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ContexteMenu")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Autodesk, Inc.")] +[assembly: AssemblyProduct("ContextMenu")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3d972638-1ad1-47f4-a64e-5730e60bfd62")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SDK/Samples/ContextMenu/CS/ReadMe_ContextMenu.rtf b/SDK/Samples/ContextMenu/CS/ReadMe_ContextMenu.rtf new file mode 100644 index 00000000..5b18bbe2 --- /dev/null +++ b/SDK/Samples/ContextMenu/CS/ReadMe_ContextMenu.rtf @@ -0,0 +1,296 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe2052\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\f47\fbidi \fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Tahoma;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 00000000000000000000}Cambria;} +{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1234\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f1235\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f1237\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f1238\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f1239\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f1240\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f1241\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f1242\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f1244\fbidi \fswiss\fcharset238\fprq2 Arial CE;} +{\f1245\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}{\f1247\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f1248\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f1249\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);} +{\f1250\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}{\f1251\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f1252\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f1574\fbidi \froman\fcharset238\fprq2 Cambria Math CE;} +{\f1575\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f1577\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f1578\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f1581\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;} +{\f1582\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f1604\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f1605\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f1607\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;} +{\f1608\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f1609\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\f1610\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f1611\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} +{\f1612\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\f1704\fbidi \fswiss\fcharset238\fprq2 Tahoma CE;}{\f1705\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f1707\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek;} +{\f1708\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur;}{\f1709\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f1710\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f1711\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic;} +{\f1712\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese);}{\f1713\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} +{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} +{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} +{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} +{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; +\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap +\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 +\af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext11 \ssemihidden \sunhideused +Normal Table;}{\s15\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af47\afs16\alang1025 \ltrch\fcs0 +\fs16\lang1033\langfe1033\loch\f47\hich\af47\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 \slink16 \ssemihidden \sunhideused \styrsid6507004 Document Map;}{\*\cs16 \additive \rtlch\fcs1 \af47\afs16 \ltrch\fcs0 +\f47\fs16\lang0\langfe1033\langnp0\langfenp1033 \sbasedon10 \slink15 \slocked \ssemihidden \styrsid6507004 Document Map Char;}}{\*\rsidtbl \rsid662543\rsid1799578\rsid1861991\rsid2501231\rsid2753807\rsid3421211\rsid3622800\rsid3754291\rsid3822396 +\rsid4534662\rsid4657737\rsid5600207\rsid5963911\rsid6507004\rsid6698995\rsid7289975\rsid7564840\rsid7813361\rsid8143006\rsid9972038\rsid10033144\rsid11797461\rsid11889832\rsid12133713\rsid12867408\rsid14105536\rsid14356605\rsid16604837}{\mmathPr +\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Keven Yang}{\operator Fiona Yang}{\creatim\yr2010\mo4\dy7\hr16\min55}{\revtim\yr2023\mo7\dy28\hr15\min36}{\version18} +{\edmins258}{\nofpages2}{\nofwords384}{\nofchars2192}{\nofcharsws2571}{\vern75}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect +\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701 +\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot14356605 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2 +\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 +\ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3754291 +\hich\af1\dbch\af31505\loch\f1 Co\hich\af1\dbch\af31505\loch\f1 n\hich\af1\dbch\af31505\loch\f1 textMenu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 +Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 20}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3754291 \hich\af1\dbch\af31505\loch\f1 25}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14105536 .0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 20}{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8143006 \hich\af1\dbch\af31505\loch\f1 25}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 .0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 +Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Beginning\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12133713 \hich\af1\dbch\af31505\loch\f1 UI}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \line }{\rtlch\fcs1 +\ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 ExternalApplication\line }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid7289975 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11797461 +\hich\af1\dbch\af31505\loch\f1 Create c}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 ustom}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11797461 \hich\af1\dbch\af31505\loch\f1 ized}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7813361 \hich\af1\dbch\af31505\loch\f1 ContextMenu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11797461 +\hich\af1\dbch\af31505\loch\f1 by }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7813361 \hich\af1\dbch\af31505\loch\f1 ContextMenu\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11797461 +\hich\af1\dbch\af31505\loch\f1 API}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 \line }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9972038\charrsid9972038 \hich\af1\dbch\af31505\loch\f1 +This sample demonstrates how to create customized context menu for Add-In and how to create different types of menu items (CommandMenuItem, SeparatorItem, SubMenuItem).}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid14105536 +\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid7289975 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid6507004 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \fi360\li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid6507004 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid11889832 \hich\af1\dbch\af31505\loch\f1 UI.ContextMenu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \fi360\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.\hich\af1\dbch\af31505\loch\f1 UI.}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid11889832 \hich\af1\dbch\af31505\loch\f1 IContextMenuCreator}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.IExternalCommand +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.IExternalApplication +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid6507004 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid14105536 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144 \hich\af1\dbch\af31505\loch\f1 Con\hich\af1\dbch\af31505\loch\f1 te\hich\af1\dbch\af31505\loch\f1 xtMenu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 .cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid4534662 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 This}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 file }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 contains the class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144 \hich\af1\dbch\af31505\loch\f1 Con +\hich\af1\dbch\af31505\loch\f1 textMenuApp\hich\af1\dbch\af31505\loch\f1 lication}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 which inherited}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 from interface}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4534662 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 IEx}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 ternalApplication and implemented}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 method}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid2501231 \hich\af1\dbch\af31505\loch\f1 OnStartUp. The class will}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144 \hich\af1\dbch\af31505\loch\f1 register \hich\af1\dbch\af31505\loch\f1 u\hich\af1\dbch\af31505\loch\f1 ser +\hich\af1\dbch\af31505\loch\f1 implemente\hich\af1\dbch\af31505\loch\f1 d\hich\af1\dbch\af31505\loch\f1 \hich\af1\dbch\af31505\loch\f1 context menu creator into applica\hich\af1\dbch\af31505\loch\f1 tion}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14105536 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid6507004 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 AddInCommands.cs +\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid4534662 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2501231 \hich\af1\dbch\af31505\loch\f1 This file contains }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid4534662 \hich\af1\dbch\af31505\loch\f1 the}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 class}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144 \hich\af1\dbch\af31505\loch\f1 }{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144\charrsid10033144 \hich\af1\dbch\af31505\loch\f1 ShowSelection}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144 \hich\af1\dbch\af31505\loch\f1 which }{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid10033144 \hich\af1\dbch\af31505\loch\f1 inherited\hich\af1\dbch\af31505\loch\f1 from interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144\charrsid10033144 \hich\af1\dbch\af31505\loch\f1 IExternalCommand}{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144 \hich\af1\dbch\af31505\loch\f1 and }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144\charrsid10033144 \hich\af1\dbch\af31505\loch\f1 IExternalCommandAvailability}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144 \hich\af1\dbch\af31505\loch\f1 , de\hich\af1\dbch\af31505\loch\f1 fine the command will be executed when cl\hich\af1\dbch\af31505\loch\f1 ick ite\hich\af1\dbch\af31505\loch\f1 m on cont +\hich\af1\dbch\af31505\loch\f1 ext menu.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \fi351\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid5600207 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5600207 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid5600207 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5600207 \hich\af1\dbch\af31505\loch\f1 ContexMenuCreator.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid4534662 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5600207 +\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid4534662 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4534662 \hich\af1\dbch\af31505\loch\f1 This file contains \hich\af1\dbch\af31505\loch\f1 the class }{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4534662\charrsid4534662 \hich\af1\dbch\af31505\loch\f1 ContextMenuCreator}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4534662\charrsid4534662 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4534662 \hich\af1\dbch\af31505\loch\f1 which \hich\af1\dbch\af31505\loch\f1 inherited\hich\af1\dbch\af31505\loch\f1 from interface}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4534662 +\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4534662\charrsid4534662 \hich\af1\dbch\af31505\loch\f1 IContextMenuCreator}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4534662 \hich\af1\dbch\af31505\loch\f1 +, build the context menu and add menu item in\hich\af1\dbch\af31505\loch\f1 it.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7289975 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4534662 +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid6507004 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Description}{\rtlch\fcs1 \af37 +\ltrch\fcs0 \f37\insrsid14105536 \hich\af37\dbch\af31505\loch\f37 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid14105536 +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 This sample should provide the following functionalities: +\par }\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid10033144 {\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid14105536 \loch\af3\hich\af3\dbch\f31505 \'b7}{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 +\f3\fs20\insrsid14105536 \tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2753807 \hich\af1\dbch\af31505\loch\f1 B\hich\af1\dbch\af31505\loch\f1 uild \hich\af1\dbch\af31505\loch\f1 co\hich\af1\dbch\af31505\loch\f1 nte +\hich\af1\dbch\af31505\loch\f1 x\hich\af1\dbch\af31505\loch\f1 t menu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2753807 \hich\af1\dbch\af31505\loch\f1 +by diff\hich\af1\dbch\af31505\loch\f1 erent item\hich\af1\dbch\af31505\loch\f1 s and register it }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 into Revit}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid10033144 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10033144 +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Implementation Notes +\par }\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid14105536 \loch\af3\hich\af3\dbch\f31505 \'b7}{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid14105536 \tab }{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 To add }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2753807 \hich\af1\dbch\af31505\loch\f1 ContextMenu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 in Revit, user need to implement the IExternalApplication interface, and call }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12867408 \hich\af1\dbch\af31505\loch\f1 R}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid2753807 \hich\af1\dbch\af31505\loch\f1 e\hich\af1\dbch\af31505\loch\f1 gister\hich\af1\dbch\af31505\loch\f1 C\hich\af1\dbch\af31505\loch\f1 ontextMenu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2753807 \hich\af1\dbch\af31505\loch\f1 method\hich\af1\dbch\af31505\loch\f1 \hich\af1\dbch\af31505\loch\f1 to register context menu creator }{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 in OnStartup(ControlledApplication) method. +\par }\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid1861991 {\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid1861991 \loch\af3\hich\af3\dbch\f31505 \'b7}{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 +\f3\fs20\insrsid1861991 \tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1861991 \hich\af1\dbch\af31505\loch\f1 To build ContextM\hich\af1\dbch\af31505\loch\f1 enu, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1861991 +\hich\af1\dbch\af31505\loch\f1 user need to implement the I}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1861991 \hich\af1\dbch\af31505\loch\f1 ContextM\hich\af1\dbch\af31505\loch\f1 enuCreator}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid1861991 \hich\af1\dbch\af31505\loch\f1 interface}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1861991 \hich\af1\dbch\af31505\loch\f1 , \hich\af1\dbch\af31505\loch\f1 add\hich\af1\dbch\af31505\loch\f1 menu +\hich\af1\dbch\af31505\loch\f1 items to\hich\af1\dbch\af31505\loch\f1 the \hich\af1\dbch\af31505\loch\f1 context menu \hich\af1\dbch\af31505\loch\f1 pa\hich\af1\dbch\af31505\loch\f1 s\hich\af1\dbch\af31505\loch\f1 sed in. +\par }\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid14105536 \loch\af3\hich\af3\dbch\f31505 \'b7}{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid14105536 \tab }{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Each }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12867408 \hich\af1\dbch\af31505\loch\f1 CommandMenuItem}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 in }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12867408 \hich\af1\dbch\af31505\loch\f1 ContextMenu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 should have a corresponding command to \hich\af1\dbch\af31505\loch\f1 execute. The command corresponding to each }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12867408 \hich\af1\dbch\af31505\loch\f1 CommandMenuItem +\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 should implement the IExternalCommand interface. +\par }{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid14105536 \loch\af3\hich\af3\dbch\f31505 \'b7}{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid14105536 \tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 Use }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1861991 \hich\af1\dbch\af31505\loch\f1 n\hich\af1\dbch\af31505\loch\f1 ew ContextM\hich\af1\dbch\af31505\loch\f1 enu()}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 to }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1861991 \hich\af1\dbch\af31505\loch\f1 create a new \hich\af1\dbch\af31505\loch\f1 sub men\hich\af1\dbch\af31505\loch\f1 u}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 . +\par }{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid14105536 \loch\af3\hich\af3\dbch\f31505 \'b7}{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid14105536 \tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 Use }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1861991 \hich\af1\dbch\af31505\loch\f1 ContextM\hich\af1\dbch\af31505\loch\f1 enu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 .Add}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1861991 \hich\af1\dbch\af31505\loch\f1 I\hich\af1\dbch\af31505\loch\f1 tem}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 +() to add }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1861991 \hich\af1\dbch\af31505\loch\f1 a single item to context menu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 . +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0\pararsid6507004 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\cf2\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf2\insrsid14105536 +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid14105536 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 1.\tab Copy }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\b\f1\fs20\insrsid662543\charrsid662543 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid14105536\charrsid662543 \hich\af1\dbch\af31505\loch\f1 addin}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 + file to the corresponding Addins folder for the Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid662543 \hich\af1\dbch\af31505\loch\f1 You can }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3822396 \hich\af1\dbch\af31505\loch\f1 find }{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid662543 \hich\af1\dbch\af31505\loch\f1 out the location of this folder by RevitAddUtility.dll, we also provided a sample named ExternalCommand for it.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid6698995 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid662543 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 (For example}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid662543 \hich\af1\dbch\af31505\loch\f1 , folder location for}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 XP user}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid662543 +\hich\af1\dbch\af31505\loch\f1 is here:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 \\\\}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995\charrsid6698995 \hich\af1\dbch\af31505\loch\f1 +Documents and Set\hich\af1\dbch\af31505\loch\f1 tings\\All Users\\Applicatio}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1799578 \hich\af1\dbch\af31505\loch\f1 n Data\\Autodesk\\Revit\\Addins\\20}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1799578 \hich\af1\dbch\af31505\loch\f1 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6698995 \hich\af1\dbch\af31505\loch\f1 )}{ +\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 2.\tab Copy the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid3822396 \hich\af1\dbch\af31505\loch\f1 Co\hich\af1\dbch\af31505\loch\f1 ntextMenu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 .dll \hich\af1\dbch\af31505\loch\f1 +to the same directory of this sample dll}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid14105536 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 3.\tab Run Revit, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid7564840 \hich\af1\dbch\af31505\loch\f1 right click the element on C\hich\af1\dbch\af31505\loch\f1 anvas/Project\hich\af1\dbch\af31505\loch\f1 Browser\hich\af1\dbch\af31505\loch\f1 , }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 then you can see the custom}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7289975 \hich\af1\dbch\af31505\loch\f1 ized}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7564840 \hich\af1\dbch\af31505\loch\f1 Context\hich\af1\dbch\af31505\loch\f1 Menu}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 +\hich\af1\dbch\af31505\loch\f1 in Revit. +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid7564840 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 4.\tab Click each }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid7564840 \hich\af1\dbch\af31505\loch\f1 item}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14105536 \hich\af1\dbch\af31505\loch\f1 to run this sampl\hich\af1\dbch\af31505\loch\f1 e. +\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a +9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad +5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 +b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 +0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 +a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f +c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 +0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 +a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 +6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b +4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b +4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f +7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87 +615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad +79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b +5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab +999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9 +699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586 +8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6 +0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f +9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be +15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979 +3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d +32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a +f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86 +e877f0034e16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb +44f95d843b5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a +6409fb44d08741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c +3d9058edf2c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db0256 +5e85f3b9660d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276 +b9f7dec44b7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8 +c33585b5fb9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e +51440ca2e0088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95 +b21be5ceaf8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff +6dce591a26ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec6 +9ffb9e65d028d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239 +b75a5bb1e6345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a449 +59d366ad93b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e8 +2db8df9f30254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468 +656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4 +350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d2624 +52282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe5141 +73d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000 +0000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000 +000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019 +0200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b00001600000000 +000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027 +00000000000000000000000000a00900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d0100009b0a00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong; +\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority59 \lsdlocked0 Table Grid;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing; +\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1; +\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading; +\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph; +\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1; +\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1; +\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2; +\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2; +\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3; +\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3; +\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3; +\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4; +\lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; +\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; +\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; +\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; +\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; +\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; +\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; +\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; +\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; +\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; +\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; +\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore 01050000 +02000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000204b +032926c1d901feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/AnalyticalElementLocalCoordinateSystem.cs b/SDK/Samples/ContextualAnalyticalModel/CS/AnalyticalElementLocalCoordinateSystem.cs new file mode 100644 index 00000000..10d93414 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/AnalyticalElementLocalCoordinateSystem.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class AnalyticalElementLocalCoordinateSystem : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// A message that can be set by the external application + /// which will be displayed if a failure or cancellation is returned by + /// the external command. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// Return the status of the external command. + /// A result of Succeeded means that the API external method functioned as expected. + /// Cancelled can be used to signify that the user cancelled the external operation + /// at some point. Failure should be returned if the application is unable to proceed with + /// the operation. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + //Expected results: The Local Coordinate System X axis is align to Line direction. + try + { + // Get the Document + Document document = commandData.Application.ActiveUIDocument.Document; + + // Create an Analytical Panel + AnalyticalPanel analyticalPanel = CreateAnalyticalPanel.CreateAMPanel(document); + + // Start transaction + using (Transaction transaction = new Transaction(document, "Align X axis")) + { + transaction.Start(); + + Transform trf = analyticalPanel.GetTransform(); + + Line line = Line.CreateBound(new XYZ(0, 0, 0), new XYZ(10, 10, 0)); + + trf.BasisX = line.Direction.Normalize(); + trf.BasisY = trf.BasisZ.CrossProduct(trf.BasisX); + + if (analyticalPanel.IsValidTransform(trf)) + analyticalPanel.SetTransform(trf); + + transaction.Commit(); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.addin b/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.addin index db33f6a1..748f3bb7 100644 --- a/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.addin +++ b/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.addin @@ -170,4 +170,14 @@ Unknown ADSK + + ContextualAnalyticalModel.dll + 4FA12718-37CF-48BF-897D-6CCF91565816 + ContextualAnalyticalModel.AnalyticalElementLocalCoordinateSystem + Align Analytical Element Local Coordinate System + Align Analytical Element Local Coordinate System + AlwaysVisible + Unknown + ADSK + diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.csproj b/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.csproj index 9574a796..3c6a0857 100644 --- a/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.csproj +++ b/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.csproj @@ -1,118 +1,16 @@ - - - - - None - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {C9E4D1DC-6FA6-490A-8C6B-4A7D54569E45} - Library - Properties - ContextualAnalyticalModel - ContextualAnalyticalModel - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ContextualAnalyticalModel.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\ContextualAnalyticalModel.XML - + + - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 true bin\Debug\ContextualAnalyticalModel.XML - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x64 true bin\Release\ContextualAnalyticalModel.XML - - OnOutputUpdated - - - - - - - - - - 4.7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/ReadMe_ContextualAnalyticalModel.rtf b/SDK/Samples/ContextualAnalyticalModel/CS/ReadMe_ContextualAnalyticalModel.rtf index 0e768d51..8c384179 100644 --- a/SDK/Samples/ContextualAnalyticalModel/CS/ReadMe_ContextualAnalyticalModel.rtf +++ b/SDK/Samples/ContextualAnalyticalModel/CS/ReadMe_ContextualAnalyticalModel.rtf @@ -36,10 +36,10 @@ \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* \ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1 \widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused -Normal Table;}}{\*\rsidtbl \rsid679888\rsid1531095\rsid1919838\rsid3154410\rsid3551054\rsid3940002\rsid4336073\rsid5122316\rsid5643312\rsid6956184\rsid7088339\rsid7295827\rsid7407153\rsid9381469\rsid9641236\rsid10178750\rsid10699490\rsid10884090 -\rsid11877210\rsid12867357\rsid13193745\rsid13371909\rsid13466388\rsid13904977\rsid14619581\rsid14623580}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim0}{\info -{\operator Claudiu Ispas}{\creatim\yr2021\mo6\dy17\hr9\min30}{\revtim\yr2021\mo10\dy26\hr17\min11}{\version22}{\edmins56}{\nofpages2}{\nofwords455}{\nofchars2598}{\nofcharsws3047}{\vern21}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/200 -3/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect +Normal Table;}}{\*\rsidtbl \rsid224623\rsid679888\rsid1531095\rsid1919838\rsid3154410\rsid3551054\rsid3940002\rsid4336073\rsid5122316\rsid5643312\rsid6956184\rsid7088339\rsid7295827\rsid7407153\rsid9381469\rsid9641236\rsid10178750\rsid10699490 +\rsid10884090\rsid11877210\rsid12867357\rsid13193745\rsid13371909\rsid13466388\rsid13904977\rsid14619581\rsid14623580}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim0}{\info +{\operator Constantin Turbatu}{\creatim\yr2021\mo6\dy17\hr9\min30}{\revtim\yr2023\mo4\dy4\hr15\min21}{\version23}{\edmins57}{\nofpages2}{\nofwords482}{\nofchars2753}{\nofcharsws3229}{\vern65}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/ +2003/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect \widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701 \dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot1531095 \nouicompat \fet0{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1 \pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5 @@ -112,6 +112,8 @@ command which moves an AnalyticalMember from two connected Analytical Members an sample related analytical nodes connection status \par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14623580\charrsid14623580 \hich\af1\dbch\af31505\loch\f1 FlipAnalyticalMember.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14623580 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \hich\af1\dbch\af31505\loch\f1 command which flips an analytical member curve +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid224623\charrsid224623 \hich\af1\dbch\af31505\loch\f1 AnalyticalElementLocalCoordinateSystem.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid224623 \hich\af1\dbch\af31505\loch\f1 +\loch\af1\dbch\af31505\hich\f1 \endash \hich\af1\dbch\af31505\loch\f1 command \hich\af1\dbch\af31505\loch\f1 which align the analytical element Local Coordinate System \par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3154410\charrsid3154410 \hich\af1\dbch\af31505\loch\f1 ReleaseConditionsAnalyticalMember}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977 \hich\af1\dbch\af31505\loch\f1 .cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3154410 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 commands which reads the release conditions of an Analytical Member. \par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3154410\charrsid3154410 \hich\af1\dbch\af31505\loch\f1 MemberForcesAnalyticalMember}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977 \hich\af1\dbch\af31505\loch\f1 .cs}{\rtlch\fcs1 @@ -135,7 +137,9 @@ How to add/update/break relations between analytical and physical elements}{\rtl \f1\fs20\insrsid6956184\charrsid6956184 \hich\af1\dbch\af31505\loch\f1 end nodes connected}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin0\itap0\pararsid13904977 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977 -\tab \hich\af1\dbch\af31505\loch\f1 How to flip an Analytical Member \par -\tab \hich\af1\dbch\af31505\loch\f1 How to get/set Member Forces and Release Conditions -\par -\tab \hich\af1\dbch\af31505\loch\f1 How to set the outer contour of an Analytical Panel}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977\charrsid6956184 +\par -\tab \hich\af1\dbch\af31505\loch\f1 How to set the outer contour of an Analytical Panel}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid224623 +\par \hich\af1\dbch\af31505\loch\f1 - \hich\af1\dbch\af31505\loch\f1 H\hich\af1\dbch\af31505\loch\f1 ow to align the Local Coordinate System of \hich\af1\dbch\af31505\loch\f1 an analytical ele\hich\af1\dbch\af31505\loch\f1 ment.}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid224623\charrsid6956184 \par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a 9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad 5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 @@ -280,8 +284,8 @@ fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000906e -826773cad701feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e500000000000000000000000050b8 +fd08f066d901feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/SDK/Samples/CreateBeamSystem/CS/BeamSystemForm.Designer.cs b/SDK/Samples/CreateBeamSystem/CS/BeamSystemForm.Designer.cs index 872eb18b..d02036f1 100644 --- a/SDK/Samples/CreateBeamSystem/CS/BeamSystemForm.Designer.cs +++ b/SDK/Samples/CreateBeamSystem/CS/BeamSystemForm.Designer.cs @@ -36,9 +36,12 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (m_sketch != null) + m_sketch.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/CreateBeamSystem/CS/BeamSystemParams.cs b/SDK/Samples/CreateBeamSystem/CS/BeamSystemParams.cs index e48dd020..20001350 100644 --- a/SDK/Samples/CreateBeamSystem/CS/BeamSystemParams.cs +++ b/SDK/Samples/CreateBeamSystem/CS/BeamSystemParams.cs @@ -216,7 +216,7 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS /// properties related to LayoutRule when it's clear spacing /// only visible for class BeamSystemParam /// - class ClearSpacingParam : BeamSystemParam + class ClearSpacingParam : BeamSystemParam, IDisposable { protected LayoutRuleClearSpacing m_layout; @@ -283,13 +283,28 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS m_layout = new LayoutRuleClearSpacing(m_fixedSpacing, m_justifyType); m_layoutType = LayoutMethod.ClearSpacing; } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_layout != null) + m_layout.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } /// /// properties related to LayoutRule when it's fixed distance /// only visible for class BeamSystemParam /// - class FixedDistanceParam : BeamSystemParam + class FixedDistanceParam : BeamSystemParam, IDisposable { protected LayoutRuleFixedDistance m_layout; @@ -357,13 +372,28 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS m_justifyType = value; } } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_layout != null) + m_layout.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } /// /// properties related to LayoutRule when it's fixed number /// only visible for class BeamSystemParam /// - class FixedNumberParam : BeamSystemParam + class FixedNumberParam : BeamSystemParam, IDisposable { protected LayoutRuleFixedNumber m_layout; @@ -411,13 +441,28 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS m_layout = new LayoutRuleFixedNumber(m_numberOfLines); m_layoutType = LayoutMethod.FixedNumber; } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_layout != null) + m_layout.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } /// /// properties related to LayoutRule when it's maximum spacing /// only visible for class BeamSystemParam /// - class MaximumSpacingParam : BeamSystemParam + class MaximumSpacingParam : BeamSystemParam, IDisposable { protected LayoutRuleMaximumSpacing m_layout; @@ -465,6 +510,21 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS m_layout = new LayoutRuleMaximumSpacing(m_fixedSpacing); m_layoutType = LayoutMethod.MaximumSpacing; } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_layout != null) + m_layout.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } } diff --git a/SDK/Samples/CreateBeamSystem/CS/BeamSystemSketch.cs b/SDK/Samples/CreateBeamSystem/CS/BeamSystemSketch.cs index a97e81c6..e6b7959d 100644 --- a/SDK/Samples/CreateBeamSystem/CS/BeamSystemSketch.cs +++ b/SDK/Samples/CreateBeamSystem/CS/BeamSystemSketch.cs @@ -185,5 +185,14 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS return plgpts; } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (m_inverse != null) + m_inverse.Dispose(); + } + } } } \ No newline at end of file diff --git a/SDK/Samples/CreateBeamSystem/CS/BeamTypeConverter.cs b/SDK/Samples/CreateBeamSystem/CS/BeamTypeConverter.cs index c5038692..354139fb 100644 --- a/SDK/Samples/CreateBeamSystem/CS/BeamTypeConverter.cs +++ b/SDK/Samples/CreateBeamSystem/CS/BeamTypeConverter.cs @@ -45,11 +45,6 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS /// protected Dictionary m_hash; - /// - /// subclass must implement to initialize m_hash - /// - public abstract void GetConvertHash(); - /// /// returns whether this object supports a standard set of values that can be picked from a list /// @@ -140,14 +135,6 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS { return false; } - - /// - /// constructor initialize m_hash - /// - protected ParameterConverter() - { - GetConvertHash(); - } } /// @@ -157,11 +144,9 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS /// public class BeamTypeItem : ParameterConverter { - /// - /// override the base type's GetConvertHash method - /// - public override void GetConvertHash() - { + public BeamTypeItem() + : base() + { m_hash = BeamSystemData.GetBeamTypes(); } } diff --git a/SDK/Samples/CreateBeamSystem/CS/CreateBeamSystem.csproj b/SDK/Samples/CreateBeamSystem/CS/CreateBeamSystem.csproj index 0ce0611f..e58cde3d 100644 --- a/SDK/Samples/CreateBeamSystem/CS/CreateBeamSystem.csproj +++ b/SDK/Samples/CreateBeamSystem/CS/CreateBeamSystem.csproj @@ -1,114 +1,14 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {205E158D-9960-489D-A391-4804D9D3F8DC} - Library - Properties Revit.SDK.Samples.CreateBeamSystem.CS - CreateBeamSystem - - - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900 - prompt - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - BeamSystemForm.cs - - - - - - - - - - - - - - - Designer - BeamSystemForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateBeamSystem/CS/ObjectSketch.cs b/SDK/Samples/CreateBeamSystem/CS/ObjectSketch.cs index 2fd01905..46415beb 100644 --- a/SDK/Samples/CreateBeamSystem/CS/ObjectSketch.cs +++ b/SDK/Samples/CreateBeamSystem/CS/ObjectSketch.cs @@ -32,7 +32,7 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS /// /// base class of sketch object to draw 2D geometry object /// - public abstract class ObjectSketch + public abstract class ObjectSketch : IDisposable { /// /// bounding box of the geometry object @@ -71,5 +71,22 @@ namespace Revit.SDK.Samples.CreateBeamSystem.CS /// /// public abstract void Draw(Graphics g, Matrix translate); + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_pen != null) + m_pen.Dispose(); + if (m_transform != null) + m_transform.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/SDK/Samples/CreateBeamSystem/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CreateBeamSystem/CS/Properties/AssemblyInfo.cs index 56c4e901..f326c0a5 100644 --- a/SDK/Samples/CreateBeamSystem/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CreateBeamSystem/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CreateBeamSystem")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -56,3 +56,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/CreateBeamsColumnsBraces/CS/AssemblyInfo.cs b/SDK/Samples/CreateBeamsColumnsBraces/CS/AssemblyInfo.cs index b93a70f6..27f307e3 100644 --- a/SDK/Samples/CreateBeamsColumnsBraces/CS/AssemblyInfo.cs +++ b/SDK/Samples/CreateBeamsColumnsBraces/CS/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -34,7 +34,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -79,3 +79,4 @@ using System.Runtime.CompilerServices; [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] +[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows7.0")] diff --git a/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBraces.cs b/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBraces.cs index e96d0cfe..6c82163f 100644 --- a/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBraces.cs +++ b/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBraces.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -35,6 +35,7 @@ using Autodesk.Revit.Creation; using ELEMENT = Autodesk.Revit.DB.Element; using STRUCTURALTYPE = Autodesk.Revit.DB.Structure.StructuralType; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.CreateBeamsColumnsBraces.CS { diff --git a/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBraces.csproj b/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBraces.csproj index 93c24555..d64a492c 100644 --- a/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBraces.csproj +++ b/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBraces.csproj @@ -1,146 +1,29 @@ - - + Local - 9.0.30729 - 2.0 - {DAEB3B8B-72CD-475C-A648-EF50EC3C2FCA} - Debug - AnyCPU - - - - - CreateBeamsColumnsBraces - - JScript Grid IE50 false - Library Revit.SDK.Samples.CreateBeamsColumnsBraces.CS - OnBuildSuccess - - - - - - - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - true - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - true - 4 - none - prompt + + false + - true - bin\x64\Debug\ - DEBUG;TRACE 285212672 4096 - full - x64 - prompt MinimumRecommendedRules.ruleset true - bin\x64\Release\ - TRACE 285212672 - true true 4096 - x64 - prompt MinimumRecommendedRules.ruleset + - OnOutputUpdated - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - Code - - - Code - - - Form - - - CreateBeamsColumnsBracesForm.cs - Designer - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBracesForm.Designer.cs b/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBracesForm.Designer.cs new file mode 100644 index 00000000..02a887e7 --- /dev/null +++ b/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBracesForm.Designer.cs @@ -0,0 +1,246 @@ +namespace Revit.SDK.Samples.CreateBeamsColumnsBraces.CS +{ + public partial class CreateBeamsColumnsBracesForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + private System.Windows.Forms.Button OKButton; + private System.Windows.Forms.TextBox XTextBox; + private System.Windows.Forms.TextBox DistanceTextBox; + private System.Windows.Forms.TextBox YTextBox; + private System.Windows.Forms.ComboBox columnComboBox; + private System.Windows.Forms.ComboBox beamComboBox; + private System.Windows.Forms.ComboBox braceComboBox; + private System.Windows.Forms.Button cancelButton; + private System.Windows.Forms.TextBox floornumberTextBox; + private System.Windows.Forms.Label columnLabel; + private System.Windows.Forms.Label beamLabel; + private System.Windows.Forms.Label braceLabel; + private System.Windows.Forms.Label DistanceLabel; + private System.Windows.Forms.Label YLabel; + private System.Windows.Forms.Label XLabel; + private System.Windows.Forms.Label floornumberLabel; + private System.Windows.Forms.Label unitLabel; + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.OKButton = new System.Windows.Forms.Button(); + this.XTextBox = new System.Windows.Forms.TextBox(); + this.YTextBox = new System.Windows.Forms.TextBox(); + this.DistanceTextBox = new System.Windows.Forms.TextBox(); + this.columnComboBox = new System.Windows.Forms.ComboBox(); + this.beamComboBox = new System.Windows.Forms.ComboBox(); + this.braceComboBox = new System.Windows.Forms.ComboBox(); + this.columnLabel = new System.Windows.Forms.Label(); + this.beamLabel = new System.Windows.Forms.Label(); + this.braceLabel = new System.Windows.Forms.Label(); + this.floornumberTextBox = new System.Windows.Forms.TextBox(); + this.DistanceLabel = new System.Windows.Forms.Label(); + this.YLabel = new System.Windows.Forms.Label(); + this.XLabel = new System.Windows.Forms.Label(); + this.floornumberLabel = new System.Windows.Forms.Label(); + this.cancelButton = new System.Windows.Forms.Button(); + this.unitLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // OKButton + // + this.OKButton.Location = new System.Drawing.Point(296, 208); + this.OKButton.Name = "OKButton"; + this.OKButton.TabIndex = 8; + this.OKButton.Text = "&OK"; + this.OKButton.Click += new System.EventHandler(this.OKButton_Click); + // + // XTextBox + // + this.XTextBox.Location = new System.Drawing.Point(16, 96); + this.XTextBox.Name = "XTextBox"; + this.XTextBox.Size = new System.Drawing.Size(136, 20); + this.XTextBox.TabIndex = 2; + this.XTextBox.Text = ""; + this.XTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.XTextBox_Validating); + // + // YTextBox + // + this.YTextBox.Location = new System.Drawing.Point(16, 152); + this.YTextBox.Name = "YTextBox"; + this.YTextBox.Size = new System.Drawing.Size(136, 20); + this.YTextBox.TabIndex = 3; + this.YTextBox.Text = ""; + this.YTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.YTextBox_Validating); + // + // DistanceTextBox + // + this.DistanceTextBox.Location = new System.Drawing.Point(16, 40); + this.DistanceTextBox.Name = "DistanceTextBox"; + this.DistanceTextBox.Size = new System.Drawing.Size(112, 20); + this.DistanceTextBox.TabIndex = 1; + this.DistanceTextBox.Text = ""; + this.DistanceTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.DistanceTextBox_Validating); + // + // columnComboBox + // + this.columnComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.columnComboBox.Location = new System.Drawing.Point(240, 40); + this.columnComboBox.Name = "columnComboBox"; + this.columnComboBox.Size = new System.Drawing.Size(288, 21); + this.columnComboBox.TabIndex = 5; + // + // beamComboBox + // + this.beamComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.beamComboBox.Location = new System.Drawing.Point(240, 96); + this.beamComboBox.Name = "beamComboBox"; + this.beamComboBox.Size = new System.Drawing.Size(288, 21); + this.beamComboBox.TabIndex = 6; + // + // braceComboBox + // + this.braceComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.braceComboBox.Location = new System.Drawing.Point(240, 152); + this.braceComboBox.Name = "braceComboBox"; + this.braceComboBox.Size = new System.Drawing.Size(288, 21); + this.braceComboBox.TabIndex = 7; + // + // columnLabel + // + this.columnLabel.Location = new System.Drawing.Point(240, 16); + this.columnLabel.Name = "columnLabel"; + this.columnLabel.Size = new System.Drawing.Size(120, 23); + this.columnLabel.TabIndex = 10; + this.columnLabel.Text = "Type of Columns:"; + // + // beamLabel + // + this.beamLabel.Location = new System.Drawing.Point(240, 72); + this.beamLabel.Name = "beamLabel"; + this.beamLabel.Size = new System.Drawing.Size(120, 23); + this.beamLabel.TabIndex = 11; + this.beamLabel.Text = "Type of Beams:"; + // + // braceLabel + // + this.braceLabel.Location = new System.Drawing.Point(240, 128); + this.braceLabel.Name = "braceLabel"; + this.braceLabel.Size = new System.Drawing.Size(120, 23); + this.braceLabel.TabIndex = 12; + this.braceLabel.Text = "Type of Braces:"; + // + // floornumberTextBox + // + this.floornumberTextBox.Location = new System.Drawing.Point(16, 208); + this.floornumberTextBox.Name = "floornumberTextBox"; + this.floornumberTextBox.Size = new System.Drawing.Size(112, 20); + this.floornumberTextBox.TabIndex = 4; + this.floornumberTextBox.Text = ""; + this.floornumberTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.floornumberTextBox_Validating); + // + // DistanceLabel + // + this.DistanceLabel.Location = new System.Drawing.Point(16, 16); + this.DistanceLabel.Name = "DistanceLabel"; + this.DistanceLabel.Size = new System.Drawing.Size(152, 23); + this.DistanceLabel.TabIndex = 14; + this.DistanceLabel.Text = "Distance between Columns:"; + // + // YLabel + // + this.YLabel.Location = new System.Drawing.Point(16, 128); + this.YLabel.Name = "YLabel"; + this.YLabel.Size = new System.Drawing.Size(200, 23); + this.YLabel.TabIndex = 15; + this.YLabel.Text = "Number of Columns in the Y Direction:"; + // + // XLabel + // + this.XLabel.Location = new System.Drawing.Point(16, 72); + this.XLabel.Name = "XLabel"; + this.XLabel.Size = new System.Drawing.Size(200, 23); + this.XLabel.TabIndex = 16; + this.XLabel.Text = "Number of Columns in the X Direction:"; + // + // floornumberLabel + // + this.floornumberLabel.Location = new System.Drawing.Point(16, 184); + this.floornumberLabel.Name = "floornumberLabel"; + this.floornumberLabel.Size = new System.Drawing.Size(144, 23); + this.floornumberLabel.TabIndex = 17; + this.floornumberLabel.Text = "Number of Floors:"; + // + // cancelButton + // + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(392, 208); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.TabIndex = 9; + this.cancelButton.Text = "&Cancel"; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // unitLabel + // + this.unitLabel.Location = new System.Drawing.Point(136, 42); + this.unitLabel.Name = "unitLabel"; + this.unitLabel.Size = new System.Drawing.Size(32, 23); + this.unitLabel.TabIndex = 18; + this.unitLabel.Text = "feet"; + // + // CreateBeamsColumnsBracesForm + // + this.AcceptButton = this.OKButton; + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.CancelButton = this.cancelButton; + this.ClientSize = new System.Drawing.Size(546, 246); + this.Controls.Add(this.unitLabel); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.floornumberLabel); + this.Controls.Add(this.XLabel); + this.Controls.Add(this.YLabel); + this.Controls.Add(this.DistanceLabel); + this.Controls.Add(this.floornumberTextBox); + this.Controls.Add(this.DistanceTextBox); + this.Controls.Add(this.YTextBox); + this.Controls.Add(this.XTextBox); + this.Controls.Add(this.braceLabel); + this.Controls.Add(this.beamLabel); + this.Controls.Add(this.columnLabel); + this.Controls.Add(this.braceComboBox); + this.Controls.Add(this.beamComboBox); + this.Controls.Add(this.columnComboBox); + this.Controls.Add(this.OKButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "CreateBeamsColumnsBracesForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Create Beams Columns and Braces"; + this.Load += new System.EventHandler(this.CreateBeamsColumnsBracesForm_Load); + this.ResumeLayout(false); + + } + #endregion + } +} diff --git a/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBracesForm.cs b/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBracesForm.cs index a5d9aaea..daad9d22 100644 --- a/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBracesForm.cs +++ b/SDK/Samples/CreateBeamsColumnsBraces/CS/CreateBeamsColumnsBracesForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,42 +22,17 @@ using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; using System.Windows.Forms; -using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.CreateBeamsColumnsBraces.CS { /// /// UI /// - public class CreateBeamsColumnsBracesForm : System.Windows.Forms.Form + public partial class CreateBeamsColumnsBracesForm : System.Windows.Forms.Form { - /// - /// Required designer variable. - /// - private System.ComponentModel.Container components = null; - private System.Windows.Forms.Button OKButton; - private System.Windows.Forms.TextBox XTextBox; - private System.Windows.Forms.TextBox DistanceTextBox; - private System.Windows.Forms.TextBox YTextBox; - private System.Windows.Forms.ComboBox columnComboBox; - private System.Windows.Forms.ComboBox beamComboBox; - private System.Windows.Forms.ComboBox braceComboBox; - private System.Windows.Forms.Button cancelButton; - private System.Windows.Forms.TextBox floornumberTextBox; - private System.Windows.Forms.Label columnLabel; - private System.Windows.Forms.Label beamLabel; - private System.Windows.Forms.Label braceLabel; - private System.Windows.Forms.Label DistanceLabel; - private System.Windows.Forms.Label YLabel; - private System.Windows.Forms.Label XLabel; - private System.Windows.Forms.Label floornumberLabel; - private System.Windows.Forms.Label unitLabel; - // To store the datas Command m_dataBuffer = null; @@ -75,224 +50,6 @@ namespace Revit.SDK.Samples.CreateBeamsColumnsBraces.CS m_dataBuffer = dataBuffer; } - /// - /// Clean up any resources being used. - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (components != null) - { - components.Dispose(); - } - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.OKButton = new System.Windows.Forms.Button(); - this.XTextBox = new System.Windows.Forms.TextBox(); - this.YTextBox = new System.Windows.Forms.TextBox(); - this.DistanceTextBox = new System.Windows.Forms.TextBox(); - this.columnComboBox = new System.Windows.Forms.ComboBox(); - this.beamComboBox = new System.Windows.Forms.ComboBox(); - this.braceComboBox = new System.Windows.Forms.ComboBox(); - this.columnLabel = new System.Windows.Forms.Label(); - this.beamLabel = new System.Windows.Forms.Label(); - this.braceLabel = new System.Windows.Forms.Label(); - this.floornumberTextBox = new System.Windows.Forms.TextBox(); - this.DistanceLabel = new System.Windows.Forms.Label(); - this.YLabel = new System.Windows.Forms.Label(); - this.XLabel = new System.Windows.Forms.Label(); - this.floornumberLabel = new System.Windows.Forms.Label(); - this.cancelButton = new System.Windows.Forms.Button(); - this.unitLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // OKButton - // - this.OKButton.Location = new System.Drawing.Point(296, 208); - this.OKButton.Name = "OKButton"; - this.OKButton.TabIndex = 8; - this.OKButton.Text = "&OK"; - this.OKButton.Click += new System.EventHandler(this.OKButton_Click); - // - // XTextBox - // - this.XTextBox.Location = new System.Drawing.Point(16, 96); - this.XTextBox.Name = "XTextBox"; - this.XTextBox.Size = new System.Drawing.Size(136, 20); - this.XTextBox.TabIndex = 2; - this.XTextBox.Text = ""; - this.XTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.XTextBox_Validating); - // - // YTextBox - // - this.YTextBox.Location = new System.Drawing.Point(16, 152); - this.YTextBox.Name = "YTextBox"; - this.YTextBox.Size = new System.Drawing.Size(136, 20); - this.YTextBox.TabIndex = 3; - this.YTextBox.Text = ""; - this.YTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.YTextBox_Validating); - // - // DistanceTextBox - // - this.DistanceTextBox.Location = new System.Drawing.Point(16, 40); - this.DistanceTextBox.Name = "DistanceTextBox"; - this.DistanceTextBox.Size = new System.Drawing.Size(112, 20); - this.DistanceTextBox.TabIndex = 1; - this.DistanceTextBox.Text = ""; - this.DistanceTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.DistanceTextBox_Validating); - // - // columnComboBox - // - this.columnComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.columnComboBox.Location = new System.Drawing.Point(240, 40); - this.columnComboBox.Name = "columnComboBox"; - this.columnComboBox.Size = new System.Drawing.Size(288, 21); - this.columnComboBox.TabIndex = 5; - // - // beamComboBox - // - this.beamComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.beamComboBox.Location = new System.Drawing.Point(240, 96); - this.beamComboBox.Name = "beamComboBox"; - this.beamComboBox.Size = new System.Drawing.Size(288, 21); - this.beamComboBox.TabIndex = 6; - // - // braceComboBox - // - this.braceComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.braceComboBox.Location = new System.Drawing.Point(240, 152); - this.braceComboBox.Name = "braceComboBox"; - this.braceComboBox.Size = new System.Drawing.Size(288, 21); - this.braceComboBox.TabIndex = 7; - // - // columnLabel - // - this.columnLabel.Location = new System.Drawing.Point(240, 16); - this.columnLabel.Name = "columnLabel"; - this.columnLabel.Size = new System.Drawing.Size(120, 23); - this.columnLabel.TabIndex = 10; - this.columnLabel.Text = "Type of Columns:"; - // - // beamLabel - // - this.beamLabel.Location = new System.Drawing.Point(240, 72); - this.beamLabel.Name = "beamLabel"; - this.beamLabel.Size = new System.Drawing.Size(120, 23); - this.beamLabel.TabIndex = 11; - this.beamLabel.Text = "Type of Beams:"; - // - // braceLabel - // - this.braceLabel.Location = new System.Drawing.Point(240, 128); - this.braceLabel.Name = "braceLabel"; - this.braceLabel.Size = new System.Drawing.Size(120, 23); - this.braceLabel.TabIndex = 12; - this.braceLabel.Text = "Type of Braces:"; - // - // floornumberTextBox - // - this.floornumberTextBox.Location = new System.Drawing.Point(16, 208); - this.floornumberTextBox.Name = "floornumberTextBox"; - this.floornumberTextBox.Size = new System.Drawing.Size(112, 20); - this.floornumberTextBox.TabIndex = 4; - this.floornumberTextBox.Text = ""; - this.floornumberTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.floornumberTextBox_Validating); - // - // DistanceLabel - // - this.DistanceLabel.Location = new System.Drawing.Point(16, 16); - this.DistanceLabel.Name = "DistanceLabel"; - this.DistanceLabel.Size = new System.Drawing.Size(152, 23); - this.DistanceLabel.TabIndex = 14; - this.DistanceLabel.Text = "Distance between Columns:"; - // - // YLabel - // - this.YLabel.Location = new System.Drawing.Point(16, 128); - this.YLabel.Name = "YLabel"; - this.YLabel.Size = new System.Drawing.Size(200, 23); - this.YLabel.TabIndex = 15; - this.YLabel.Text = "Number of Columns in the Y Direction:"; - // - // XLabel - // - this.XLabel.Location = new System.Drawing.Point(16, 72); - this.XLabel.Name = "XLabel"; - this.XLabel.Size = new System.Drawing.Size(200, 23); - this.XLabel.TabIndex = 16; - this.XLabel.Text = "Number of Columns in the X Direction:"; - // - // floornumberLabel - // - this.floornumberLabel.Location = new System.Drawing.Point(16, 184); - this.floornumberLabel.Name = "floornumberLabel"; - this.floornumberLabel.Size = new System.Drawing.Size(144, 23); - this.floornumberLabel.TabIndex = 17; - this.floornumberLabel.Text = "Number of Floors:"; - // - // cancelButton - // - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(392, 208); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.TabIndex = 9; - this.cancelButton.Text = "&Cancel"; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // unitLabel - // - this.unitLabel.Location = new System.Drawing.Point(136, 42); - this.unitLabel.Name = "unitLabel"; - this.unitLabel.Size = new System.Drawing.Size(32, 23); - this.unitLabel.TabIndex = 18; - this.unitLabel.Text = "feet"; - // - // CreateBeamsColumnsBracesForm - // - this.AcceptButton = this.OKButton; - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.CancelButton = this.cancelButton; - this.ClientSize = new System.Drawing.Size(546, 246); - this.Controls.Add(this.unitLabel); - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.floornumberLabel); - this.Controls.Add(this.XLabel); - this.Controls.Add(this.YLabel); - this.Controls.Add(this.DistanceLabel); - this.Controls.Add(this.floornumberTextBox); - this.Controls.Add(this.DistanceTextBox); - this.Controls.Add(this.YTextBox); - this.Controls.Add(this.XTextBox); - this.Controls.Add(this.braceLabel); - this.Controls.Add(this.beamLabel); - this.Controls.Add(this.columnLabel); - this.Controls.Add(this.braceComboBox); - this.Controls.Add(this.beamComboBox); - this.Controls.Add(this.columnComboBox); - this.Controls.Add(this.OKButton); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "CreateBeamsColumnsBracesForm"; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Create Beams Columns and Braces"; - this.Load += new System.EventHandler(this.CreateBeamsColumnsBracesForm_Load); - this.ResumeLayout(false); - - } - #endregion - /// /// Refresh the text box for the default data /// diff --git a/SDK/Samples/CreateBeamsColumnsBraces/VB.NET/AssemblyInfo.vb b/SDK/Samples/CreateBeamsColumnsBraces/VB.NET/AssemblyInfo.vb index a492d906..eaf8f0bb 100644 --- a/SDK/Samples/CreateBeamsColumnsBraces/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/CreateBeamsColumnsBraces/VB.NET/AssemblyInfo.vb @@ -51,4 +51,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/CreateBeamsColumnsBraces/VB.NET/CreateBeamsColumnsBraces.vbproj b/SDK/Samples/CreateBeamsColumnsBraces/VB.NET/CreateBeamsColumnsBraces.vbproj index 8d122086..08e7e8d8 100644 --- a/SDK/Samples/CreateBeamsColumnsBraces/VB.NET/CreateBeamsColumnsBraces.vbproj +++ b/SDK/Samples/CreateBeamsColumnsBraces/VB.NET/CreateBeamsColumnsBraces.vbproj @@ -1,150 +1,23 @@ - - + Local - 9.0.30729 - 2.0 - {66A80C53-6DD3-4826-A7C3-426B22F9DF62} - Debug - AnyCPU - - - - - CreateBeamsColumnsBraces - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.CreateBeamsColumnsBraces.VB.NET Revit.SDK.Samples.CreateBeamsColumnsBraces.VB.NET.%28None%29 - - Windows - - - v4.8 - - - - bin\ - CreateBeamsColumnsBraces.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false + true + true - - bin\ - CreateBeamsColumnsBraces.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - CreateBeamsColumnsBraces.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - CreateBeamsColumnsBraces.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - Form - - - CreateBeamsColumnsBracesForm.vb - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateComplexAreaRein/CS/AreaReinData.cs b/SDK/Samples/CreateComplexAreaRein/CS/AreaReinData.cs index 591f1993..1185b0fd 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/AreaReinData.cs +++ b/SDK/Samples/CreateComplexAreaRein/CS/AreaReinData.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,20 +21,11 @@ // namespace Revit.SDK.Samples.CreateComplexAreaRein.CS { - using System; using System.Collections.Generic; - using System.Text; - using System.Windows.Forms; - using System.ComponentModel; - using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; - using GeoElement = Autodesk.Revit.DB.GeometryElement; - using Element = Autodesk.Revit.DB.Element; - - /// /// data and data manager of the AreaReinforcement /// diff --git a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.cs b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.cs index e0f4c178..109fa0ae 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.cs +++ b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -26,11 +26,8 @@ namespace Revit.SDK.Samples.CreateComplexAreaRein.CS { using System; using System.Collections.Generic; - using System.Collections; - using System.Text; using System.Windows.Forms; - using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; diff --git a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.csproj b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.csproj index db830f99..a9ab848a 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.csproj +++ b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.csproj @@ -1,104 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {4F88FC9C-304E-4102-A280-6BB92BE21DB6} - Library - Properties Revit.SDK.Samples.CreateComplexAreaRein.CS - CreateComplexAreaRein - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - CreateComplexAreaReinForm.cs - - - - - - - - - CreateComplexAreaReinForm.cs - Designer - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaReinForm.Designer.cs b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaReinForm.Designer.cs index 40907e85..68d5a23a 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaReinForm.Designer.cs +++ b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaReinForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaReinForm.cs b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaReinForm.cs index 5d832323..71b6ee12 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaReinForm.cs +++ b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaReinForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,11 +22,6 @@ namespace Revit.SDK.Samples.CreateComplexAreaRein.CS { using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Data; - using System.Drawing; - using System.Text; using System.Windows.Forms; diff --git a/SDK/Samples/CreateComplexAreaRein/CS/GeomHelper.cs b/SDK/Samples/CreateComplexAreaRein/CS/GeomHelper.cs index 60b8cb31..7d7d8e3d 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/GeomHelper.cs +++ b/SDK/Samples/CreateComplexAreaRein/CS/GeomHelper.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,17 +21,12 @@ // namespace Revit.SDK.Samples.CreateComplexAreaRein.CS { - using System; using System.Collections.Generic; - using System.Text; - using System.Windows.Forms; - using System.Linq; + using System.Linq; - using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; - using GeoElement = Autodesk.Revit.DB.GeometryElement; using Element = Autodesk.Revit.DB.Element; diff --git a/SDK/Samples/CreateComplexAreaRein/CS/GeomUtil.cs b/SDK/Samples/CreateComplexAreaRein/CS/GeomUtil.cs index 4a5078ed..b3b09c81 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/GeomUtil.cs +++ b/SDK/Samples/CreateComplexAreaRein/CS/GeomUtil.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -23,12 +23,8 @@ namespace Revit.SDK.Samples.CreateComplexAreaRein.CS { using System; using System.Collections.Generic; - using System.Text; - using System.Windows.Forms; - using Autodesk.Revit; using Autodesk.Revit.DB; - using Autodesk.Revit.DB.Structure; using GeoElement = Autodesk.Revit.DB.GeometryElement; using GeoSolid = Autodesk.Revit.DB.Solid; diff --git a/SDK/Samples/CreateComplexAreaRein/CS/ParameterUtil.cs b/SDK/Samples/CreateComplexAreaRein/CS/ParameterUtil.cs index 183f0a1d..662973a5 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/ParameterUtil.cs +++ b/SDK/Samples/CreateComplexAreaRein/CS/ParameterUtil.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,16 +21,8 @@ // namespace Revit.SDK.Samples.CreateComplexAreaRein.CS { - using System; - using System.Collections.Generic; - using System.Text; - using System.Windows.Forms; - using System.ComponentModel; - - using Autodesk.Revit; using Autodesk.Revit.DB; - using GeoElement = Autodesk.Revit.DB.GeometryElement; using Element = Autodesk.Revit.DB.Element; diff --git a/SDK/Samples/CreateComplexAreaRein/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CreateComplexAreaRein/CS/Properties/AssemblyInfo.cs index 4875a752..9924e91b 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CreateComplexAreaRein/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -20,7 +20,6 @@ // (Rights in Technical Data and Computer Software), as applicable. // using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -31,7 +30,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CreateComplexAreaRein")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -54,3 +53,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/CreateDimensions/CS/CreateDimensions.csproj b/SDK/Samples/CreateDimensions/CS/CreateDimensions.csproj index 8a17a4e4..9ed93181 100644 --- a/SDK/Samples/CreateDimensions/CS/CreateDimensions.csproj +++ b/SDK/Samples/CreateDimensions/CS/CreateDimensions.csproj @@ -1,88 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {85BC7DF2-6CF5-4A15-AB87-8E0BD6D02DEC} - Library - Properties CreateDimension - CreateDimensions - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateDuctworkStiffener/CS/CreateDuctworkStiffener.csproj b/SDK/Samples/CreateDuctworkStiffener/CS/CreateDuctworkStiffener.csproj index f947cfdc..c7470695 100644 --- a/SDK/Samples/CreateDuctworkStiffener/CS/CreateDuctworkStiffener.csproj +++ b/SDK/Samples/CreateDuctworkStiffener/CS/CreateDuctworkStiffener.csproj @@ -1,96 +1,16 @@ - - - - - None - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {117770A2-856F-419E-8ABE-8BBC7A05C26C} - Library - Properties - CreateDuctworkStiffener - CreateDuctworkStiffener - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\CreateDuctworkStiffener.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\CreateDuctworkStiffener.XML - + + - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 true bin\Debug\CreateDuctworkStiffener.XML - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x64 true bin\Release\CreateDuctworkStiffener.XML - - OnOutputUpdated - - - - - - - - - - 4.7 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/CreateFillPattern/CS/Command.cs b/SDK/Samples/CreateFillPattern/CS/Command.cs index ea600b9d..a1d42d9a 100644 --- a/SDK/Samples/CreateFillPattern/CS/Command.cs +++ b/SDK/Samples/CreateFillPattern/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,12 +21,7 @@ // using System; -using System.Windows.Forms; -using System.Collections; -using System.Linq; -using System.Collections.Generic; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; diff --git a/SDK/Samples/CreateFillPattern/CS/CreateFillPattern.csproj b/SDK/Samples/CreateFillPattern/CS/CreateFillPattern.csproj index c4461b80..db1ac91d 100644 --- a/SDK/Samples/CreateFillPattern/CS/CreateFillPattern.csproj +++ b/SDK/Samples/CreateFillPattern/CS/CreateFillPattern.csproj @@ -1,99 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {1807B365-AA75-46EA-A27D-5748A849E699} - Library - Properties Revit.SDK.Samples.CreateFillPattern.CS - CreateFillPattern - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\CreateFillPattern.xml - AnyCPU - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\CreateFillPattern.xml true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - Form - - - FillPatternForm.cs - - - - - - FillPatternForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateFillPattern/CS/FillPatternForm.cs b/SDK/Samples/CreateFillPattern/CS/FillPatternForm.cs index adc24c4e..30bb3b1a 100644 --- a/SDK/Samples/CreateFillPattern/CS/FillPatternForm.cs +++ b/SDK/Samples/CreateFillPattern/CS/FillPatternForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,18 +22,14 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data; -using System.Drawing; using System.Linq; -using System.Text; using System.Windows.Forms; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using RvtView = Autodesk.Revit.DB.View; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.CreateFillPattern.CS { diff --git a/SDK/Samples/CreateFillPattern/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CreateFillPattern/CS/Properties/AssemblyInfo.cs index 212d2669..607a2a70 100644 --- a/SDK/Samples/CreateFillPattern/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CreateFillPattern/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,7 +21,6 @@ // using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -32,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2010")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -53,3 +52,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/CreateShared/VB.NET/Command1.vb b/SDK/Samples/CreateShared/VB.NET/Command1.vb index d5121d92..463514d5 100644 --- a/SDK/Samples/CreateShared/VB.NET/Command1.vb +++ b/SDK/Samples/CreateShared/VB.NET/Command1.vb @@ -67,7 +67,7 @@ Public Class Command1 Try sharedParametersFile = commandData.Application.Application.OpenSharedParameterFile() Catch ex As Exception - MsgBox("File ""RevitParameters.txt"" not found." & vbNewLine & vbTab & "Exiting function.") + MsgBox("File ""RevitParameters.txt"" not found." & Environment.NewLine & vbTab & "Exiting function.") Exit Function End Try diff --git a/SDK/Samples/CreateShared/VB.NET/CreateShared.vbproj b/SDK/Samples/CreateShared/VB.NET/CreateShared.vbproj index daaebe24..3f7f98ab 100644 --- a/SDK/Samples/CreateShared/VB.NET/CreateShared.vbproj +++ b/SDK/Samples/CreateShared/VB.NET/CreateShared.vbproj @@ -1,138 +1,21 @@ - - + Local - 9.0.30729 - 2.0 - {A85AD7FF-CFB6-4A5F-9BD0-5A3F5463B9DE} - Debug - AnyCPU - - - - - CreateShared - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.CreateShared.VB.NET - - - - Windows - - - v4.8 - - - - bin\Debug\ - CreateShared.xml + false 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false - - bin\Release\ - CreateShared.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - CreateShared.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - CreateShared.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/AreaReinData.cs b/SDK/Samples/CreateSimpleAreaRein/CS/AreaReinData.cs index 4c6753b7..9c9d855f 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/AreaReinData.cs +++ b/SDK/Samples/CreateSimpleAreaRein/CS/AreaReinData.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,19 +22,11 @@ namespace Revit.SDK.Samples.CreateSimpleAreaRein.CS { using System; - using System.Collections.Generic; - using System.Text; - using System.Windows.Forms; using System.ComponentModel; - using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; - using GeoElement = Autodesk.Revit.DB.GeometryElement; - using Element = Autodesk.Revit.DB.Element; - - /// /// data of the AreaReinforcement /// diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.cs b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.cs index 762f8608..7e0cec6e 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.cs +++ b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -26,16 +26,14 @@ namespace Revit.SDK.Samples.CreateSimpleAreaRein.CS { using System; using System.Collections.Generic; - using System.Text; using System.Windows.Forms; - using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; using DocCreator = Autodesk.Revit.Creation.Document; - - + using TaskDialog = Autodesk.Revit.UI.TaskDialog; + /// /// main class to create simple AreaReinforcement on selected wall or floor /// diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.csproj b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.csproj index 5529e2b7..b9f8dffc 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.csproj +++ b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.csproj @@ -1,104 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {F60E3E5A-71C8-449A-8B2F-1046B6F0D93D} - Library - Properties Revit.SDK.Samples.CreateSimpleAreaRein.CS - CreateSimpleAreaRein - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - CreateSimpleAreaReinForm.cs - - - - - - - - - Designer - CreateSimpleAreaReinForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaReinForm.Designer.cs b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaReinForm.Designer.cs index 577935bf..697f5ae5 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaReinForm.Designer.cs +++ b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaReinForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaReinForm.cs b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaReinForm.cs index f8798fa9..613d5254 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaReinForm.cs +++ b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaReinForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,11 +22,6 @@ namespace Revit.SDK.Samples.CreateSimpleAreaRein.CS { using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Data; - using System.Drawing; - using System.Text; using System.Windows.Forms; diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/GeomHelper.cs b/SDK/Samples/CreateSimpleAreaRein/CS/GeomHelper.cs index 1ec26f56..dbab47ea 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/GeomHelper.cs +++ b/SDK/Samples/CreateSimpleAreaRein/CS/GeomHelper.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,17 +21,12 @@ // namespace Revit.SDK.Samples.CreateSimpleAreaRein.CS { - using System; using System.Collections.Generic; - using System.Text; - using System.Windows.Forms; - using System.Linq; + using System.Linq; - using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; - using GeoElement = Autodesk.Revit.DB.GeometryElement; using Element = Autodesk.Revit.DB.Element; diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/GeomUtil.cs b/SDK/Samples/CreateSimpleAreaRein/CS/GeomUtil.cs index 37112c89..28b985ba 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/GeomUtil.cs +++ b/SDK/Samples/CreateSimpleAreaRein/CS/GeomUtil.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -23,12 +23,8 @@ namespace Revit.SDK.Samples.CreateSimpleAreaRein.CS { using System; using System.Collections.Generic; - using System.Text; - using System.Windows.Forms; - using Autodesk.Revit; using Autodesk.Revit.DB; - using Autodesk.Revit.DB.Structure; using GeoElement = Autodesk.Revit.DB.GeometryElement; using GeoSolid = Autodesk.Revit.DB.Solid; diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/ParameterUtil.cs b/SDK/Samples/CreateSimpleAreaRein/CS/ParameterUtil.cs index e1e7ed46..0ddf01e8 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/ParameterUtil.cs +++ b/SDK/Samples/CreateSimpleAreaRein/CS/ParameterUtil.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,16 +21,8 @@ // namespace Revit.SDK.Samples.CreateSimpleAreaRein.CS { - using System; - using System.Collections.Generic; - using System.Text; - using System.Windows.Forms; - using System.ComponentModel; - - using Autodesk.Revit; using Autodesk.Revit.DB; - using GeoElement = Autodesk.Revit.DB.GeometryElement; using Element = Autodesk.Revit.DB.Element; /// diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CreateSimpleAreaRein/CS/Properties/AssemblyInfo.cs index 7d2c6fb4..4c1f1aca 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CreateSimpleAreaRein/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -20,7 +20,6 @@ // (Rights in Technical Data and Computer Software), as applicable. // using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -31,7 +30,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CreateSimpleAreaReinforcement")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -54,3 +53,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/CreateViewSection/CS/Command.cs b/SDK/Samples/CreateViewSection/CS/Command.cs index e00874b4..8a0a765a 100644 --- a/SDK/Samples/CreateViewSection/CS/Command.cs +++ b/SDK/Samples/CreateViewSection/CS/Command.cs @@ -33,6 +33,8 @@ using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Structure; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.CreateViewSection.CS { /// @@ -42,7 +44,7 @@ namespace Revit.SDK.Samples.CreateViewSection.CS [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] [Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)] - public class Command : IExternalCommand + public class Command : IExternalCommand, IDisposable { // Private Members Autodesk.Revit.UI.UIDocument m_project; // Store the current document in revit @@ -443,6 +445,20 @@ namespace Revit.SDK.Samples.CreateViewSection.CS Double midOffset = baseOffset + height / 2; return midOffset; } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + (m_box as IDisposable)?.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } /// diff --git a/SDK/Samples/CreateViewSection/CS/CreateViewSection.csproj b/SDK/Samples/CreateViewSection/CS/CreateViewSection.csproj index eed5f4ee..dc34d568 100644 --- a/SDK/Samples/CreateViewSection/CS/CreateViewSection.csproj +++ b/SDK/Samples/CreateViewSection/CS/CreateViewSection.csproj @@ -1,108 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {98A455C0-4131-468B-97A4-D0BE364BF9F8} - Library - Properties - CreateViewSection - CreateViewSection - - - - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 1.0.0.%2a - false - true - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - - - False - .NET Framework 2.0 - true - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.cs b/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.cs index 46671c1b..6c366093 100644 --- a/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.cs +++ b/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.cs @@ -33,6 +33,8 @@ using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Structure; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.CreateWallinBeamProfile.CS { /// diff --git a/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.csproj b/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.csproj index 4d6373db..dc34d568 100644 --- a/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.csproj +++ b/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.csproj @@ -1,92 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {664689F3-810E-4508-8442-A05CF3A6EE9E} - Library - Properties - CreateWallinBeamProfile - CreateWallinBeamProfile - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - CreateWallinBeamProfileForm.cs - - - - - - CreateWallinBeamProfileForm.cs - Designer - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateWallinBeamProfile/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CreateWallinBeamProfile/CS/Properties/AssemblyInfo.cs index 1c59116f..a73db433 100644 --- a/SDK/Samples/CreateWallinBeamProfile/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CreateWallinBeamProfile/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.csproj b/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.csproj index 9aedbc53..dc34d568 100644 --- a/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.csproj +++ b/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.csproj @@ -1,100 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {49DFC0AA-AA5A-435E-AC5F-B05CF505A1A0} - Library - Properties - CreateWallsUnderBeams - CreateWallsUnderBeams - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - CreateWallsUnderBeamsForm.cs - - - - - - Designer - CreateWallsUnderBeamsForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CreateWallsUnderBeams/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CreateWallsUnderBeams/CS/Properties/AssemblyInfo.cs index 3d162cc9..ddc25cd3 100644 --- a/SDK/Samples/CreateWallsUnderBeams/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CreateWallsUnderBeams/CS/Properties/AssemblyInfo.cs @@ -54,3 +54,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/CurtainSystem/CS/CurtainSystem.csproj b/SDK/Samples/CurtainSystem/CS/CurtainSystem.csproj index 09709068..6b5f2a01 100644 --- a/SDK/Samples/CurtainSystem/CS/CurtainSystem.csproj +++ b/SDK/Samples/CurtainSystem/CS/CurtainSystem.csproj @@ -1,122 +1,17 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {80502467-3D8F-436D-9E47-AF3702D679FD} - Library - Properties Revit.SDK.Samples.CurtainSystem.CS - CurtainSystem - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - Form - - - CreateCurtainSystemDialog.cs - - - - - True - True - Resources.resx - - - Form - - - CurtainForm.cs - - - - - - Designer - CreateCurtainSystemDialog.cs - - - Designer - ResXFileCodeGenerator - Resources.Designer.cs - - - Designer - CurtainForm.cs - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CurtainSystem/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CurtainSystem/CS/Properties/AssemblyInfo.cs index ef58204a..7b4da516 100644 --- a/SDK/Samples/CurtainSystem/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CurtainSystem/CS/Properties/AssemblyInfo.cs @@ -33,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/CurtainSystem/CS/UI/CurtainForm.cs b/SDK/Samples/CurtainSystem/CS/UI/CurtainForm.cs index 640806eb..a2fb9ef1 100644 --- a/SDK/Samples/CurtainSystem/CS/UI/CurtainForm.cs +++ b/SDK/Samples/CurtainSystem/CS/UI/CurtainForm.cs @@ -22,15 +22,12 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; -using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Revit.SDK.Samples.CurtainSystem.CS.Data; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.CurtainSystem.CS.UI { /// diff --git a/SDK/Samples/CurtainWallGrid/CS/CurtainWallGrid.csproj b/SDK/Samples/CurtainWallGrid/CS/CurtainWallGrid.csproj index bd683fdc..dc34d568 100644 --- a/SDK/Samples/CurtainWallGrid/CS/CurtainWallGrid.csproj +++ b/SDK/Samples/CurtainWallGrid/CS/CurtainWallGrid.csproj @@ -1,113 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C6D32355-2C27-4A24-9BE4-11F3E78C301E} - Library - Properties - CurtainWallGrid - CurtainWallGrid - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - - Form - - - GridForm.cs - - - - - - - - True - True - Resources.resx - - - - - - - - - Designer - GridForm.cs - - - Designer - ResXFileCodeGenerator - Resources.Designer.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CurtainWallGrid/CS/GridCoordinates.cs b/SDK/Samples/CurtainWallGrid/CS/GridCoordinates.cs index 8dff9a3d..b5c05196 100644 --- a/SDK/Samples/CurtainWallGrid/CS/GridCoordinates.cs +++ b/SDK/Samples/CurtainWallGrid/CS/GridCoordinates.cs @@ -140,7 +140,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS if (null == drawing) { - TaskDialog.Show("Revit", "Error! There's no grid information in the curtain wall."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Error! There's no grid information in the curtain wall."); } m_drawing = drawing; drawing.Coordinates = this; diff --git a/SDK/Samples/CurtainWallGrid/CS/GridDrawing.cs b/SDK/Samples/CurtainWallGrid/CS/GridDrawing.cs index 5e3764ff..a4f0085a 100644 --- a/SDK/Samples/CurtainWallGrid/CS/GridDrawing.cs +++ b/SDK/Samples/CurtainWallGrid/CS/GridDrawing.cs @@ -364,7 +364,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS if (null == geometry) { - TaskDialog.Show("Revit", "Error! There's no grid information in the curtain wall."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Error! There's no grid information in the curtain wall."); } else { diff --git a/SDK/Samples/CurtainWallGrid/CS/GridGeometry.cs b/SDK/Samples/CurtainWallGrid/CS/GridGeometry.cs index 2575f085..580f2133 100644 --- a/SDK/Samples/CurtainWallGrid/CS/GridGeometry.cs +++ b/SDK/Samples/CurtainWallGrid/CS/GridGeometry.cs @@ -363,7 +363,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); return; } } @@ -429,7 +429,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); return; } } @@ -456,7 +456,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); return; } } @@ -498,7 +498,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); return; } } @@ -524,7 +524,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); return; } } @@ -586,7 +586,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); // "add U line" failed, so return directly return; } @@ -641,7 +641,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); // "add V line" failed, so return directly return; } @@ -756,7 +756,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); return false; } act.Commit(); @@ -805,7 +805,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); return false; } act.Commit(); @@ -867,7 +867,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); return; } act.Commit(); @@ -899,7 +899,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.Exception e) { - TaskDialog.Show("Exception", e.Message); + Autodesk.Revit.UI.TaskDialog.Show("Exception", e.Message); return; } act.Commit(); diff --git a/SDK/Samples/CurtainWallGrid/CS/GridProperties.cs b/SDK/Samples/CurtainWallGrid/CS/GridProperties.cs index 3c09acbf..77cd3986 100644 --- a/SDK/Samples/CurtainWallGrid/CS/GridProperties.cs +++ b/SDK/Samples/CurtainWallGrid/CS/GridProperties.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2024 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -90,7 +90,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores the data of vertical justification /// - [CategoryAttribute("Vertical Grid Pattern"), DefaultValueAttribute(CurtainGridAlign.Beginning), ReadOnlyAttribute(true)] + [Category("Vertical Grid Pattern"), DefaultValue(CurtainGridAlign.Beginning), ReadOnly(true)] public CurtainGridAlign VerticalJustification { get @@ -106,7 +106,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores the data of vertical angle /// - [CategoryAttribute("Vertical Grid Pattern"), DefaultValueAttribute(0.0), ReadOnlyAttribute(true)] + [Category("Vertical Grid Pattern"), DefaultValue(0.0), ReadOnly(true)] public double VerticalAngle { get @@ -122,7 +122,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores the data of vertical offset /// - [CategoryAttribute("Vertical Grid Pattern"), DefaultValueAttribute(0.0), ReadOnlyAttribute(true)] + [Category("Vertical Grid Pattern"), DefaultValue(0.0), ReadOnly(true)] public double VerticalOffset { get @@ -138,7 +138,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores how many U lines there are in the grid /// - [CategoryAttribute("Vertical Grid Pattern"), DefaultValueAttribute(0), ReadOnlyAttribute(true)] + [Category("Vertical Grid Pattern"), DefaultValue(0), ReadOnly(true)] public int VerticalLinesNumber { get @@ -154,7 +154,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores the data of horizontal justification /// - [CategoryAttribute("Horizontal Grid Pattern"), DefaultValueAttribute(CurtainGridAlign.Beginning), ReadOnlyAttribute(true)] + [Category("Horizontal Grid Pattern"), DefaultValue(CurtainGridAlign.Beginning), ReadOnly(true)] public CurtainGridAlign HorizontalJustification { get @@ -170,7 +170,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores the data of horizontal angle /// - [CategoryAttribute("Horizontal Grid Pattern"), DefaultValueAttribute(0.0), ReadOnlyAttribute(true)] + [Category("Horizontal Grid Pattern"), DefaultValue(0.0), ReadOnly(true)] public double HorizontalAngle { get @@ -186,7 +186,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores the data of horizontal offset /// - [CategoryAttribute("Horizontal Grid Pattern"), DefaultValueAttribute(0.0), ReadOnlyAttribute(true)] + [Category("Horizontal Grid Pattern"), DefaultValue(0.0), ReadOnly(true)] public double HorizontalOffset { get @@ -202,7 +202,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores how many V lines there are in the grid /// - [CategoryAttribute("Horizontal Grid Pattern"), DefaultValueAttribute(0), ReadOnlyAttribute(true)] + [Category("Horizontal Grid Pattern"), DefaultValue(0), ReadOnly(true)] public int HorizontalLinesNumber { get @@ -218,7 +218,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores how many panels there are in the grid /// - [CategoryAttribute("Other Data"), DefaultValueAttribute(0), ReadOnlyAttribute(true)] + [Category("Other Data"), DefaultValue(0), ReadOnly(true)] public int PanelNumber { get @@ -234,7 +234,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores how many curtain cells there are in the grid /// - [CategoryAttribute("Other Data"), DefaultValueAttribute(0), ReadOnlyAttribute(true)] + [Category("Other Data"), DefaultValue(0), ReadOnly(true)] public int CellNumber { get @@ -250,7 +250,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores how many unlocked panels there are in the grid /// - [CategoryAttribute("Other Data"), DefaultValueAttribute(0), ReadOnlyAttribute(true)] + [Category("Other Data"), DefaultValue(0), ReadOnly(true)] public int UnlockedPanelsNumber { get @@ -266,7 +266,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores how many mullions there are in the grid /// - [CategoryAttribute("Other Data"), DefaultValueAttribute(0), ReadOnlyAttribute(true)] + [Category("Other Data"), DefaultValue(0), ReadOnly(true)] public int MullionsNumber { get @@ -282,7 +282,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// stores how many unlocked mullions there are in the grid /// - [CategoryAttribute("Other Data"), DefaultValueAttribute(0), ReadOnlyAttribute(true)] + [Category("Other Data"), DefaultValue(0), ReadOnly(true)] public int UnlockedmullionsNumber { get diff --git a/SDK/Samples/CurtainWallGrid/CS/MyDocument.cs b/SDK/Samples/CurtainWallGrid/CS/MyDocument.cs index 7dec9c3f..806c0a7d 100644 --- a/SDK/Samples/CurtainWallGrid/CS/MyDocument.cs +++ b/SDK/Samples/CurtainWallGrid/CS/MyDocument.cs @@ -38,7 +38,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// maintains all the data used in the sample /// - public class MyDocument + public class MyDocument : IDisposable { #region Fields // object which contains reference of Revit Application @@ -102,7 +102,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS LineOperation m_activeOperation; // the length unit type for the active Revit document - ForgeTypeId m_LengthUnit; + public ForgeTypeId LengthUnit { get; set; } // store the message of the sample private KeyValuePair m_message; @@ -199,14 +199,6 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } } - public ForgeTypeId LengthUnit - { - get - { - return m_LengthUnit; - } - } - /// /// store the message of the sample /// @@ -276,11 +268,11 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS try { Autodesk.Revit.DB.FormatOptions formatOption = projectUnit.GetFormatOptions(specTypeId); - m_LengthUnit = formatOption.GetUnitTypeId(); + LengthUnit = formatOption.GetUnitTypeId(); } catch (System.Exception /*e*/) { - m_LengthUnit = UnitTypeId.Feet; + LengthUnit = UnitTypeId.Feet; } } @@ -356,6 +348,23 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } return returns; } - #endregion - } + #endregion + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_wallGeometry != null) + m_wallGeometry.Dispose(); + if (LengthUnit != null) + LengthUnit.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + } } diff --git a/SDK/Samples/CurtainWallGrid/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CurtainWallGrid/CS/Properties/AssemblyInfo.cs index 6f9cbdc6..e5b6ff67 100644 --- a/SDK/Samples/CurtainWallGrid/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CurtainWallGrid/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CurtainWallGrid")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -33,3 +33,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/CurtainWallGrid/CS/WallDrawing.cs b/SDK/Samples/CurtainWallGrid/CS/WallDrawing.cs index ae55b858..65638211 100644 --- a/SDK/Samples/CurtainWallGrid/CS/WallDrawing.cs +++ b/SDK/Samples/CurtainWallGrid/CS/WallDrawing.cs @@ -32,7 +32,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// maintain the baseline of the curtain wall /// - public class WallDrawing + public class WallDrawing : IDisposable { #region Fields // zoom the baseline to a suitable length @@ -291,5 +291,20 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS new PointF(m_wallLine2D.AssistantPoint.X + 2, m_wallLine2D.AssistantPoint.Y + 2)); } #endregion + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_coordinateFont != null) + m_coordinateFont.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/SDK/Samples/CurtainWallGrid/CS/WallGeometry.cs b/SDK/Samples/CurtainWallGrid/CS/WallGeometry.cs index 57b7354c..f87a85a7 100644 --- a/SDK/Samples/CurtainWallGrid/CS/WallGeometry.cs +++ b/SDK/Samples/CurtainWallGrid/CS/WallGeometry.cs @@ -34,7 +34,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS /// /// the class manages the creation operation for the curtain wall /// - public class WallGeometry + public class WallGeometry : IDisposable { #region Fields // the document of this sample @@ -219,7 +219,7 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS } catch (System.ArgumentException) { - TaskDialog.Show("Revit", "The start point and the end point of the line are too close, please re-draw it."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "The start point and the end point of the line are too close, please re-draw it."); } Transaction act = new Transaction(m_myDocument.Document); act.Start(Guid.NewGuid().GetHashCode().ToString()); @@ -233,5 +233,20 @@ namespace Revit.SDK.Samples.CurtainWallGrid.CS return wall; } #endregion + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_drawing != null) + m_drawing.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } }// end of class } diff --git a/SDK/Samples/CurvedBeam/CS/CurvedBeam.cs b/SDK/Samples/CurvedBeam/CS/CurvedBeam.cs index c8ac02f1..bc3a6be6 100644 --- a/SDK/Samples/CurvedBeam/CS/CurvedBeam.cs +++ b/SDK/Samples/CurvedBeam/CS/CurvedBeam.cs @@ -32,6 +32,8 @@ using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Structure; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.CurvedBeam.CS { /// diff --git a/SDK/Samples/CurvedBeam/CS/CurvedBeam.csproj b/SDK/Samples/CurvedBeam/CS/CurvedBeam.csproj index 2e79baa5..7cedc79c 100644 --- a/SDK/Samples/CurvedBeam/CS/CurvedBeam.csproj +++ b/SDK/Samples/CurvedBeam/CS/CurvedBeam.csproj @@ -1,102 +1,17 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {5F59AEEF-6E71-4A21-A9D4-B92BC93AEFD0} - Library - Properties Revit.SDK.Samples.CurvedBeam.CS - CurvedBeam - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - CurvedBeamForm.cs - - - - True - True - Resources.resx - - - - - Designer - CurvedBeamForm.cs - - - Designer - ResXFileCodeGenerator - Resources.Designer.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CurvedBeam/CS/CurvedBeamForm.cs b/SDK/Samples/CurvedBeam/CS/CurvedBeamForm.cs index 56f547b2..bcdb6fa4 100644 --- a/SDK/Samples/CurvedBeam/CS/CurvedBeamForm.cs +++ b/SDK/Samples/CurvedBeam/CS/CurvedBeamForm.cs @@ -31,6 +31,8 @@ using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.CurvedBeam.CS { /// diff --git a/SDK/Samples/CurvedBeam/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CurvedBeam/CS/Properties/AssemblyInfo.cs index 8bde6941..a81dfe41 100644 --- a/SDK/Samples/CurvedBeam/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CurvedBeam/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/CustomExporter/Custom2DExporter/CS/Command.cs b/SDK/Samples/CustomExporter/Custom2DExporter/CS/Command.cs index 995fb18e..b0cb6c6d 100644 --- a/SDK/Samples/CustomExporter/Custom2DExporter/CS/Command.cs +++ b/SDK/Samples/CustomExporter/Custom2DExporter/CS/Command.cs @@ -29,6 +29,7 @@ using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Custom2DExporter.CS { diff --git a/SDK/Samples/CustomExporter/Custom2DExporter/CS/Custom2DExporter.csproj b/SDK/Samples/CustomExporter/Custom2DExporter/CS/Custom2DExporter.csproj index 6718c357..141c925e 100644 --- a/SDK/Samples/CustomExporter/Custom2DExporter/CS/Custom2DExporter.csproj +++ b/SDK/Samples/CustomExporter/Custom2DExporter/CS/Custom2DExporter.csproj @@ -1,99 +1,19 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {4DB30086-DE87-4205-8A8E-E2A61BBA681B} - Library - Properties Revit.SDK.Samples.Custom2DExporter.CS - Custom2DExporter - - - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\Custom2DExporter.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset true bin\Debug\Custom2DExporter.xml - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset bin\Release\Custom2DExporter.xml - - - - - - - - - 4.7 - - - - - - - Form - - - Export2DView.cs - - - - - - - Export2DView.cs - - - - - - OnOutputUpdated - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/CustomExporter/Custom2DExporter/CS/Properties/AssemblyInfo.cs b/SDK/Samples/CustomExporter/Custom2DExporter/CS/Properties/AssemblyInfo.cs index e3f7a9ee..d792f2c9 100644 --- a/SDK/Samples/CustomExporter/Custom2DExporter/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/CustomExporter/Custom2DExporter/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/DatumsModification/CS/DatumsModification.addin b/SDK/Samples/DatumsModification/CS/DatumsModification.addin index 825d7517..25941cc1 100644 --- a/SDK/Samples/DatumsModification/CS/DatumsModification.addin +++ b/SDK/Samples/DatumsModification/CS/DatumsModification.addin @@ -3,18 +3,38 @@ DatumsModification.dll d831df7c-d9d0-41d5-ab83-d1df2a412351 - Revit.SDK.Samples.DatumsModification.CS.Command + Revit.SDK.Samples.DatumsModification.CS.DatumStyleModification Datumplane modification Datumplane modification AlwaysVisible Unknown ADSK + + DatumsModification.dll + d831df7c-d9d0-41d5-ab83-d1df2a412352 + Revit.SDK.Samples.DatumsModification.CS.DatumAlignment + Align Datums + Align Datums + AlwaysVisible + Unknown + ADSK + + + DatumsModification.dll + d831df7c-d9d0-41d5-ab83-d1df2a412353 + Revit.SDK.Samples.DatumsModification.CS.DatumPropagation + Propagate Extents + Propagate Extents + AlwaysVisible + Unknown + ADSK + DatumsModification DatumsModification.dll 7f6460ca-9829-4701-90e6-1c66273891d4 - Revit.SDK.Samples.DatumsModification.CS.Application + Revit.SDK.Samples.DatumsModification.CS.DatumsModificationApp ADSK Autodesk, www.autodesk.com diff --git a/SDK/Samples/DatumsModification/CS/DatumsModification.csproj b/SDK/Samples/DatumsModification/CS/DatumsModification.csproj index a81b075c..d99aee97 100644 --- a/SDK/Samples/DatumsModification/CS/DatumsModification.csproj +++ b/SDK/Samples/DatumsModification/CS/DatumsModification.csproj @@ -1,136 +1,35 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {156515B4-F5FE-4CDD-8B18-E96F4090CA20} - Library - Properties Revit.SDK.Samples.DatumsModification.CS - DatumsModification - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\DatumsModification.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\DatumsModification.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - - - 3.5 - - - - - - Form - - - AlignmentSetting.cs - - - - - Form - - - DatumStyleSetting.cs - - - - - Form - - - PropogateSetting.cs - - - - - AlignmentSetting.cs - - - DatumStyleSetting.cs - - - - PropogateSetting.cs - - - - - - - + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/DatumsModification/CS/DatumsModificationApp.cs b/SDK/Samples/DatumsModification/CS/DatumsModificationApp.cs index 92ff69be..b731c6f6 100644 --- a/SDK/Samples/DatumsModification/CS/DatumsModificationApp.cs +++ b/SDK/Samples/DatumsModification/CS/DatumsModificationApp.cs @@ -44,7 +44,7 @@ namespace Revit.SDK.Samples.DatumsModification.CS { static string AddInPath = typeof(DatumsModificationApp).Assembly.Location; // Button icons directory - static string ButtonIconsFolder = Path.GetDirectoryName(AddInPath); + static string ButtonIconsFolder = Path.Combine(Path.GetDirectoryName(AddInPath), "Resources"); #region IExternalApplication Members /// /// Implements the OnShutdown event @@ -65,11 +65,11 @@ namespace Revit.SDK.Samples.DatumsModification.CS { RibbonPanel ribbonPanel = application.CreateRibbonPanel("DatumModification"); PushButtonData styleSettingButton = new PushButtonData("DatumStyle", "Datum Style", AddInPath, "Revit.SDK.Samples.DatumsModification.CS.DatumStyleModification"); - styleSettingButton.LargeImage = new BitmapImage(new Uri(Path.Combine(ButtonIconsFolder, "Style.png"), UriKind.Absolute)); ; + styleSettingButton.LargeImage = new BitmapImage(new Uri(Path.Combine(ButtonIconsFolder, "Style.png"), UriKind.Absolute)); PushButtonData alignSettingButton = new PushButtonData("AlignDatum", "Align Datums", AddInPath, "Revit.SDK.Samples.DatumsModification.CS.DatumAlignment"); - alignSettingButton.LargeImage = new BitmapImage(new Uri(Path.Combine(ButtonIconsFolder, "Align.png"), UriKind.Absolute)); ; + alignSettingButton.LargeImage = new BitmapImage(new Uri(Path.Combine(ButtonIconsFolder, "Align.png"), UriKind.Absolute)); PushButtonData propagateButton = new PushButtonData("PropagateDatum", "Propagate Extents", AddInPath, "Revit.SDK.Samples.DatumsModification.CS.DatumPropagation"); - propagateButton.LargeImage = new BitmapImage(new Uri(Path.Combine(ButtonIconsFolder, "Propagate.png"), UriKind.Absolute)); ; + propagateButton.LargeImage = new BitmapImage(new Uri(Path.Combine(ButtonIconsFolder, "Propagate.png"), UriKind.Absolute)); ribbonPanel.AddItem(styleSettingButton); ribbonPanel.AddItem(alignSettingButton); diff --git a/SDK/Samples/DatumsModification/CS/DatumsModificationCmd.cs b/SDK/Samples/DatumsModification/CS/DatumsModificationCmd.cs index 9dcfbbf6..ef3ef8c8 100644 --- a/SDK/Samples/DatumsModification/CS/DatumsModificationCmd.cs +++ b/SDK/Samples/DatumsModification/CS/DatumsModificationCmd.cs @@ -336,7 +336,7 @@ namespace Revit.SDK.Samples.DatumsModification.CS { if (settingForm.ShowDialog() == DialogResult.OK) { - ISet pViewList = new List() as ISet; + ISet pViewList = new HashSet(); foreach (var item in settingForm.propagationViewList.CheckedItems) { ElementId selectedView = viewDic[item.ToString()]; diff --git a/SDK/Samples/DatumsModification/CS/Properties/AssemblyInfo.cs b/SDK/Samples/DatumsModification/CS/Properties/AssemblyInfo.cs index 1c06fd26..e903b5af 100644 --- a/SDK/Samples/DatumsModification/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/DatumsModification/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/DatumsModification/CS/Properties/Resources.resx b/SDK/Samples/DatumsModification/CS/Properties/Resources.resx index 13147135..90f64f92 100644 --- a/SDK/Samples/DatumsModification/CS/Properties/Resources.resx +++ b/SDK/Samples/DatumsModification/CS/Properties/Resources.resx @@ -118,7 +118,16 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\Align.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\grid.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Propagate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Style.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/SDK/Samples/DatumsModification/Align.png b/SDK/Samples/DatumsModification/CS/Resources/Align.png similarity index 100% rename from SDK/Samples/DatumsModification/Align.png rename to SDK/Samples/DatumsModification/CS/Resources/Align.png diff --git a/SDK/Samples/DatumsModification/Propagate.png b/SDK/Samples/DatumsModification/CS/Resources/Propagate.png similarity index 100% rename from SDK/Samples/DatumsModification/Propagate.png rename to SDK/Samples/DatumsModification/CS/Resources/Propagate.png diff --git a/SDK/Samples/DatumsModification/Style.png b/SDK/Samples/DatumsModification/CS/Resources/Style.png similarity index 100% rename from SDK/Samples/DatumsModification/Style.png rename to SDK/Samples/DatumsModification/CS/Resources/Style.png diff --git a/SDK/Samples/DeckProperties/CS/DeckProperties.csproj b/SDK/Samples/DeckProperties/CS/DeckProperties.csproj index 549bf78c..75a295a5 100644 --- a/SDK/Samples/DeckProperties/CS/DeckProperties.csproj +++ b/SDK/Samples/DeckProperties/CS/DeckProperties.csproj @@ -1,92 +1,11 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {8403D41F-93C8-4B4E-BFB5-9DEECFC43A1B} - Library - Properties - DeckProperties - DeckProperties - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - GenericForm.cs - - - - - - Designer - GenericForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DeckProperties/CS/Properties/AssemblyInfo.cs b/SDK/Samples/DeckProperties/CS/Properties/AssemblyInfo.cs index 69b439d6..2d4baa97 100644 --- a/SDK/Samples/DeckProperties/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/DeckProperties/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/DeleteDimensions/CS/DeleteDimensions.csproj b/SDK/Samples/DeleteDimensions/CS/DeleteDimensions.csproj index 735b0181..0f515a45 100644 --- a/SDK/Samples/DeleteDimensions/CS/DeleteDimensions.csproj +++ b/SDK/Samples/DeleteDimensions/CS/DeleteDimensions.csproj @@ -1,86 +1,20 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {1A48873D-956A-4B29-8E1B-A5423080558F} - Library - Properties DeleteDimension - DeleteDimensions - - - - - - - - - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DeleteObject/CS/AssemblyInfo.cs b/SDK/Samples/DeleteObject/CS/AssemblyInfo.cs index 8b874990..1c718b3d 100644 --- a/SDK/Samples/DeleteObject/CS/AssemblyInfo.cs +++ b/SDK/Samples/DeleteObject/CS/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -32,7 +32,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/DeleteObject/CS/DeleteObject.cs b/SDK/Samples/DeleteObject/CS/DeleteObject.cs index 04e28baf..c0691a17 100644 --- a/SDK/Samples/DeleteObject/CS/DeleteObject.cs +++ b/SDK/Samples/DeleteObject/CS/DeleteObject.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -27,6 +27,8 @@ using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.DeleteObject.CS { /// diff --git a/SDK/Samples/DeleteObject/CS/DeleteObject.csproj b/SDK/Samples/DeleteObject/CS/DeleteObject.csproj index d6ea4c77..7d9621d8 100644 --- a/SDK/Samples/DeleteObject/CS/DeleteObject.csproj +++ b/SDK/Samples/DeleteObject/CS/DeleteObject.csproj @@ -1,136 +1,30 @@ - - + Local - 9.0.30729 - 2.0 - {AD90C71B-5520-44AE-BB88-DCEEA7E755C4} - Debug - AnyCPU - - - - - DeleteObject - - JScript Grid IE50 false - Library - DeleteObject - OnBuildSuccess - - - - - - - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - true - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - true - 4 - none - prompt + + false + - true bin\x64\Debug\ - DEBUG;TRACE 285212672 4096 - full - x64 - prompt MinimumRecommendedRules.ruleset true bin\x64\Release\ - TRACE 285212672 - true true 4096 - x64 - prompt MinimumRecommendedRules.ruleset + - OnOutputUpdated - - - - System - - - System.Data - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - Code - - - Code - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DeleteObject/VB.NET/DeleteObject.vbproj b/SDK/Samples/DeleteObject/VB.NET/DeleteObject.vbproj index 3feb1379..02103f28 100644 --- a/SDK/Samples/DeleteObject/VB.NET/DeleteObject.vbproj +++ b/SDK/Samples/DeleteObject/VB.NET/DeleteObject.vbproj @@ -1,141 +1,21 @@ - - + Local - 9.0.30729 - 2.0 - {6F61D0D0-4D81-452C-84A3-781BFB09FAAA} - Debug - AnyCPU - - - - - DeleteObject - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.DeleteObject.VB.NET Revit.SDK.Samples.DeleteObject.VB.NET.%28None%29 - - Windows - - - v4.8 - - - - bin\ - DeleteObject.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false - - bin\ - DeleteObject.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - DeleteObject.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - DeleteObject.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DesignOptionReader/VB.NET/AssemblyInfo.vb b/SDK/Samples/DesignOptionReader/VB.NET/AssemblyInfo.vb index 224fa7b0..3312d039 100644 --- a/SDK/Samples/DesignOptionReader/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/DesignOptionReader/VB.NET/AssemblyInfo.vb @@ -50,4 +50,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/DesignOptionReader/VB.NET/DesignOptionReader.vbproj b/SDK/Samples/DesignOptionReader/VB.NET/DesignOptionReader.vbproj index a6231112..79fc0422 100644 --- a/SDK/Samples/DesignOptionReader/VB.NET/DesignOptionReader.vbproj +++ b/SDK/Samples/DesignOptionReader/VB.NET/DesignOptionReader.vbproj @@ -1,172 +1,22 @@ - - + Local - 9.0.30729 - 2.0 - {B78D6536-0FAA-47B8-A1C0-6F1E59159399} - Debug - AnyCPU - - - - - DesignOptionReader - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.DesignOptionReader.VB.NET - - - - Windows - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 1.0.0.%2a - false - true - v4.8 - - - - bin\ - - 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false + true + true - - bin\ - - - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - Form - - - DesignOptionsDialog.vb - Designer - - - - - False - .NET Framework 2.0 - true - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DimensionLeaderEnd/CS/Command.cs b/SDK/Samples/DimensionLeaderEnd/CS/Command.cs index 8078b2a6..a3f085ce 100644 --- a/SDK/Samples/DimensionLeaderEnd/CS/Command.cs +++ b/SDK/Samples/DimensionLeaderEnd/CS/Command.cs @@ -30,6 +30,7 @@ using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.UI.Selection; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.DimensionLeaderEnd.CS { diff --git a/SDK/Samples/DimensionLeaderEnd/CS/DimensionLeaderEnd.csproj b/SDK/Samples/DimensionLeaderEnd/CS/DimensionLeaderEnd.csproj index 1527856e..6e9426df 100644 --- a/SDK/Samples/DimensionLeaderEnd/CS/DimensionLeaderEnd.csproj +++ b/SDK/Samples/DimensionLeaderEnd/CS/DimensionLeaderEnd.csproj @@ -1,95 +1,20 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {4E3C160F-1FC8-4BD7-8E01-B62C58E79CD4} - Library - Properties Revit.SDK.Samples.DimensionLeaderEnd.CS - DimensionLeaderEnd - - - v4.8 - + true + - true - bin\x64\Debug\ - DEBUG;TRACE - false - true - full - x64 - prompt + true MinimumRecommendedRules.ruleset - + - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - bin\Debug\ - DEBUG;TRACE - false - true - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - bin\Release\ - TRACE - true - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/DirectionCalculation/CS/DirectionCalculation.csproj b/SDK/Samples/DirectionCalculation/CS/DirectionCalculation.csproj index f4add69a..954ebfe1 100644 --- a/SDK/Samples/DirectionCalculation/CS/DirectionCalculation.csproj +++ b/SDK/Samples/DirectionCalculation/CS/DirectionCalculation.csproj @@ -1,124 +1,19 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {07300EC6-1A6A-4C7E-8022-A839210014E3} - Library - Properties Revit.Test.CSTemplate - DirectionCalculation - - - 2.0 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + + true + 1.0.0.0 - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - + None diff --git a/SDK/Samples/DisableCommand/CS/Application.cs b/SDK/Samples/DisableCommand/CS/Application.cs index 35c69230..e5557224 100644 --- a/SDK/Samples/DisableCommand/CS/Application.cs +++ b/SDK/Samples/DisableCommand/CS/Application.cs @@ -29,6 +29,8 @@ using System.IO; using Autodesk.Revit.UI; using Autodesk.Revit.UI.Events; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.DisableCommand.CS { /// diff --git a/SDK/Samples/DisableCommand/CS/DisableCommand.csproj b/SDK/Samples/DisableCommand/CS/DisableCommand.csproj index 7e94d01e..683ff379 100644 --- a/SDK/Samples/DisableCommand/CS/DisableCommand.csproj +++ b/SDK/Samples/DisableCommand/CS/DisableCommand.csproj @@ -1,87 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {EE2E0C60-3020-4ED3-9DCF-B55FBFBA36F7} - Library - Properties Revit.SDK.Samples.DisableCommand.CS - DisableCommand - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\DisableCommand.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\DisableCommand.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DisallowEndWrapping/CS/Command.cs b/SDK/Samples/DisallowEndWrapping/CS/Command.cs new file mode 100644 index 00000000..56c18e9c --- /dev/null +++ b/SDK/Samples/DisallowEndWrapping/CS/Command.cs @@ -0,0 +1,88 @@ +// +// (C) Copyright 2003-2023 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Windows.Forms; +using System.Collections; +using System.Collections.Generic; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; + + +namespace Revit.SDK.Samples.DisallowEndWrapping.CS +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class Command : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// A message that can be set by the external application + /// which will be displayed if a failure or cancellation is returned by + /// the external command. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// Return the status of the external command. + /// A result of Succeeded means that the API external method functioned as expected. + /// Cancelled can be used to signify that the user cancelled the external operation + /// at some point. Failure should be returned if the application is unable to proceed with + /// the operation. + public virtual Result Execute(ExternalCommandData commandData + , ref string message, ElementSet elements) + { + try + { + Document document = commandData.Application.ActiveUIDocument.Document; + + // just support selecting only one wall + Element selectedElem = null; + foreach (ElementId elementId in commandData.Application.ActiveUIDocument.Selection.GetElementIds()) + { + selectedElem = document.GetElement(elementId); + break; + } + + using (WallInformationForm infoForm = new WallInformationForm(selectedElem as Wall)) + { + infoForm.ShowDialog(); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} + diff --git a/SDK/Samples/DisallowEndWrapping/CS/DisallowEndWrapping.addin b/SDK/Samples/DisallowEndWrapping/CS/DisallowEndWrapping.addin new file mode 100644 index 00000000..932ceaf2 --- /dev/null +++ b/SDK/Samples/DisallowEndWrapping/CS/DisallowEndWrapping.addin @@ -0,0 +1,14 @@ + + + + DisallowEndWrapping.dll + 03596142-7814-429c-a7bd-dc195d70fd8e + Revit.SDK.Samples.DisallowEndWrapping.CS.Command + DisallowEndWrapping + Users can use public APIs to allow or disallow end wrapping at some locations of a wall. + AlwaysVisible + Unknown + ADSK + + + diff --git a/SDK/Samples/DisallowEndWrapping/CS/DisallowEndWrapping.csproj b/SDK/Samples/DisallowEndWrapping/CS/DisallowEndWrapping.csproj new file mode 100644 index 00000000..d3b608aa --- /dev/null +++ b/SDK/Samples/DisallowEndWrapping/CS/DisallowEndWrapping.csproj @@ -0,0 +1,18 @@ + + + + true + bin\Debug\DisallowEndWrapping.XML + MinimumRecommendedRules.ruleset + + + true + bin\Release\DisallowEndWrapping.XML + MinimumRecommendedRules.ruleset + + + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" +if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + + \ No newline at end of file diff --git a/SDK/Samples/DisallowEndWrapping/CS/Properties/AssemblyInfo.cs b/SDK/Samples/DisallowEndWrapping/CS/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..d05b324e --- /dev/null +++ b/SDK/Samples/DisallowEndWrapping/CS/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DisallowEndWrapping")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DisallowEndWrapping")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0ea62c54-fdb2-4c6c-bd17-6c942d82929d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/DisallowEndWrapping/CS/ReadMe_DisallowEndWrapping.rtf b/SDK/Samples/DisallowEndWrapping/CS/ReadMe_DisallowEndWrapping.rtf new file mode 100644 index 00000000..e2354b84 --- /dev/null +++ b/SDK/Samples/DisallowEndWrapping/CS/ReadMe_DisallowEndWrapping.rtf @@ -0,0 +1,272 @@ +{\rtf1\adeflang1025\ansi\ansicpg936\uc2\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe2052\themelang1033\themelangfe2052\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f36\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'b5\'c8\'cf\'df{\*\falt DengXian};} +{\f159\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'b5\'c8\'cf\'df;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'b5\'c8\'cf\'df Light;}{\fhimajor\f31502\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'b5\'c8\'cf\'df Light;} +{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbminor\f31505\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'b5\'c8\'cf\'df{\*\falt DengXian};}{\fhiminor\f31506\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'b5\'c8\'cf\'df{\*\falt DengXian};} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1243\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f1244\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f1246\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f1247\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f1248\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f1249\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f1250\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f1251\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f1253\fbidi \fswiss\fcharset238\fprq2 Arial CE;} +{\f1254\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}{\f1256\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f1257\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f1258\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);} +{\f1259\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}{\f1260\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f1261\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f1583\fbidi \froman\fcharset238\fprq2 Cambria Math CE;} +{\f1584\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f1586\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f1587\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f1590\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;} +{\f1591\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f1605\fbidi \fnil\fcharset0\fprq2 DengXian Western{\*\falt DengXian};}{\f1603\fbidi \fnil\fcharset238\fprq2 DengXian CE{\*\falt DengXian};} +{\f1604\fbidi \fnil\fcharset204\fprq2 DengXian Cyr{\*\falt DengXian};}{\f1606\fbidi \fnil\fcharset161\fprq2 DengXian Greek{\*\falt DengXian};}{\f2835\fbidi \fnil\fcharset0\fprq2 @DengXian Western;}{\f2833\fbidi \fnil\fcharset238\fprq2 @DengXian CE;} +{\f2834\fbidi \fnil\fcharset204\fprq2 @DengXian Cyr;}{\f2836\fbidi \fnil\fcharset161\fprq2 @DengXian Greek;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbmajor\f31520\fbidi \fnil\fcharset0\fprq2 DengXian Light Western;}{\fdbmajor\f31518\fbidi \fnil\fcharset238\fprq2 DengXian Light CE;}{\fdbmajor\f31519\fbidi \fnil\fcharset204\fprq2 DengXian Light Cyr;} +{\fdbmajor\f31521\fbidi \fnil\fcharset161\fprq2 DengXian Light Greek;}{\fhimajor\f31530\fbidi \fnil\fcharset0\fprq2 DengXian Light Western;}{\fhimajor\f31528\fbidi \fnil\fcharset238\fprq2 DengXian Light CE;} +{\fhimajor\f31529\fbidi \fnil\fcharset204\fprq2 DengXian Light Cyr;}{\fhimajor\f31531\fbidi \fnil\fcharset161\fprq2 DengXian Light Greek;}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbminor\f31560\fbidi \fnil\fcharset0\fprq2 DengXian Western{\*\falt DengXian};}{\fdbminor\f31558\fbidi \fnil\fcharset238\fprq2 DengXian CE{\*\falt DengXian};}{\fdbminor\f31559\fbidi \fnil\fcharset204\fprq2 DengXian Cyr{\*\falt DengXian};} +{\fdbminor\f31561\fbidi \fnil\fcharset161\fprq2 DengXian Greek{\*\falt DengXian};}{\fhiminor\f31570\fbidi \fnil\fcharset0\fprq2 DengXian Western{\*\falt DengXian};}{\fhiminor\f31568\fbidi \fnil\fcharset238\fprq2 DengXian CE{\*\falt DengXian};} +{\fhiminor\f31569\fbidi \fnil\fcharset204\fprq2 DengXian Cyr{\*\falt DengXian};}{\fhiminor\f31571\fbidi \fnil\fcharset161\fprq2 DengXian Greek{\*\falt DengXian};}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0; +\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;} +{\*\defchp \fs21\kerning2\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{ +\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs21\lang1033\langfe2052\kerning2\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 +\snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs21\lang1033\langfe2052\kerning2\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 +\snext11 \ssemihidden \sunhideused Normal Table;}}{\*\rsidtbl \rsid2188074\rsid2314433\rsid5326836\rsid8355105\rsid8456954\rsid14025453}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0 +\mnaryLim1}{\info{\operator Wangyang Shi}{\creatim\yr2023\mo11\dy1\hr9\min31}{\revtim\yr2023\mo11\dy1\hr9\min45}{\version5}{\edmins14}{\nofpages1}{\nofwords230}{\nofchars1317}{\nofcharsws1544}{\vern79}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/of +fice/word/2003/wordml}}\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect +\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984 +\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot14025453 \nouicompat \fet0{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang +{\pntxta \dbch .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \dbch )}}{\*\pnseclvl5 +\pndec\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl8 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 +\af31507\afs22\alang1025 \ltrch\fcs0 \fs21\lang1033\langfe2052\kerning2\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 +Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 DisallowEndWrapping\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 +Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 2025.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 2025.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Beginning\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Elements\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 DisallowEndWrapping\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 \line \hich\af1\dbch\af31505\loch\f1 This sample demonstrates how to use public APIs to allow or disallow end wrapping at some locations of a wall.}{\rtlch\fcs1 \ai\af0\afs20 \ltrch\fcs0 +\i\f0\fs20\kerning0\insrsid2188074 +\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\kerning0\insrsid2188074 +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 +\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid14025453 \hich\af1\dbch\af31505\loch\f1 UI.\hich\af1\dbch\af31505\loch\f1 IExternalCommand}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Wall +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Reference +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Document +\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\kerning0\langnp1036\insrsid2188074 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Command.cs +\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 +This file contains the class Command which inherits from IExternalCommand interface and implements the Execute method. +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid8355105 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 WallInformation\hich\af1\dbch\af31505\loch\f1 Form.cs +\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid8456954 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 +This file contains a Form class, its constructor need an input parameter, in this case\hich\af1\dbch\af31505\loch\f1 it}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 \loch\af1\dbch\af31505\hich\f1 \rquote +\hich\af1\dbch\af31505\loch\f1 s}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 the selected wall, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 \hich\af1\dbch\af31505\loch\f1 +in}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 updateDisplay(Wall wall), }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 \hich\af1\dbch\af31505\loch\f1 it }{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 list}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 \hich\af1\dbch\af31505\loch\f1 s}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 all valid location's data on the view.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 \hich\af1\dbch\af31505\loch\f1 \hich\af1\dbch\af31505\loch\f1 A}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 nd }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 \hich\af1\dbch\af31505\loch\f1 for }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 2 buttons}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid14025453 \hich\af1\dbch\af31505\loch\f1 on the form}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 , clicking them can }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid14025453 \hich\af1\dbch\af31505\loch\f1 start transaction to allow/disallow end wrapping }{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid8456954 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\f0\fs20\kerning0\insrsid2188074 +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 +\ltrch\fcs0 \f0\fs20\kerning0\insrsid2188074 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid8456954 \hich\af1\dbch\af31505\loch\f1 This sample provides following functionalities. +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid8456954 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid8456954\charrsid8456954 \hich\af1\dbch\af31505\loch\f1 Let user \hich\af1\dbch\af31505\loch\f1 get all valid end wrapping locations.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid8456954 +\par -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8456954\charrsid8456954 \hich\af1\dbch\af31505\loch\f1 Let user get the value if one location's end wrapping is allowe}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid8456954\charrsid8456954 \hich\af1\dbch\af31505\loch\f1 d.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid8456954 +\par -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8456954\charrsid8456954 \hich\af1\dbch\af31505\loch\f1 L\hich\af1\dbch\af31505\loch\f1 et user get one location's raw parameter on wall's curv}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid8456954\charrsid8456954 \hich\af1\dbch\af31505\loch\f1 e.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid8456954 +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid8456954 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid8456954\charrsid8456954 \hich\af1\dbch\af31505\loch\f1 L\hich\af1\dbch\af31505\loch\f1 et user get one location's related face}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8456954\charrsid8456954 +\hich\af1\dbch\af31505\loch\f1 s.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid8456954 +\par -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8456954\charrsid8456954 \hich\af1\dbch\af31505\loch\f1 L\hich\af1\dbch\af31505\loch\f1 et user allow or disallow one location's end wrapping}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid8456954\charrsid8456954 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf2\kerning0\insrsid2188074 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\kerning0\insrsid2188074 +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf2\kerning0\insrsid2188074 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\cf2\kerning0\insrsid2188074\charrsid5326836 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid5326836 \hich\af1\dbch\af31505\loch\f1 Open Revit application and }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8456954\charrsid5326836 +\hich\af1\dbch\af31505\loch\f1 select}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8456954\charrsid5326836 \hich\af1\dbch\af31505\loch\f1 a wall, then }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid5326836 +\hich\af1\dbch\af31505\loch\f1 execute the command. +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid5326836 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid5326836 \hich\af1\dbch\af31505\loch\f1 1.\tab }{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\kerning0\insrsid5326836\charrsid5326836 \hich\af1\dbch\af31505\loch\f1 A\hich\af1\dbch\af31505\loch\f1 ll \hich\af1\dbch\af31505\loch\f1 location \hich\af1\dbch\af31505\loch\f1 end w\hich\af1\dbch\af31505\loch\f1 +rapping data is listed on the for\hich\af1\dbch\af31505\loch\f1 m}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid5326836 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid5326836 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid5326836 \hich\af1\dbch\af31505\loch\f1 2.\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid5326836\charrsid5326836 \hich\af1\dbch\af31505\loch\f1 I}{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid5326836\charrsid5326836 \hich\af1\dbch\af31505\loch\f1 nput a\hich\af1\dbch\af31505\loch\f1 valid location number, click allow\hich\af1\dbch\af31505\loch\f1 /\hich\af1\dbch\af31505\loch\f1 +disallow button}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid5326836 . +\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid5326836 \hich\af1\dbch\af31505\loch\f1 E\hich\af1\dbch\af31505\loch\f1 xpected result: }{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid5326836\charrsid5326836 \hich\af1\dbch\af31505\loch\f1 that location\loch\af1\dbch\af31505\hich\f1 \rquote \hich\af1\dbch\af31505\loch\f1 s end wrapping will be \hich\af1\dbch\af31505\loch\f1 +allowed/disallowed}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid2188074\charrsid5326836 . +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\kerning0\insrsid2188074 +\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a +9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad +5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 +b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 +0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 +a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f +c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 +0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 +a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 +6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b +4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b +4757e8d3f729e245eb2b260a0238fd010000ffff0300504b0304140006000800000021003a05cc19a2070000ce200000160000007468656d652f7468656d652f +7468656d65312e786d6cec59dd8b1b47127f3fc8ff30ccbbacaf197d2c96833ebdb1776d63c93ef2d82bb534eded9916ddad5d8b6008ce5308040249c84302e1 +5eee21840b5ce04ceee1fe97f36193cbfd1157dd339ae9965af1eee20373eceeb2687a7e55fdebaaeaaa52f7cdf79fc6d43bc35c109674fcea8d8aefe164ca66 +245974fc479351a9e57b42a26486284b70c75f63e1bf7febbd3fdc440732c231f6403e1107a8e347522e0fca65318561246eb0254ee0dd9cf1184978e48bf28c +a373d01bd372ad526994634412df4b500c6aefcfe7648abd7fbdf8fbaf7ffae69f1f7f067ffeadcd1c430a132552a88129e5633503b6043576765a5508b1167d +cabd33443b3e4c3763e713fc54fa1e4542c28b8e5fd13f7ef9d6cd323ac884a8dc236bc88df44f269709cc4e6b7a4ebe38c9270d8230687473fd1a40e52e6ed8 +1c36868d5c9f06a0e914569a72b175366bfd20c31aa0f4a343f7a039a8572dbca1bfbec3b91baa5f0baf41a9fe60073f1af5c18a165e83527cb8830f7beddec0 +d6af4129beb1836f56ba83a069e9d7a08892e474075d091bf5fe66b53964cee8a113de0e8351b396292f50100d7974a929e62c91fb622d464f181f0140012992 +24f1e47a89e7680ac1fcfac74f5ffff20fef882c2288bb254a9880d14aad32aad4e1bffa0df427ed5074809121ac680111b133a4e87862cac95276fc3ba0d537 +20af5ebc78f9fce797cffff6f2934f5e3eff4b36b75665c91da26461cafdf6e72ffef3ddc7debffffafd6f5f7e954ebd8d1726de5a9a533dacb8b0c4abaf7f7a +fdf34fafbef9fcd71fbe7468ef727462c22724c6c2bb87cfbd872c86053a26c027fc721293081153a29b2c044a909ac5a17f28230b7d6f8d2872e07ad8b6e363 +0e99c605bcbd7a62111e477c258943e3dd28b680c78cd11ee34e2bdc557319669eac92857b72be32710f113a73cddd4789e5e5e16a092996b854f6236cd17c40 +5122d10227587aea1d3bc5d8b1ba0f09b1ec7a4ca69c093697de87c4eb21e234c9849c58d154081d9218fcb27611047f5bb6397eecf51875ad7a80cf6c24ec0d +441de427985a66bc8d5612c52e95131453d3e04748462e92e3359f9ab8a190e0e905a6cc1bceb0102e99fb1cd66b38fd2e82e4e674fb315dc736924b72ead279 +841833910376da8f50bc7461c724894cec07e2144214790f9874c18f99bd43d433f801257bddfd9860cbdd6fce068f20c39a948a00516f56dce1cbdb9859f13b +5ed339c2ae54d3e5b19562bb9c38a3a3b75a58a17d843145e76886b1f7e80307831e5b5a362f48df8920ab1c625760dd4176acaae7040bece9de66374f1e1161 +85ec182fd81e3ec7ebadc4b346498cf83ecdf7c0eba6cd87271c36a3639df7e9f4d404de23d00942bc388d725f800e23b8f76a7d1021ab80a967e18ed735b7fc +77913d06fbf28945e302fb1264f0a56520b19b32bf6b9b09a2d60445c04c10f18e5ce916442cf71722aab86ab195536e6e6fdac20dd01c593d4f4c923735405b +ad4ff8bf6b7da0c178f5ed778e187c3bed8e5bb195ab2ed9e8eccb25875bedcd3edc7653d3677c46defd9e668056c9030c656437615db734d72d8dff7fdfd2ec +dbcfd78dccbe76e3ba91f1a1c1b86e64b2a395b7d3c814bd0bb435eabc233de6d1873ef1de339f39a1742cd7141f097dec23e0ebcc6c04834a4e1f7be2fc0c70 +19c14755e660020bb7e048cb789cc93f12198d23b484c3a1aaaf942c44a67a21bc25137066a4879dba159eaee263364b8f3aab5575ac9956568164315e09f371 +38a69229bad12c8eef72f59aed421fb36e0828d9cb903026b349d41d249a9b4165247da80b467390d02b7b2b2cda0e162da57ee3aa1d16402df70a7cdff6e05b +7ac70f03100121388e83de7ca6fc94ba7ae35dedccb7e9e97dc6b422001aec4d04149e6e2bae7b97a7569786da053c6d9130c2cd26a12da31b3c11c1b7e02c3a +d5e845685cd6d7edc2a5163d650a3d1f845641a3d9fa3d1657f535c86de7069a98998226de79c76fd4430899295a76fc391c19c3c77809b123d4572e441770fd +32953cddf057c92c4b2ee400892835b84e3a69368889c4dca324eef86af9b91b68a27388e656ad41427867c9b521adbc6be4c0e9b693f17c8ea7d274bb31a22c +9d3e42864f7385f3ad16bf3a5849b215b87b1ccdcebd13bae20f118458d8ac2a03ce8880ab836a6acd1981abb03c9115f1b75598b2b46bde45e9184ac7115d46 +28ab2866324fe13a95e774f4536e03e3295b3318d4304956084f16aac09a46b5aa695e35520e7babee9b8594e58ca459d44c2baba8aae9ce62d60c9b32b065cb +ab157983d5c6c490d3cc0a9fa6eeed94dbdee4baad3e21af1260f0dc7e8eaa7b818260502b26b3a829c6bb6958e5ec6cd4ae1d9b05be81da458a8491f51b1bb5 +5b76cb6b84733a18bc52e507b9eda885a1f9a6afd496d657e7e6b5363b7902c963005dee8a4aa15d0997d61c414334d63d499a36608b3c95d9d6804fde8a938e +ff5125ec06fd5ad82f555ae1b014d4834aa91576eba56e18d6abc3b05a19f46acfa0b0c828ae86e9b5fd08ee2fe83abbbcd7e33b17f8f1e68ae6c694c565a62f +e8cb9ab8bec0afd65c17f8137535ef7b0492ce478ddaa85d6ff71aa576bd3b2a05835eabd4ee377aa541a3df1c8c06fdb0d51e3df3bd330d0ebaf57ed018b64a +8d6abf5f0a1a1545bfd52e35835aad1b34bbad61d07d96b531b0f2347d64b600f36a5eb7fe0b0000ffff0300504b0304140006000800000021000dd1909fb600 +00001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3 +ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b06082 +8e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3 +fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c +0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000 +360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000 +0000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d00140006000800000021003a05cc19a2 +070000ce2000001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000d +d1909fb60000001b0100002700000000000000000000000000ac0a00007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000a70b00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong; +\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Table;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 6; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 6; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Contemporary;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Elegant;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Professional; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden1 \lsdlocked0 Placeholder Text; +\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2; +\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List; +\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1; +\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision; +\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1; +\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1; +\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2; +\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2; +\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2; +\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3; +\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3; +\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4; +\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4; +\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4; +\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5; +\lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; +\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; +\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; +\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; +\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; +\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; +\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; +\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; +\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; +\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; +\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore 01050000 +02000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e500000000000000000000000060d6 +651b650cda01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/SDK/Samples/DisallowEndWrapping/CS/WallInformationForm.Designer.cs b/SDK/Samples/DisallowEndWrapping/CS/WallInformationForm.Designer.cs new file mode 100644 index 00000000..8d41f455 --- /dev/null +++ b/SDK/Samples/DisallowEndWrapping/CS/WallInformationForm.Designer.cs @@ -0,0 +1,202 @@ +// +// (C) Copyright 2003-2023 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +namespace Revit.SDK.Samples.DisallowEndWrapping.CS +{ + partial class WallInformationForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.wrappingInfoBox = new System.Windows.Forms.GroupBox(); + this.locationsView = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.label1 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.button0 = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.wrappingInfoBox.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // wrappingInfoBox + // + this.wrappingInfoBox.Controls.Add(this.locationsView); + this.wrappingInfoBox.Location = new System.Drawing.Point(12, 12); + this.wrappingInfoBox.Name = "wrappingInfoBox"; + this.wrappingInfoBox.Size = new System.Drawing.Size(464, 246); + this.wrappingInfoBox.TabIndex = 8; + this.wrappingInfoBox.TabStop = false; + this.wrappingInfoBox.Text = "End wrapping information"; + // + // locationsView + // + this.locationsView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader4, + this.columnHeader5, + this.columnHeader6}); + this.locationsView.FullRowSelect = true; + this.locationsView.GridLines = true; + this.locationsView.HideSelection = false; + this.locationsView.Location = new System.Drawing.Point(6, 19); + this.locationsView.MultiSelect = false; + this.locationsView.Name = "locationsView"; + this.locationsView.Size = new System.Drawing.Size(447, 215); + this.locationsView.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.locationsView.TabIndex = 5; + this.locationsView.UseCompatibleStateImageBehavior = false; + this.locationsView.View = System.Windows.Forms.View.Details; + // + // columnHeader1 + // + this.columnHeader1.Text = "Location"; + this.columnHeader1.Width = 80; + // + // columnHeader4 + // + this.columnHeader4.Text = "end wrapping allowed"; + this.columnHeader4.Width = 120; + // + // columnHeader5 + // + this.columnHeader5.Text = "parameter on curve"; + this.columnHeader5.Width = 120; + // + // columnHeader6 + // + this.columnHeader6.Text = "face tags"; + this.columnHeader6.Width = 120; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 31); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(51, 13); + this.label1.TabIndex = 13; + this.label1.Text = "Location:"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(9, 63); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(100, 20); + this.textBox1.TabIndex = 12; + // + // button1 + // + this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.button1.Location = new System.Drawing.Point(9, 209); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(100, 25); + this.button1.TabIndex = 11; + this.button1.Text = "&Disallow wrapping"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button0 + // + this.button0.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.button0.Location = new System.Drawing.Point(9, 163); + this.button0.Name = "button0"; + this.button0.Size = new System.Drawing.Size(100, 25); + this.button0.TabIndex = 10; + this.button0.Text = "&Allow wrapping"; + this.button0.UseVisualStyleBackColor = true; + this.button0.Click += new System.EventHandler(this.button0_Click); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.textBox1); + this.groupBox1.Controls.Add(this.button0); + this.groupBox1.Controls.Add(this.button1); + this.groupBox1.Location = new System.Drawing.Point(502, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(129, 246); + this.groupBox1.TabIndex = 9; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Change end wrapping"; + // + // WallInformationForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(649, 266); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.wrappingInfoBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "WallInformationForm"; + this.ShowInTaskbar = false; + this.Text = "Wall end wrapping information"; + this.wrappingInfoBox.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox wrappingInfoBox; + private System.Windows.Forms.ListView locationsView; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ColumnHeader columnHeader5; + private System.Windows.Forms.ColumnHeader columnHeader6; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button0; + private System.Windows.Forms.GroupBox groupBox1; + } +} \ No newline at end of file diff --git a/SDK/Samples/DisallowEndWrapping/CS/WallInformationForm.cs b/SDK/Samples/DisallowEndWrapping/CS/WallInformationForm.cs new file mode 100644 index 00000000..9f9cfd86 --- /dev/null +++ b/SDK/Samples/DisallowEndWrapping/CS/WallInformationForm.cs @@ -0,0 +1,213 @@ +// +// (C) Copyright 2003-2023 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Revit.SDK.Samples.DisallowEndWrapping.CS +{ + class UnownedDisposable + where T : IDisposable + { + private readonly T _value; + + public UnownedDisposable(T value) + { + _value = value; + } + + public T Deref() => _value; + } + + /// + /// UI to display the wall locations' end wrapping information + /// + public partial class WallInformationForm : System.Windows.Forms.Form + { + + UnownedDisposable curWall = null; + + /// + /// constructor + /// + public WallInformationForm() + { + InitializeComponent(); + } + + /// + /// constructor + /// + /// + public WallInformationForm(Wall wall) + { + InitializeComponent(); + updateDisplay(wall); + } + + /// + /// display data on the list + /// + public void updateDisplay(Wall wall) + { + locationsView.Items.Clear(); + if (wall == null) + return; + + curWall = new UnownedDisposable(wall); + + List wrappingAllowData = new List(); + if (wall != null) + { + var locations = wall.GetValidWrappingLocationIndices(); + foreach (var location in locations) + { + AllowData data = new AllowData(); + data.location = location; + data.allowed = wall.IsWrappingAtLocationAllowed(location); + data.parameter = wall.GetWrappingLocationAsCurveParameter(location); + data.faces = wall.GetWrappingLocationAsReferences(location); + wrappingAllowData.Add(data); + } + } + + foreach (var allowdata in wrappingAllowData) + { + ListViewItem tmpItem = new ListViewItem(); + tmpItem.SubItems.Add(allowdata.location.ToString()); + tmpItem.SubItems.Add(allowdata.allowed.ToString()); + tmpItem.SubItems.Add(allowdata.parameter.ToString()); + tmpItem.SubItems.Add(getFaceTags(allowdata.faces)); + tmpItem.SubItems.RemoveAt(0); + locationsView.Items.Add(tmpItem); + } + locationsView.Update(); + } + + private string getFaceTags(IList refs) + { + string str = ""; + foreach(var refface in refs) + { + var face = curWall.Deref().GetGeometryObjectFromReference(refface) as Face; + if (face != null) + str += face.Id + " "; + } + return str; + } + + private int getInputLocation() + { + int location = -1; + bool convert = int.TryParse(textBox1.Text, out location); + if (!convert) + { + Autodesk.Revit.UI.TaskDialog.Show("Revit", "please input a valid number"); + return -1; + } + return location; + } + + private void startTransactionDoSomething(Action f, string transName) + { + Document doc = curWall.Deref().Document; + try + { + using (Transaction trans = new Transaction(doc, transName)) + { + trans.Start(); + f(0); + trans.Commit(); + } + } + catch (Exception ex) + { + Autodesk.Revit.UI.TaskDialog.Show("Revit", "exception happens: " + ex.ToString()); + } + } + + private void button0_Click(object sender, EventArgs e) + { + if (curWall.Deref() == null) + return; + + int location = getInputLocation(); + if (location == -1) + return; + + startTransactionDoSomething((int i) => + { + curWall.Deref().AllowWrappingAtLocation(location); + }, "Revit.SDK.Samples.AllowEndWrapping"); + + updateDisplay(curWall.Deref()); + } + + private void button1_Click(object sender, EventArgs e) + { + if (curWall.Deref() == null) + return; + + int location = getInputLocation(); + if (location == -1) + return; + + startTransactionDoSomething((int i) => + { + curWall.Deref().DisallowWrappingAtLocation(location); + }, "Revit.SDK.Samples.DisallowEndWrapping"); + updateDisplay(curWall.Deref()); + } + } + + /// + /// + /// + public class AllowData + { + /// + /// location number + /// + public int location; + /// + /// is this location's end wrapping allowed + /// + public bool allowed; + /// + /// location's raw parameter on wall's curve + /// + public double parameter; + /// + /// related faces at the location + /// + public IList faces; + } +} diff --git a/SDK/Samples/DisplacementElementAnimation/CS/DisplacementElementAnimation.csproj b/SDK/Samples/DisplacementElementAnimation/CS/DisplacementElementAnimation.csproj index 7d1e3a9f..57dbf1ae 100644 --- a/SDK/Samples/DisplacementElementAnimation/CS/DisplacementElementAnimation.csproj +++ b/SDK/Samples/DisplacementElementAnimation/CS/DisplacementElementAnimation.csproj @@ -1,105 +1,19 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {2C4DBF06-7004-4DC9-9DEA-3296E7993735} - Library - Properties Revit.SDK.Samples.DisplacementElementAnimation.CS - DisplacementElementAnimation - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\DisplacementElementAnimation.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\DisplacementElementAnimation.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - - 3.5 - - - - - - - - - - True - True - Resources.resx - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DisplacementElementAnimation/CS/DisplacementStructureModelAnimator.cs b/SDK/Samples/DisplacementElementAnimation/CS/DisplacementStructureModelAnimator.cs index 56ee54cd..f91046ba 100644 --- a/SDK/Samples/DisplacementElementAnimation/CS/DisplacementStructureModelAnimator.cs +++ b/SDK/Samples/DisplacementElementAnimation/CS/DisplacementStructureModelAnimator.cs @@ -34,7 +34,7 @@ namespace Revit.SDK.Samples.DisplacementElementAnimation.CS /// /// A class that executes an animation of structural model elements using DisplacementElements. /// - class DisplacementStructureModelAnimator + class DisplacementStructureModelAnimator : IDisposable { /// /// Starts the animation by creating the needed displacement elements, and setting up the events to allow it proceed. @@ -487,5 +487,20 @@ namespace Revit.SDK.Samples.DisplacementElementAnimation.CS /// The switch for using Idling event. /// private bool m_isUsingIdling = true; + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + m_timer?.Dispose(); + ((IDisposable)m_displacementElement)?.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/SDK/Samples/DisplacementElementAnimation/CS/Properties/AssemblyInfo.cs b/SDK/Samples/DisplacementElementAnimation/CS/Properties/AssemblyInfo.cs index 734988a1..04453e36 100644 --- a/SDK/Samples/DisplacementElementAnimation/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/DisplacementElementAnimation/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/DockableDialogs/CS/Application/ThisApplication.cs b/SDK/Samples/DockableDialogs/CS/Application/ThisApplication.cs index 361fa516..27183a8c 100644 --- a/SDK/Samples/DockableDialogs/CS/Application/ThisApplication.cs +++ b/SDK/Samples/DockableDialogs/CS/Application/ThisApplication.cs @@ -40,13 +40,31 @@ namespace Revit.SDK.Samples.DockableDialogs.CS /// [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] - public class ThisApplication : IExternalApplication + public class ThisApplication : IExternalApplication, IDisposable { public ThisApplication() { } - public Result OnShutdown(UIControlledApplication application) + public void Dispose() + { + // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposing || isDisposed) + return; + + if (m_mainPage != null) + m_mainPage.Dispose(); + + isDisposed = true; + } + + public Result OnShutdown(UIControlledApplication application) { return Result.Succeeded; } @@ -167,7 +185,7 @@ namespace Revit.SDK.Samples.DockableDialogs.CS MainPage m_mainPage; internal static ThisApplication thisApp = null; private APIUtility m_APIUtility; - + private bool isDisposed; #endregion diff --git a/SDK/Samples/DockableDialogs/CS/DockableDialogs.csproj b/SDK/Samples/DockableDialogs/CS/DockableDialogs.csproj index ad01d815..8e97bec3 100644 --- a/SDK/Samples/DockableDialogs/CS/DockableDialogs.csproj +++ b/SDK/Samples/DockableDialogs/CS/DockableDialogs.csproj @@ -1,53 +1,17 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {1807B361-AA75-16EA-A27D-5748A849E699} - Library - Properties + true Revit.SDK.Samples.DockableDialogs.CS - DockableDialogs - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - true - bin\Debug\ScriptManager.xml - - - full - false - bin\Release\ - DEBUG;TRACE - prompt - 4 - true true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ScriptManager.xml 3 true - full - x64 bin\Debug\DockableDialogs.dll.CodeAnalysisLog.xml true GlobalSuppressions.cs - prompt MinimumRecommendedRules.ruleset ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets false @@ -55,106 +19,35 @@ false - true - bin\x64\Release\ - DEBUG;TRACE - full - x64 + 3 + true bin\Release\DockableDialogs.dll.CodeAnalysisLog.xml true GlobalSuppressions.cs - prompt MinimumRecommendedRules.ruleset ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets false ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules false - true - - - OnOutputUpdated - - - - - - - - - - - - - - - - - - - 3.5 - - - - - - - - - DockingSetupDialog.xaml - - - - - - - - - - - MainPage.xaml - - - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - Always - - - Always - - - Always - - - Always - - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" -if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + None + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" +if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + OnOutputUpdated + + + + Always + + + Always + + + Always + + \ No newline at end of file diff --git a/SDK/Samples/DockableDialogs/CS/ExternalEvents/MacroAPIExternalEventHandler.cs b/SDK/Samples/DockableDialogs/CS/ExternalEvents/MacroAPIExternalEventHandler.cs index bda3d1ed..dc422c00 100644 --- a/SDK/Samples/DockableDialogs/CS/ExternalEvents/MacroAPIExternalEventHandler.cs +++ b/SDK/Samples/DockableDialogs/CS/ExternalEvents/MacroAPIExternalEventHandler.cs @@ -20,14 +20,8 @@ // (Rights in Technical Data and Computer Software), as applicable. // -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using Autodesk.Revit.DB.Macros; -using Autodesk.Revit.UI.Macros; +using Revit.SDK.Samples.DockableDialogs.CS; namespace Revit.SDK.Samples.DockableDiagnostics.CS { diff --git a/SDK/Samples/DockableDialogs/CS/ExternalEvents/ModelessCommand.cs b/SDK/Samples/DockableDialogs/CS/ExternalEvents/ModelessCommand.cs index 91da0d1c..1d96121c 100644 --- a/SDK/Samples/DockableDialogs/CS/ExternalEvents/ModelessCommand.cs +++ b/SDK/Samples/DockableDialogs/CS/ExternalEvents/ModelessCommand.cs @@ -41,7 +41,7 @@ namespace Revit.SDK.Samples.DockableDialogs.CS /// public void Make(ModelessCommandData commandData) { - lock (this) + lock (m_data) { m_data = commandData; } @@ -52,7 +52,7 @@ namespace Revit.SDK.Samples.DockableDialogs.CS /// public ModelessCommandData Take() { - lock (this) + lock (m_data) { return m_data; } diff --git a/SDK/Samples/DockableDialogs/CS/MainPage/MainPage.xaml.cs b/SDK/Samples/DockableDialogs/CS/MainPage/MainPage.xaml.cs index 54a75086..1a2f8b40 100644 --- a/SDK/Samples/DockableDialogs/CS/MainPage/MainPage.xaml.cs +++ b/SDK/Samples/DockableDialogs/CS/MainPage/MainPage.xaml.cs @@ -45,7 +45,7 @@ using System.Text; namespace Revit.SDK.Samples.DockableDialogs.CS { - public partial class MainPage : Page, Autodesk.Revit.UI.IDockablePaneProvider + public partial class MainPage : Page, Autodesk.Revit.UI.IDockablePaneProvider, IDisposable { public MainPage() { @@ -132,9 +132,33 @@ namespace Revit.SDK.Samples.DockableDialogs.CS private Autodesk.Revit.UI.ExternalEvent m_exEvent; private APIExternalEventHandler m_handler= new APIExternalEventHandler(); private System.IO.TextWriter m_textWriter; //Used to re-route any standard IO to the WPF UI. + private bool isDisposed; + #endregion + + public void Dispose() + { + // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposing || isDisposed) + return; + + if (m_textWriter != null) + { + m_textWriter.Close(); + m_textWriter.Dispose(); + } + + (m_exEvent as IDisposable)?.Dispose(); + + isDisposed = true; + } - #endregion /// /// Called by Revit to initialize dockable pane settings set in DockingSetupDialog. diff --git a/SDK/Samples/DockableDialogs/CS/Properties/AssemblyInfo.cs b/SDK/Samples/DockableDialogs/CS/Properties/AssemblyInfo.cs index 062b5eac..0e088ce8 100644 --- a/SDK/Samples/DockableDialogs/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/DockableDialogs/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -32,7 +32,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2014")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/DockableDialogs/CS/Utility/Log.cs b/SDK/Samples/DockableDialogs/CS/Utility/Log.cs index 13dff47c..750b9e73 100644 --- a/SDK/Samples/DockableDialogs/CS/Utility/Log.cs +++ b/SDK/Samples/DockableDialogs/CS/Utility/Log.cs @@ -29,6 +29,7 @@ using System.Diagnostics; using System.Windows.Forms; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.DockableDialogs.CS { diff --git a/SDK/Samples/DocumentChanged/CS/ChangesInfoForm.Designer.cs b/SDK/Samples/DocumentChanged/CS/ChangesInfoForm.Designer.cs index bf710f76..5fd0c66f 100644 --- a/SDK/Samples/DocumentChanged/CS/ChangesInfoForm.Designer.cs +++ b/SDK/Samples/DocumentChanged/CS/ChangesInfoForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/DocumentChanged/CS/ChangesInfoForm.cs b/SDK/Samples/DocumentChanged/CS/ChangesInfoForm.cs index 27249862..2054c62f 100644 --- a/SDK/Samples/DocumentChanged/CS/ChangesInfoForm.cs +++ b/SDK/Samples/DocumentChanged/CS/ChangesInfoForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,12 +21,8 @@ // using System; -using System.Collections.Generic; -using System.ComponentModel; using System.Data; using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace Revit.SDK.Samples.ChangesMonitor.CS diff --git a/SDK/Samples/DocumentChanged/CS/ChangesMonitor.cs b/SDK/Samples/DocumentChanged/CS/ChangesMonitor.cs index 276cce65..24785420 100644 --- a/SDK/Samples/DocumentChanged/CS/ChangesMonitor.cs +++ b/SDK/Samples/DocumentChanged/CS/ChangesMonitor.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,11 +21,7 @@ // using System; -using System.IO; using System.Data; -using System.Text; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; using Autodesk.Revit.UI; diff --git a/SDK/Samples/DocumentChanged/CS/ChangesMonitor.csproj b/SDK/Samples/DocumentChanged/CS/ChangesMonitor.csproj index 10c99d07..ef78a492 100644 --- a/SDK/Samples/DocumentChanged/CS/ChangesMonitor.csproj +++ b/SDK/Samples/DocumentChanged/CS/ChangesMonitor.csproj @@ -1,98 +1,16 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {1C6B9634-D463-43C1-A8C5-B94AE7615384} - Library - Properties - ChangesMonitor - ChangesMonitor - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - 3.5 - - - - - 3.5 - - - 3.5 - - - + - - - Form - - - ChangesInfoForm.cs - - - - - - - ChangesInfoForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DocumentChanged/CS/Properties/AssemblyInfo.cs b/SDK/Samples/DocumentChanged/CS/Properties/AssemblyInfo.cs index 0ffd80f7..ff000a6b 100644 --- a/SDK/Samples/DocumentChanged/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/DocumentChanged/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -10,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("ChangesMonitor")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -34,3 +33,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/DoorSwing/CS/Command.cs b/SDK/Samples/DoorSwing/CS/Command.cs index a6de3bd7..22e73aa4 100644 --- a/SDK/Samples/DoorSwing/CS/Command.cs +++ b/SDK/Samples/DoorSwing/CS/Command.cs @@ -20,15 +20,11 @@ // (Rights in Technical Data and Computer Software), as applicable. // using System; -using System.Collections.Generic; -using System.Text; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using System.Windows.Forms; - namespace Revit.SDK.Samples.DoorSwing.CS { /// diff --git a/SDK/Samples/DoorSwing/CS/DoorFamily.cs b/SDK/Samples/DoorSwing/CS/DoorFamily.cs index cde1e301..da7d2295 100644 --- a/SDK/Samples/DoorSwing/CS/DoorFamily.cs +++ b/SDK/Samples/DoorSwing/CS/DoorFamily.cs @@ -35,7 +35,7 @@ namespace Revit.SDK.Samples.DoorSwing.CS /// /// Left/Right feature based on family's actual geometry and country's standard. /// - public class DoorFamily + public class DoorFamily : IDisposable { #region "Members" @@ -204,6 +204,21 @@ namespace Revit.SDK.Samples.DoorSwing.CS return createdFamilyInstance; } + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + ((IDisposable)m_oneInstance)?.Dispose(); + ((IDisposable)m_geometry)?.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + #endregion } } diff --git a/SDK/Samples/DoorSwing/CS/DoorFamilyGeometry.cs b/SDK/Samples/DoorSwing/CS/DoorFamilyGeometry.cs index e004b2ed..6cda1c6d 100644 --- a/SDK/Samples/DoorSwing/CS/DoorFamilyGeometry.cs +++ b/SDK/Samples/DoorSwing/CS/DoorFamilyGeometry.cs @@ -34,7 +34,7 @@ namespace Revit.SDK.Samples.DoorSwing.CS /// The DoorGeometry object is used to transform Revit geometry data /// to appropriate format for GDI. /// - public class DoorGeometry + public class DoorGeometry : IDisposable { #region "Members" @@ -312,6 +312,21 @@ namespace Revit.SDK.Samples.DoorSwing.CS } } + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + ((IDisposable)m_options)?.Dispose(); + ((IDisposable)m_bbox)?.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + #endregion } } diff --git a/SDK/Samples/DoorSwing/CS/DoorSwing.csproj b/SDK/Samples/DoorSwing/CS/DoorSwing.csproj index dafbfc39..3d6a6da1 100644 --- a/SDK/Samples/DoorSwing/CS/DoorSwing.csproj +++ b/SDK/Samples/DoorSwing/CS/DoorSwing.csproj @@ -1,116 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {B509317E-B7F9-4365-8980-18EDC3B6F6F9} - Library - Properties Revit.SDK.Samples.DoorSwing.CS - DoorSwing - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + true true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - False - False - - - - - - - - - False - - - 3.5 - - - - - - - - - - Form - - - InitializeForm.cs - - - - - True - True - DoorSwingResource.resx - - - - - Designer - InitializeForm.cs - - - Designer - ResXFileCodeGenerator - DoorSwingResource.Designer.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DoorSwing/CS/DoorSwingData.cs b/SDK/Samples/DoorSwing/CS/DoorSwingData.cs index 726800c5..ab0b26f4 100644 --- a/SDK/Samples/DoorSwing/CS/DoorSwingData.cs +++ b/SDK/Samples/DoorSwing/CS/DoorSwingData.cs @@ -21,14 +21,12 @@ // using System; using System.Collections.Generic; -using System.Text; using System.Collections; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using System.Windows.Forms; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.DoorSwing.CS { diff --git a/SDK/Samples/DoorSwing/CS/ExternalApplication.cs b/SDK/Samples/DoorSwing/CS/ExternalApplication.cs index 0ce983e7..e6ddf2b4 100644 --- a/SDK/Samples/DoorSwing/CS/ExternalApplication.cs +++ b/SDK/Samples/DoorSwing/CS/ExternalApplication.cs @@ -21,17 +21,13 @@ // using System; using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Windows.Forms; using System.Windows.Media.Imaging; -using Autodesk.Revit; using Autodesk.Revit.DB.Events; using Autodesk.Revit.UI; -using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.DB; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.DoorSwing.CS { diff --git a/SDK/Samples/DoorSwing/CS/Properties/AssemblyInfo.cs b/SDK/Samples/DoorSwing/CS/Properties/AssemblyInfo.cs index dc27702f..6ce4984b 100644 --- a/SDK/Samples/DoorSwing/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/DoorSwing/CS/Properties/AssemblyInfo.cs @@ -33,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/DuplicateGraphics/CS/DuplicateGraphics.csproj b/SDK/Samples/DuplicateGraphics/CS/DuplicateGraphics.csproj index 02ba2522..1cf02b9b 100644 --- a/SDK/Samples/DuplicateGraphics/CS/DuplicateGraphics.csproj +++ b/SDK/Samples/DuplicateGraphics/CS/DuplicateGraphics.csproj @@ -1,76 +1,11 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {B6D202D5-DCEF-4B5B-A2A7-843C9DFD9EDD} - Library - Properties Revit.SDK.Samples.DuplicateGraphics.CS - DuplicateGraphics - - - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\DuplicateGraphics.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - OnOutputUpdated - - - - - - - - - - 4.5.2 - - - - - - - - - - + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/DuplicateGraphics/CS/Properties/AssemblyInfo.cs b/SDK/Samples/DuplicateGraphics/CS/Properties/AssemblyInfo.cs index e82c557a..2be83d2b 100644 --- a/SDK/Samples/DuplicateGraphics/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/DuplicateGraphics/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/DuplicateViews/CS/DuplicateViews.csproj b/SDK/Samples/DuplicateViews/CS/DuplicateViews.csproj index cab0e6d2..12313fb1 100644 --- a/SDK/Samples/DuplicateViews/CS/DuplicateViews.csproj +++ b/SDK/Samples/DuplicateViews/CS/DuplicateViews.csproj @@ -1,105 +1,20 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {073BC489-161F-4504-A94A-4C48F2D3AB54} - Library - Properties Revit.SDK.Samples.DuplicateViews.CS - DuplicateViews - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\DuplicateViews.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\DuplicateViews.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - - 3.5 - - - - - - - - - - True - True - Resources.resx - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DuplicateViews/CS/Properties/AssemblyInfo.cs b/SDK/Samples/DuplicateViews/CS/Properties/AssemblyInfo.cs index 158e7d69..5df71738 100644 --- a/SDK/Samples/DuplicateViews/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/DuplicateViews/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/DynamicModelUpdate/CS/Application.cs b/SDK/Samples/DynamicModelUpdate/CS/Application.cs index 093a0632..6b3b51b6 100644 --- a/SDK/Samples/DynamicModelUpdate/CS/Application.cs +++ b/SDK/Samples/DynamicModelUpdate/CS/Application.cs @@ -37,7 +37,7 @@ namespace Revit.SDK.Samples.DynamicModelUpdate.CS // [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] - public class AssociativeSectionUpdater : Autodesk.Revit.UI.IExternalCommand + public sealed class AssociativeSectionUpdater : Autodesk.Revit.UI.IExternalCommand { Document m_document; UIDocument m_documentUI; diff --git a/SDK/Samples/DynamicModelUpdate/CS/DynamicModelUpdate.csproj b/SDK/Samples/DynamicModelUpdate/CS/DynamicModelUpdate.csproj index 12e71efa..3363d2e8 100644 --- a/SDK/Samples/DynamicModelUpdate/CS/DynamicModelUpdate.csproj +++ b/SDK/Samples/DynamicModelUpdate/CS/DynamicModelUpdate.csproj @@ -1,78 +1,23 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {7703880C-62D5-477E-BB6B-D8822E7F4249} - Library - Properties Revit.SDK.Samples.DynamicModelUpdate.CS - DynamicModelUpdate - v4.8 - 512 - - - true - full - false - bin\Release\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - - None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/DynamicModelUpdate/CS/SectionUpdater.cs b/SDK/Samples/DynamicModelUpdate/CS/SectionUpdater.cs index 9e9a851a..36a64fca 100644 --- a/SDK/Samples/DynamicModelUpdate/CS/SectionUpdater.cs +++ b/SDK/Samples/DynamicModelUpdate/CS/SectionUpdater.cs @@ -23,7 +23,6 @@ using System; using System.Collections.Generic; using Autodesk.Revit.DB; -using Autodesk.Revit.DB.ExtensibleStorage; using Autodesk.Revit.UI; namespace Revit.SDK.Samples.DynamicModelUpdate.CS @@ -32,7 +31,7 @@ namespace Revit.SDK.Samples.DynamicModelUpdate.CS /// /// Updater to automatically move a section in conjunction with the location of a window /// - public class SectionUpdater : IUpdater + public class SectionUpdater : IUpdater, IDisposable { internal SectionUpdater(AddInId addinID) { @@ -194,6 +193,21 @@ namespace Revit.SDK.Samples.DynamicModelUpdate.CS private ElementId m_windowId = null; private ElementId m_sectionId = null; // The real ViewSection that contains the Origin and ViewDirection private Element m_sectionElement = null; // The view section element to move and rotate - } + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + ((IDisposable)m_updaterId)?.Dispose(); + ((IDisposable)m_sectionElement)?.Dispose(); + } + } + + public void Dispose() + { + // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + } } \ No newline at end of file diff --git a/SDK/Samples/EditSketch/CS/AddWall.cs b/SDK/Samples/EditSketch/CS/AddWall.cs new file mode 100644 index 00000000..e524e014 --- /dev/null +++ b/SDK/Samples/EditSketch/CS/AddWall.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Architecture; + +namespace Revit.SDK.Samples.EditSketch.CS +{ + internal class AddWall + { + // See API docs for Wall.Create for additional details + // Returns the ID of the wall created + public static Wall execute(Document doc, XYZ start, XYZ end, double height, String levelName) + { + + Wall w = null; + + using (Transaction t = new Transaction(doc, "Creating wall")) + { + + t.Start(); + + // Creating a line for the location + Line line = Line.CreateBound(start, end); + + // Find level + FilteredElementCollector fec = new FilteredElementCollector(doc); + fec.OfClass(typeof(Level)); + Level level = fec.Cast().First(lvl => lvl.Name == levelName); + + double offset = 0; + ElementId defaultElementTypeId = doc.GetDefaultElementTypeId(ElementTypeGroup.WallType); + + // Create a wall using the location line and wall type + w = Wall.Create(doc, line, defaultElementTypeId, level.Id, height, offset, true, true); + + // Important for the wall to have a profile sketch if we would like to edit it + w.CreateProfileSketch(); + + t.Commit(); + } + + return w; + } + } +} diff --git a/SDK/Samples/EditSketch/CS/Command.cs b/SDK/Samples/EditSketch/CS/Command.cs new file mode 100644 index 00000000..4b9d4daf --- /dev/null +++ b/SDK/Samples/EditSketch/CS/Command.cs @@ -0,0 +1,114 @@ +// +// (C) Copyright 2003-2023 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using System.Windows.Forms; +using System.Collections; +using System.Collections.Generic; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; + + +namespace Revit.SDK.Samples.EditSketch.CS +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class Command : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// A message that can be set by the external application + /// which will be displayed if a failure or cancellation is returned by + /// the external command. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// Return the status of the external command. + /// A result of Succeeded means that the API external method functioned as expected. + /// Cancelled can be used to signify that the user cancelled the external operation + /// at some point. Failure should be returned if the application is unable to proceed with + /// the operation. + public virtual Result Execute(ExternalCommandData commandData + , ref string message, ElementSet elements) + { + + // Shape of example wall created below: + // + // ─────── + // / ___ \ + // / / \ \ + // │ / \ │ + // │ \ / │ + // │ \___ / │ + // │ │ + // │ │ + // │ │ + // │ │ + // │ │ + // │ │ + // │ │ + // │ │ + // └────────────┘ + + + try + { + Document document = commandData.Application.ActiveUIDocument.Document; + + // Parameters of the example wall + double height = 20; + double width = 10; + XYZ start = new XYZ(0, 0, 0); + XYZ end = new XYZ(width, 0, 0); + + Wall wall = AddWall.execute(document, start, end, height, "Level 1"); + + WallSketchEditor wallSketchEditor = new WallSketchEditor(document, wall); + + wallSketchEditor.ReplaceTopOfWallWithArc(); + + XYZ circleCenter = new XYZ(width / 2, 0, height); + double circleRadius = 3; + wallSketchEditor.AddHoleToSketch(circleCenter, circleRadius); + + wallSketchEditor.AddLinearDimensionBetweenArcsInSketch(); + wallSketchEditor.AddAngularDimensionToWallBase(); + return Result.Succeeded; + + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} + diff --git a/SDK/Samples/EditSketch/CS/EditSketch.addin b/SDK/Samples/EditSketch/CS/EditSketch.addin new file mode 100644 index 00000000..9dbad9d6 --- /dev/null +++ b/SDK/Samples/EditSketch/CS/EditSketch.addin @@ -0,0 +1,14 @@ + + + + EditSketch.dll + f0bf6172-92ad-4464-93a0-be58b704c5a7 + Revit.SDK.Samples.EditSketch.CS.Command + SketchEditScope + An example of how to edit curves in sketches and add dimensions to the sketch using SketchEditScope. + AlwaysVisible + Unknown + ADSK + + + diff --git a/SDK/Samples/EditSketch/CS/EditSketch.csproj b/SDK/Samples/EditSketch/CS/EditSketch.csproj new file mode 100644 index 00000000..9e17208a --- /dev/null +++ b/SDK/Samples/EditSketch/CS/EditSketch.csproj @@ -0,0 +1,16 @@ + + + + true + bin\Debug\EditSketch.xml + + + true + bin\Release\EditSketch.xml + + + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" +if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + + \ No newline at end of file diff --git a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/Properties/AssemblyInfo.cs b/SDK/Samples/EditSketch/CS/Properties/AssemblyInfo.cs similarity index 74% rename from SDK/Samples/Massing/DividedSurfaceByIntersects/CS/Properties/AssemblyInfo.cs rename to SDK/Samples/EditSketch/CS/Properties/AssemblyInfo.cs index fd4d56e5..0b695da3 100644 --- a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/EditSketch/CS/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("DividedSurfaceByIntersects")] +[assembly: AssemblyTitle("SketchEditScope")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("DividedSurfaceByIntersects")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2010")] +[assembly: AssemblyProduct("SketchEditScope")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -20,7 +20,7 @@ using System.Runtime.InteropServices; [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("ffa0afac-7f23-4bb2-834f-e513beebbce7")] +[assembly: Guid("e7addf22-c0e1-4f1a-b114-fd94e3d40fbc")] // Version information for an assembly consists of the following four values: // @@ -29,7 +29,8 @@ using System.Runtime.InteropServices; // Build Number // Revision // -// You can specify all the values or you can default the Revision and Build Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SDK/Samples/EditSketch/CS/ReadMe_SketchEditScope.rtf b/SDK/Samples/EditSketch/CS/ReadMe_SketchEditScope.rtf new file mode 100644 index 00000000..d4a6e5ba --- /dev/null +++ b/SDK/Samples/EditSketch/CS/ReadMe_SketchEditScope.rtf @@ -0,0 +1,262 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;} +{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f44\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f45\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f47\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f48\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f49\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f50\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\f51\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f52\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f54\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f55\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} +{\f57\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f58\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f59\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f60\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} +{\f61\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f62\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;} +{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;} +{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;} +{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;} +{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);} +{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);} +{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128; +\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;}{\*\defchp \fs22\kerning2\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 } +\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 +\fs22\lang1033\langfe1033\kerning2\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\kerning2\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 +\snext11 \ssemihidden \sunhideused Normal Table;}}{\*\rsidtbl \rsid416906\rsid8528842}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Christa Mumley} +{\creatim\yr2023\mo8\dy1\hr10\min16}{\revtim\yr2023\mo8\dy1\hr10\min22}{\version2}{\edmins6}{\nofpages1}{\nofwords177}{\nofchars1013}{\nofcharsws1188}{\vern75}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}} +\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect +\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701 +\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot416906 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2 +\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\kerning2\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 +{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 + SketchEditScope\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 +\hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 2020.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 2020.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 +Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 +\hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Medium\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 +\b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Geometry, Elements\line }{\rtlch\fcs1 +\ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 ExternalCommand\line +\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 + SketchEditScope\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 +\hich\af1\dbch\af31505\loch\f1 \line \hich\af1\dbch\af31505\loch\f1 An example of how to edit curves in sketches and add dimensions to the sketch using SketchEditScope. }{\rtlch\fcs1 \ai\af0\afs20 \ltrch\fcs0 +\i\f0\fs20\kerning0\insrsid8528842\charrsid416906 +\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\kerning0\insrsid8528842\charrsid416906 +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 +\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.IExternalCommand +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB +\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe1033\kerning0\langnp1036\insrsid8528842\charrsid416906 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\kerning0\insrsid8528842\charrsid416906 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Command.cs +\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 +It contains the class Command which inherits from interface IExternalCommand and implement\hich\af1\dbch\af31505\loch\f1 s the Execute method. +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid416906 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid416906\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Add\hich\af1\dbch\af31505\loch\f1 Wall}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid416906\charrsid416906 \hich\af1\dbch\af31505\loch\f1 .cs +\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid416906 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid416906\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Creates \hich\af1\dbch\af31505\loch\f1 +a simple wa\hich\af1\dbch\af31505\loch\f1 ll with a p\hich\af1\dbch\af31505\loch\f1 rofile sketch}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid416906\charrsid416906 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid416906\charrsid416906 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid416906 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid416906\charrsid416906 \hich\af1\dbch\af31505\loch\f1 WallSketchEditor.cs +\par \hich\af1\dbch\af31505\loch\f1 Provides a class that\hich\af1\dbch\af31505\loch\f1 \hich\af1\dbch\af31505\loch\f1 has \hich\af1\dbch\af31505\loch\f1 methods to edit the sketch of a wall generated with AddWall. }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid416906\charrsid416906 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe1033\kerning0\langnp1036\insrsid8528842\charrsid416906 +\par }{\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\f0\fs20\kerning0\insrsid8528842\charrsid416906 +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 }{ +\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\kerning0\insrsid8528842\charrsid416906 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 This sample provides following functionalities. +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid416906\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Create a wall \hich\af1\dbch\af31505\loch\f1 programmatically.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid416906 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid416906\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Shows ho\hich\af1\dbch\af31505\loch\f1 w to automatically replace \hich\af1\dbch\af31505\loch\f1 an edge of a sketch\hich\af1\dbch\af31505\loch\f1 +\hich\af1\dbch\af31505\loch\f1 and add a hole \hich\af1\dbch\af31505\loch\f1 w\hich\af1\dbch\af31505\loch\f1 ith S\hich\af1\dbch\af31505\loch\f1 ketchEditScope feature. }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 +\hich\af1\dbch\af31505\loch\f1 +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid416906 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\kerning0\insrsid416906\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Shows how to add \hich\af1\dbch\af31505\loch\f1 dime\hich\af1\dbch\af31505\loch\f1 ns\hich\af1\dbch\af31505\loch\f1 io\hich\af1\dbch\af31505\loch\f1 ns to the sketch +\hich\af1\dbch\af31505\loch\f1 programmatically.\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\kerning0\insrsid8528842\charrsid416906 +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 }{ +\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\kerning0\insrsid8528842\charrsid416906 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Open Revit application and execute the command. +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid416906 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 1.\tab }{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\kerning0\insrsid416906\charrsid416906 \hich\af1\dbch\af31505\loch\f1 Create a wall\hich\af1\dbch\af31505\loch\f1 where the sketch is automa\hich\af1\dbch\af31505\loch\f1 tically e\hich\af1\dbch\af31505\loch\f1 dited}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 . +\par }\pard \ltrpar\ql \li765\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin765\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 \hich\af1\dbch\af31505\loch\f1 E\hich\af1\dbch\af31505\loch\f1 xpected result: }{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning0\insrsid416906\charrsid416906 \hich\af1\dbch\af31505\loch\f1 A wa\hich\af1\dbch\af31505\loch\f1 ll with an arc\hich\af1\dbch\af31505\loch\f1 replaces the t\hich\af1\dbch\af31505\loch\f1 op +\hich\af1\dbch\af31505\loch\f1 boundary and \hich\af1\dbch\af31505\loch\f1 a hole\hich\af1\dbch\af31505\loch\f1 appears \hich\af1\dbch\af31505\loch\f1 in the\hich\af1\dbch\af31505\loch\f1 \hich\af1\dbch\af31505\loch\f1 profile}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\kerning0\insrsid8528842\charrsid416906 . +\par +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\kerning0\insrsid8528842\charrsid416906 +\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a +9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad +5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 +b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 +0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 +a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f +c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 +0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 +a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 +6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b +4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b +4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100b6f4679893070000c9200000160000007468656d652f7468656d652f +7468656d65312e786d6cec59cd8b1bc915bf07f23f347d97f5d5ad8fc1f2a24fcfda33b6b164873dd648a5eef2547789aad28cc56208de532e81c026e49085bd +ed21842cecc22eb9e48f31d8249b3f22afaa5bdd5552c99e191c3061463074977eefd5afde7bf5de53d5ddcf5e26d4bbc05c1096f6fcfa9d9aefe174ce16248d +7afeb3d9a4d2f13d2151ba4094a5b8e76fb0f03fbbf7eb5fdd454732c609f6403e1547a8e7c752ae8eaa5531876124eeb0154ee1bb25e30992f0caa3ea82a34b +d09bd06aa3566b55134452df4b51026a1f2f97648ebd9952e9dfdb2a1f53784da5500373caa74a35b6243476715e5708b11143cabd0b447b3eccb3609733fc52 +fa1e4542c2173dbfa6fffceabdbb5574940b517940d6909be8bf5c2e17589c37f49c3c3a2b260d823068f50bfd1a40e53e6edc1eb7c6ad429f06a0f91c569a71 +b175b61bc320c71aa0ecd1a17bd41e35eb16ded0dfdce3dc0fd5c7c26b50a63fd8c34f2643b0a285d7a00c1feee1c3417730b2f56b50866fede1dbb5fe28685b +fa3528a6243ddf43d7c25673b85d6d0159327aec8477c360d26ee4ca4b144443115d6a8a254be5a1584bd00bc6270050408a24493db959e1259a43140f112567 +9c7827248a21f056286502866b8ddaa4d684ffea13e827ed5174849121ad780113b137a4f87862cec94af6fc07a0d537206f7ffef9cdeb1fdfbcfee9cd575fbd +79fdf77c6eadca923b466964cafdf2dd1ffef3cd6fbd7ffff0ed2f5fff319b7a172f4cfcbbbffdeedd3ffef93ef5b0e2d2146ffff4fdbb1fbf7ffbe7dfffebaf +5f3bb4f7393a33e1339260e13dc297de5396c0021dfcf119bf9ec42c46c494e8a791402952b338f48f656ca11f6d10450edc00db767cce21d5b880f7d72f2cc2 +d398af2571687c182716f094313a60dc6985876a2ec3ccb3751ab927e76b13f714a10bd7dc43945a5e1eaf579063894be530c616cd2714a5124538c5d253dfb1 +738c1dabfb8210cbaea764ce99604be97d41bc01224e93ccc899154da5d03149c02f1b1741f0b7659bd3e7de8051d7aa47f8c246c2de40d4417e86a965c6fb68 +2d51e252394309350d7e8264ec2239ddf0b9891b0b099e8e3065de78818570c93ce6b05ec3e90f21cdb8dd7e4a37898de4929cbb749e20c64ce4889d0f6394ac +5cd829496313fbb938871045de13265df05366ef10f50e7e40e941773f27d872f787b3c133c8b026a53240d4376beef0e57dccacf89d6ee8126157aae9f3c44a +b17d4e9cd131584756689f604cd1255a60ec3dfbdcc160c05696cd4bd20f62c82ac7d815580f901dabea3dc5027a25d5dcece7c91322ac909de2881de073bad9 +493c1b9426881fd2fc08bc6eda7c0ca52e7105c0633a3f37818f08f480102f4ea33c16a0c308ee835a9fc4c82a60ea5db8e375c32dff5d658fc1be7c61d1b8c2 +be04197c6d1948eca6cc7b6d3343d49aa00c9819822ec3956e41c4727f29a28aab165b3be596f6a62ddd00dd91d5f42424fd6007b4d3fb84ffbbde073a8cb77f +f9c6b10f3e4ebfe3566c25ab6b763a8792c9f14e7f7308b7dbd50c195f904fbfa919a175fa04431dd9cf58b73dcd6d4fe3ffdff73487f6f36d2773a8dfb8ed64 +7ce8306e3b99fc70e5e3743265f3027d8d3af0c80e7af4b14f72f0d46749289dca0dc527421ffc08f83db398c0a092d3279eb838055cc5f0a8ca1c4c60e1228e +b48cc799fc0d91f134462b381daafb4a492472d591f0564cc0a1911e76ea5678ba4e4ed9223becacd7d5c16656590592e5782d2cc6e1a04a66e856bb3cc02bd4 +6bb6913e68dd1250b2d721614c6693683a48b4b783ca48fa58178ce620a157f65158741d2c3a4afdd6557b2c805ae115f8c1edc1cff49e1f06200242701e07cd +f942f92973f5d6bbda991fd3d3878c69450034d8db08283ddd555c0f2e4fad2e0bb52b78da2261849b4d425b46377822869fc17974aad1abd0b8aeafbba54b2d +7aca147a3e08ad9246bbf33e1637f535c8ede6069a9a9982a6de65cf6f35430899395af5fc251c1ac363b282d811ea3717a211dcbccc25cf36fc4d32cb8a0b39 +4222ce0cae934e960d122231f728497abe5a7ee1069aea1ca2b9d51b90103e59725d482b9f1a3970baed64bc5ce2b934dd6e8c284b67af90e1b35ce1fc568bdf +1cac24d91adc3d8d1797de195df3a708422c6cd795011744c0dd413db3e682c0655891c8caf8db294c79da356fa3740c65e388ae62945714339967709dca0b3a +faadb081f196af190c6a98242f8467912ab0a651ad6a5a548d8cc3c1aafb6121653923699635d3ca2aaa6abab39835c3b60cecd8f26645de60b53531e434b3c2 +67a97b37e576b7b96ea74f28aa0418bcb09fa3ea5ea12018d4cac92c6a8af17e1a56393b1fb56bc776811fa07695226164fdd656ed8edd8a1ae19c0e066f54f9 +416e376a6168b9ed2bb5a5f5adb979b1cdce5e40f2184197bba6526857c2c92e47d0104d754f92a50dd8222f65be35e0c95b73d2f3bfac85fd60d80887955a27 +1c57826650ab74c27eb3d20fc3667d1cd66ba341e31514161927f530bbb19fc00506dde4f7f67a7cefee3ed9ded1dc99b3a4caf4dd7c5513d777f7f5c6e1bb7b +8f40d2f9b2d598749bdd41abd26df627956034e854bac3d6a0326a0ddba3c9681876ba9357be77a1c141bf390c5ae34ea5551f0e2b41aba6e877ba9576d068f4 +8376bf330efaaff23606569ea58fdc16605ecdebde7f010000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d65 +2f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d36 +3f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e +3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d985 +0528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000000000 +0000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000 +000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019020000 +7468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d0014000600080000002100b6f4679893070000c92000001600000000000000 +000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027000000 +000000000000000000009d0a00007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000980b00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong; +\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Table;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 6; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 6; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Contemporary;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Elegant;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Professional; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 2; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden1 \lsdlocked0 Placeholder Text; +\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2; +\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List; +\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1; +\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision; +\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1; +\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1; +\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2; +\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2; +\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2; +\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3; +\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3; +\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4; +\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4; +\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4; +\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5; +\lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; +\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; +\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; +\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; +\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; +\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; +\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; +\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; +\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; +\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; +\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore 01050000 +02000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000008042 +998a83c4d901feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/SDK/Samples/EditSketch/CS/WallSketchEditor.cs b/SDK/Samples/EditSketch/CS/WallSketchEditor.cs new file mode 100644 index 00000000..f00569c1 --- /dev/null +++ b/SDK/Samples/EditSketch/CS/WallSketchEditor.cs @@ -0,0 +1,262 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit.DB; + +namespace Revit.SDK.Samples.EditSketch.CS +{ + internal class WallSketchEditor + { + private Document document; + private Wall wall; + + + /// + /// constructor + /// + /// + public WallSketchEditor(Document document, Wall wall) + { + this.document = document; + this.wall = wall; + } + + // Must call a Failures Preprocessor Class to exit a SketchEditScope + class EmptyFailuresPreprocessor : Autodesk.Revit.DB.IFailuresPreprocessor + { + public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor) + { + return FailureProcessingResult.Continue; + } + + } + + public void ReplaceTopOfWallWithArc() + { + + // Opening a sketch edit scope to prepare to edit wall sketch + using (SketchEditScope editscope = new SketchEditScope(this.document, "Adding Hole In Wall")) + { + Parameter h = wall.get_Parameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM); + double height = h.AsDouble(); + + // Begin Editing profile sketch of the wall + editscope.Start(wall.SketchId); + Sketch sketch = this.document.GetElement(wall.SketchId) as Sketch; + + // End1/0 will be the ends of the line we are replacing with an arc + XYZ end0 = null; + XYZ end1 = null; + double width = 0; + + using (Transaction t = new Transaction(this.document, "Adding Top Arc to the wall")) + { + + t.Start(); + + // Retrieve the curves of the sketch + // The sketch is defined by the Profile or the sequence of closed loops (CurveArrArray) + // These closed loops are further defined by the curves that comprise them (CurveArray) + CurveArrArray closedLoops = sketch.Profile; + foreach (CurveArray loop in closedLoops) + { + foreach (Curve curve in loop) + { + Line line = curve as Line; + + // The top line will have a starting height equal to the height of the wall + if (line.GetEndPoint(0).Z == height) + { + + // For adding the arc + end0 = line.GetEndPoint(0); + end1 = line.GetEndPoint(1); + width = line.Length; + + // Delete existing top wall line + this.document.Delete(line.Reference.ElementId); + break; + } + } + } + + // Add arc to top of wall. + XYZ pointOnCurve = new XYZ(end0.X - width / 2, end0.Y, end0.Z + width / 2); + Arc arc = Arc.Create(end0, end1, pointOnCurve); + + this.document.Create.NewModelCurve(arc, sketch.SketchPlane); + + t.Commit(); + } + + editscope.Commit(new EmptyFailuresPreprocessor()); + } + } + + public void AddHoleToSketch(XYZ circleOrigin, double circleRadius) + { + using (SketchEditScope editscope = new SketchEditScope(this.document, "Adding Hole In Wall")) + { + + // Begin Editing profile sketch of the wall + editscope.Start(wall.SketchId); + Sketch sketch = this.document.GetElement(wall.SketchId) as Sketch; + + using (Transaction t = new Transaction(this.document, "Creating Hole in Wall Profile Sketch")) + { + + t.Start(); + + // Add hole with the center being the center of the arc + Curve circle = Ellipse.CreateCurve(circleOrigin, circleRadius, circleRadius, XYZ.BasisX, XYZ.BasisZ, -Math.PI, Math.PI); + this.document.Create.NewModelCurve(circle, sketch.SketchPlane); + + t.Commit(); + } + + editscope.Commit(new EmptyFailuresPreprocessor()); + } + } + + // Assuming wall has a top arc and a free floating circle in the middle + public void AddLinearDimensionBetweenArcsInSketch() + { + + using (SketchEditScope editscope = new SketchEditScope(document, "Adding linear dimension")) + { + + Parameter h = wall.get_Parameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM); + double height = h.AsDouble(); + double circleRadius = 0; + + // Begin Editing profile sketch of the wall + editscope.Start(wall.SketchId); + Sketch sketch = document.GetElement(wall.SketchId) as Sketch; + + using (Transaction t = new Transaction(document, "Creating dimension between arcs")) + { + + t.Start(); + + // Retriving all the Model Lines of the sketch + IList modelLineIds = sketch.GetAllElements(); + + // We will use this in creating the linear dimension + Reference innerCircle = null; + Reference topArc = null; + + foreach (ElementId id in modelLineIds) + { + Element element = document.GetElement(id); + + if (element is ModelArc) + { + ModelArc modelArc = element as ModelArc; + + // This will help us distinguish between the inner circle and + // Top arc, since we know that the inner circle touches no elements + if (modelArc.GetAdjoinedCurveElements(0).Count() == 0) + { + innerCircle = new Reference(element); + circleRadius = modelArc.GeometryCurve.ApproximateLength; + + } + else + { + topArc = new Reference(element); + } + } + } + + + ReferenceArray rArray = new ReferenceArray(); + rArray.Insert(innerCircle, 0); + rArray.Insert(topArc, 0); + + // Add dim between two references + Dimension dimension = document.Create.NewDimension(null, Line.CreateBound(new XYZ(height / 2, 0, height / 2), new XYZ(height / 2, 0, height + circleRadius)), rArray); + dimension.Suffix = " Between Arcs"; + + t.Commit(); + } + + editscope.Commit(new EmptyFailuresPreprocessor()); + } + } + + public void AddAngularDimensionToWallBase() + { + using (SketchEditScope editscope = new SketchEditScope(document, "Adding linear dimension")) + { + + Parameter h = wall.get_Parameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM); + + // Begin Editing profile sketch of the wall + editscope.Start(wall.SketchId); + Sketch sketch = document.GetElement(wall.SketchId) as Sketch; + + using (Transaction t = new Transaction(document, "Creating dimension between arcs")) + { + + t.Start(); + + // Retrieving all the Model Lines of the sketch + IList modelLineIds = sketch.GetAllElements(); + + Reference rLine1 = null; + Reference rLine2 = null; + + foreach (ElementId id in modelLineIds) + { + Element element = document.GetElement(id); + if (element is ModelLine) + { + // Select the first two model lines + ModelLine modelLine = element as ModelLine; + if (rLine1 == null) + { + rLine1 = modelLine.GeometryCurve.Reference; + } + else if (rLine2 == null) + { + rLine2 = modelLine.GeometryCurve.Reference; + } + else + { + break; + } + + } + } + + IList references = new List(); + references.Add(rLine1); + references.Add(rLine2); + + // This arc determines the size of the dimension + XYZ arcTop = new XYZ(2, 0, 2); + XYZ arcStart = new XYZ(0, 0, 1); + XYZ arcEnd = new XYZ(1, 0, 0); + Arc a = Arc.Create(arcStart, arcEnd, arcTop); + + // Getting default angular dimension tyoe + DimensionType type = new FilteredElementCollector(document) + .OfClass(typeof(DimensionType)).Cast() + .FirstOrDefault(x => x.StyleType == DimensionStyleType.Angular); + + // Creating angular dimension + AngularDimension ad = AngularDimension.Create(document, document.ActiveView, a, references, type); + + t.Commit(); + } + + editscope.Commit(new EmptyFailuresPreprocessor()); + } + } + + + } +} diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/Command.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/Command.cs index e8913ce9..2406cd7f 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/Command.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/Extensions.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/Extensions.cs index ebbd62a9..29f7ba83 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/Extensions.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/Extensions.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/FilterData.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/FilterData.cs index 9d787fb3..1eaad5c2 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/FilterData.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/FilterData.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/FilterUtil.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/FilterUtil.cs index 156d2cf3..d5ecba6c 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/FilterUtil.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/FilterUtil.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/NewFilterForm.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/NewFilterForm.cs index 96007480..13173ed2 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/NewFilterForm.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/NewFilterForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/Properties/AssemblyInfo.cs index 5b464ee4..aa57c07f 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Rooms")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFilters.csproj b/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFilters.csproj index 3eb8ece3..4cc62d9d 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFilters.csproj +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFilters.csproj @@ -1,124 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {4FCBF0C9-EC78-426F-8563-C81EF2541DF7} - Library - Properties Revit.SDK.Samples.ViewFilters.CS - ViewFilters - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900 - prompt true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - NewFilterForm.cs - - - True - True - Resources.resx - - - - Form - - - ViewFiltersForm.cs - - - - - - - - NewFilterForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - - - Designer - ViewFiltersForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.Designer.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.Designer.cs index db1c4cfc..46735c56 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.Designer.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.cs index eb78adc9..c70b4a82 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/ErrorHandling/CS/ErrorHandling.csproj b/SDK/Samples/ErrorHandling/CS/ErrorHandling.csproj index 76d9b532..a25bfe09 100644 --- a/SDK/Samples/ErrorHandling/CS/ErrorHandling.csproj +++ b/SDK/Samples/ErrorHandling/CS/ErrorHandling.csproj @@ -1,82 +1,17 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {319AB620-9C6F-4F1B-9A9A-2543F4283AAA} - Library - Properties - ErrorHandling - ErrorHandling - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Events/AutoStamp/CS/Application.cs b/SDK/Samples/Events/AutoStamp/CS/Application.cs index 680f6bb1..2e8fef1d 100644 --- a/SDK/Samples/Events/AutoStamp/CS/Application.cs +++ b/SDK/Samples/Events/AutoStamp/CS/Application.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,11 +22,8 @@ using System; -using System.Text; -using Autodesk.Revit; using Autodesk.Revit.UI; -using Autodesk.Revit.ApplicationServices; namespace Revit.SDK.Samples.AutoStamp.CS { diff --git a/SDK/Samples/Events/AutoStamp/CS/AutoStamp.csproj b/SDK/Samples/Events/AutoStamp/CS/AutoStamp.csproj index 7b3fb247..658497ad 100644 --- a/SDK/Samples/Events/AutoStamp/CS/AutoStamp.csproj +++ b/SDK/Samples/Events/AutoStamp/CS/AutoStamp.csproj @@ -1,118 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {BE595C88-8880-4497-8088-22A060ED3EB8} - Library - Properties Revit.SDK.Samples.AutoStamp.CS - AutoStamp - false - - - - - 2.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Events/AutoStamp/CS/EventsReactor.cs b/SDK/Samples/Events/AutoStamp/CS/EventsReactor.cs index a6851a38..49d2428e 100644 --- a/SDK/Samples/Events/AutoStamp/CS/EventsReactor.cs +++ b/SDK/Samples/Events/AutoStamp/CS/EventsReactor.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -63,7 +63,7 @@ namespace Revit.SDK.Samples.AutoStamp.CS /// /// Reserves the id of TextNote created by ViewPrinting and delete it in ViewPrinted event. /// - Autodesk.Revit.DB.ElementId m_newTextNoteId; + Autodesk.Revit.DB.ElementId m_newTextNoteId; #endregion @@ -271,6 +271,7 @@ namespace Revit.SDK.Samples.AutoStamp.CS Trace.WriteLine(String.Format("{0} ViewName: {1}, ViewType: {2}", prefix, view.Name, view.ViewType)); } + #endregion - } + } } diff --git a/SDK/Samples/Events/AutoStamp/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Events/AutoStamp/CS/Properties/AssemblyInfo.cs index 85355b01..f8f10820 100644 --- a/SDK/Samples/Events/AutoStamp/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Events/AutoStamp/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,7 +22,6 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -33,7 +32,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc")] [assembly: AssemblyProduct("AutoStamp")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/Events/AutoUpdate/CS/AutoUpdate.csproj b/SDK/Samples/Events/AutoUpdate/CS/AutoUpdate.csproj index f82dc1f6..0aadd9c9 100644 --- a/SDK/Samples/Events/AutoUpdate/CS/AutoUpdate.csproj +++ b/SDK/Samples/Events/AutoUpdate/CS/AutoUpdate.csproj @@ -1,78 +1,15 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {51C02F4D-C136-4C79-B2BB-3FC80546164D} - Library - Properties - AutoUpdate - AutoUpdate - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Events/AutoUpdate/CS/ExternalApplication.cs b/SDK/Samples/Events/AutoUpdate/CS/ExternalApplication.cs index f4c4e007..7877d079 100644 --- a/SDK/Samples/Events/AutoUpdate/CS/ExternalApplication.cs +++ b/SDK/Samples/Events/AutoUpdate/CS/ExternalApplication.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/Events/AutoUpdate/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Events/AutoUpdate/CS/Properties/AssemblyInfo.cs index 4422d32e..67605dd7 100644 --- a/SDK/Samples/Events/AutoUpdate/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Events/AutoUpdate/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("AutoUpdate")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/Events/CancelSave/CS/CancelSave.cs b/SDK/Samples/Events/CancelSave/CS/CancelSave.cs index 860a6bd8..fe48ea0c 100644 --- a/SDK/Samples/Events/CancelSave/CS/CancelSave.cs +++ b/SDK/Samples/Events/CancelSave/CS/CancelSave.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -23,16 +23,14 @@ using System; using System.IO; using System.Collections.Generic; -using System.Text; -using Autodesk.Revit; using Autodesk.Revit.DB.Events; -using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using Autodesk.Revit.ApplicationServices; using Autodesk.RevitAddIns; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.CancelSave.CS { /// diff --git a/SDK/Samples/Events/CancelSave/CS/CancelSave.csproj b/SDK/Samples/Events/CancelSave/CS/CancelSave.csproj index 96632881..dc34d568 100644 --- a/SDK/Samples/Events/CancelSave/CS/CancelSave.csproj +++ b/SDK/Samples/Events/CancelSave/CS/CancelSave.csproj @@ -1,78 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {BDF1D215-55C6-4645-8232-FA4C0E3F33EE} - Library - Properties - CancelSave - CancelSave - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - 3.5 - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Events/CancelSave/CS/LogManager.cs b/SDK/Samples/Events/CancelSave/CS/LogManager.cs index 9f020854..0c1869d8 100644 --- a/SDK/Samples/Events/CancelSave/CS/LogManager.cs +++ b/SDK/Samples/Events/CancelSave/CS/LogManager.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -21,8 +21,6 @@ // using System; -using System.Collections.Generic; -using System.Text; using System.Diagnostics; using System.IO; using Autodesk.Revit.DB; diff --git a/SDK/Samples/Events/CancelSave/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Events/CancelSave/CS/Properties/AssemblyInfo.cs index fc6001be..eb840e80 100644 --- a/SDK/Samples/Events/CancelSave/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Events/CancelSave/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -10,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("CancelSave")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/Events/EventsMonitor/CS/EventsMonitor.csproj b/SDK/Samples/Events/EventsMonitor/CS/EventsMonitor.csproj index c858b643..f64ae8a1 100644 --- a/SDK/Samples/Events/EventsMonitor/CS/EventsMonitor.csproj +++ b/SDK/Samples/Events/EventsMonitor/CS/EventsMonitor.csproj @@ -1,107 +1,12 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {AEBC5F6D-38D3-407D-A92A-E0B3A4BC480E} - Library - Properties Revit.SDK.Samples.EventsMonitor.CS - EventsMonitor - v4.8 - - - - true - full - false - bin\Debug\ - TRACE;DEBUG - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - true - bin\x64\Debug\ - TRACE;DEBUG - full - x64 - prompt - MinimumRecommendedRules.ruleset + - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - EventsInfoWindows.cs - - - Form - - - EventsSettingForm.cs - - - - - - - - - EventsInfoWindows.cs - Designer - - - EventsSettingForm.cs - Designer - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Events/EventsMonitor/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Events/EventsMonitor/CS/Properties/AssemblyInfo.cs index d360bcdd..e22c1782 100644 --- a/SDK/Samples/Events/EventsMonitor/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Events/EventsMonitor/CS/Properties/AssemblyInfo.cs @@ -33,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/Events/PrintLog/CS/PrintLog.csproj b/SDK/Samples/Events/PrintLog/CS/PrintLog.csproj index 64097e3f..ca4deda6 100644 --- a/SDK/Samples/Events/PrintLog/CS/PrintLog.csproj +++ b/SDK/Samples/Events/PrintLog/CS/PrintLog.csproj @@ -1,113 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {BE595C88-8880-4497-8043-22A060ED3EB8} - Library - Properties Revit.SDK.Samples.PrintLog.CS - PrintLog - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Events/ProgressNotifier/CS/ProgressNotifier.csproj b/SDK/Samples/Events/ProgressNotifier/CS/ProgressNotifier.csproj index 71f8269f..c55adfaa 100644 --- a/SDK/Samples/Events/ProgressNotifier/CS/ProgressNotifier.csproj +++ b/SDK/Samples/Events/ProgressNotifier/CS/ProgressNotifier.csproj @@ -1,43 +1,13 @@ - - + + - Debug - AnyCPU - 8.0.30703 + true 2.0 - {297F51FB-5CDD-4A40-93A3-4C6DC4839EEE} - Library - Properties Revit.SDK.Samples.ProgressNotifier.CS - ProgressNotifier - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ProgressNotifier.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true true bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ProgressNotifier.xml true full @@ -47,7 +17,6 @@ bin\x64\Release\ - TRACE true true pdbonly @@ -55,46 +24,10 @@ prompt MinimumRecommendedRules.ruleset + OnOutputUpdated - - - - - - - - - - - - - - - - - - MainWindow.xaml - - - - - - - - MSBuild:Compile - Designer - - - - None diff --git a/SDK/Samples/Events/ProgressNotifier/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Events/ProgressNotifier/CS/Properties/AssemblyInfo.cs index 05440adc..562d6516 100644 --- a/SDK/Samples/Events/ProgressNotifier/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Events/ProgressNotifier/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -32,7 +32,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk")] [assembly: AssemblyProduct("ProgressNotifier")] -[assembly: AssemblyCopyright("Copyright © Autodesk 2011")] +[assembly: AssemblyCopyright("Copyright © Autodesk 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -43,6 +43,7 @@ using System.Runtime.InteropServices; // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("72eef2da-f613-4aea-8ac4-120481fe9d19")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] // Version information for an assembly consists of the following four values: // diff --git a/SDK/Samples/Events/SelectionChanged/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Events/SelectionChanged/CS/Properties/AssemblyInfo.cs index 7aaf2331..dd94da2a 100644 --- a/SDK/Samples/Events/SelectionChanged/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Events/SelectionChanged/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("SelectionChanged")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2021")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/Events/SelectionChanged/CS/SelectionChanged.csproj b/SDK/Samples/Events/SelectionChanged/CS/SelectionChanged.csproj index 2adc36aa..85b7eb0b 100644 --- a/SDK/Samples/Events/SelectionChanged/CS/SelectionChanged.csproj +++ b/SDK/Samples/Events/SelectionChanged/CS/SelectionChanged.csproj @@ -1,40 +1,13 @@ - - + + - Debug - AnyCPU - 9.0.30729 + true 2.0 - {7AE980F6-0CE2-42D2-B5EF-6C5EE20D0311} - Library - Properties SelectionChanged - SelectionChanged - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release - TRACE - prompt - 4 - true true bin\x64\Debug\ - DEBUG;TRACE full x64 prompt @@ -42,7 +15,6 @@ bin\x64\Release\ - TRACE true true pdbonly @@ -50,49 +22,15 @@ prompt MinimumRecommendedRules.ruleset + OnOutputUpdated - - - - - - - 3.5 - - - - - - - - InfoWindow.xaml - - - - - - - - - Designer - MSBuild:Compile - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" -if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - None + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" +if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + \ No newline at end of file diff --git a/SDK/Samples/ExportPDFSettingsSample/CS/ExportPDFSettingsSample.csproj b/SDK/Samples/ExportPDFSettingsSample/CS/ExportPDFSettingsSample.csproj index 583b920c..c750d370 100644 --- a/SDK/Samples/ExportPDFSettingsSample/CS/ExportPDFSettingsSample.csproj +++ b/SDK/Samples/ExportPDFSettingsSample/CS/ExportPDFSettingsSample.csproj @@ -1,96 +1,16 @@ - - - - - None - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {2A3251E8-790B-45D5-A680-4AE8E794FA7A} - Library - Properties - ExportPDFSettingsSample - ExportPDFSettingsSample - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ExportPDFSettingsSample.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\ExportPDFSettingsSample.XML - + + - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 true bin\Debug\ExportPDFSettingsSample.XML - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x64 true bin\Release\ExportPDFSettingsSample.XML - - OnOutputUpdated - - - - - - - - - - 4.7 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/ExtensibleStorageManager/ExtensibleStorageManager/CS/ExtensibleStorageManager.csproj b/SDK/Samples/ExtensibleStorageManager/ExtensibleStorageManager/CS/ExtensibleStorageManager.csproj index c22b1398..f2fe90d2 100644 --- a/SDK/Samples/ExtensibleStorageManager/ExtensibleStorageManager/CS/ExtensibleStorageManager.csproj +++ b/SDK/Samples/ExtensibleStorageManager/ExtensibleStorageManager/CS/ExtensibleStorageManager.csproj @@ -1,129 +1,35 @@ - - + + - Debug - AnyCPU - 9.0.30729 + true 2.0 - {D80CD23C-5D40-4BE6-8940-5CE791DEF719} - Library - Properties ExtensibleStorageManager - ExtensibleStorageManager - v4.8 - 512 - - - 3.5 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - true true bin\x64\Debug\ - DEBUG;TRACE full - x64 prompt AllRules.ruleset bin\x64\Release\ - TRACE true true pdbonly - x64 prompt AllRules.ruleset + OnOutputUpdated - - - - 3.0 - - - 3.0 - - - - 3.5 - - - - 3.5 - - - 3.5 - - - - - 3.0 - - - 3.0 - - - - - - - - - UICommand.xaml - - - UIData.xaml - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - {D5227927-E688-4996-BEEE-7DCA91A7365B} SchemaWrapperTools - - None diff --git a/SDK/Samples/ExtensibleStorageManager/ExtensibleStorageManager/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ExtensibleStorageManager/ExtensibleStorageManager/CS/Properties/AssemblyInfo.cs index cb2c351a..8a9bc614 100644 --- a/SDK/Samples/ExtensibleStorageManager/ExtensibleStorageManager/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ExtensibleStorageManager/ExtensibleStorageManager/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("ExtensibleStorageManager")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/ExtensibleStorageManager/SchemaWrapperTools/CS/SchemaWrapper.cs b/SDK/Samples/ExtensibleStorageManager/SchemaWrapperTools/CS/SchemaWrapper.cs index 8f89486d..6968d3fe 100644 --- a/SDK/Samples/ExtensibleStorageManager/SchemaWrapperTools/CS/SchemaWrapper.cs +++ b/SDK/Samples/ExtensibleStorageManager/SchemaWrapperTools/CS/SchemaWrapper.cs @@ -41,7 +41,7 @@ namespace SchemaWrapperTools /// and also provides easy serialization of schema data to xml for the user. /// [Serializable] - public class SchemaWrapper + public class SchemaWrapper : IDisposable { #region Constructors and class Factories /// @@ -154,6 +154,28 @@ namespace SchemaWrapperTools #endregion + #region IDisposable implementation + + public void Dispose() + { + // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposing || isDisposed) + return; + + (m_Schema as IDisposable)?.Dispose(); + (m_SchemaBuilder as IDisposable)?.Dispose(); + + isDisposed = true; + } + + #endregion + #region Active schema manipulation /// @@ -526,6 +548,9 @@ namespace SchemaWrapperTools [NonSerialized] private string m_xmlPath; + + [NonSerialized] + private bool isDisposed; #endregion } diff --git a/SDK/Samples/ExtensibleStorageManager/SchemaWrapperTools/CS/SchemaWrapperTools.csproj b/SDK/Samples/ExtensibleStorageManager/SchemaWrapperTools/CS/SchemaWrapperTools.csproj index e915fd78..8068db2a 100644 --- a/SDK/Samples/ExtensibleStorageManager/SchemaWrapperTools/CS/SchemaWrapperTools.csproj +++ b/SDK/Samples/ExtensibleStorageManager/SchemaWrapperTools/CS/SchemaWrapperTools.csproj @@ -1,90 +1,23 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {D5227927-E688-4996-BEEE-7DCA91A7365B} - Library - Properties - SchemaWrapperTools - SchemaWrapperTools - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - 3.5 - - - 3.5 - - - 3.5 - - - + - - - - - - - - None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ExtensibleStorageUtility/CS/DeleteStorage.cs b/SDK/Samples/ExtensibleStorageUtility/CS/DeleteStorage.cs index 636c3344..80821e4d 100644 --- a/SDK/Samples/ExtensibleStorageUtility/CS/DeleteStorage.cs +++ b/SDK/Samples/ExtensibleStorageUtility/CS/DeleteStorage.cs @@ -51,7 +51,7 @@ namespace Revit.SDK.Samples.ExtensibleStorageUtility.CS Transaction tErase = new Transaction(document, "Erase EStorage"); tErase.Start(); IList schemas = Schema.ListSchemas(); - foreach (Schema schema in schemas) + foreach (Schema schema in schemas?.Where(x => x.WriteAccessLevel == AccessLevel.Public)) { //Note-this will delete storage of this schema in *all* open documents. document.EraseSchemaAndAllEntities(schema); diff --git a/SDK/Samples/ExtensibleStorageUtility/CS/ExtensibleStorageUtility.csproj b/SDK/Samples/ExtensibleStorageUtility/CS/ExtensibleStorageUtility.csproj index ccc5d1a6..ccf873f0 100644 --- a/SDK/Samples/ExtensibleStorageUtility/CS/ExtensibleStorageUtility.csproj +++ b/SDK/Samples/ExtensibleStorageUtility/CS/ExtensibleStorageUtility.csproj @@ -1,85 +1,24 @@ - - + + - Debug - AnyCPU - 8.0.30703 - 2.0 - {A7FEE9A4-D5B5-4080-8EC8-B54FB2516805} - Library - Properties - ExtensibleStorageUtility - ExtensibleStorageUtility - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - + + - - - - - - - - None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ExternalCommand/CS/ExternalCommand.sln b/SDK/Samples/ExternalCommand/CS/ExternalCommand.sln index 64253722..1e481c4c 100644 --- a/SDK/Samples/ExternalCommand/CS/ExternalCommand.sln +++ b/SDK/Samples/ExternalCommand/CS/ExternalCommand.sln @@ -1,24 +1,36 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RevitAddInUtilitySample", "RevitAddInUtilitySample\RevitAddInUtilitySample.csproj", "{1FF1330C-F41E-4C18-9000-E78FB24F3AD5}" +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34330.188 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RevitAddInUtilitySample", "RevitAddInUtilitySample\RevitAddInUtilitySample.csproj", "{1FF1330C-F41E-4C18-9000-E78FB24F3AD5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExternalCommandRegistration", "ExternalCommandRegistration\ExternalCommandRegistration.csproj", "{60316DFC-53FD-42B4-BBCE-25FD3D337815}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExternalCommandRegistration", "ExternalCommandRegistration\ExternalCommandRegistration.csproj", "{60316DFC-53FD-42B4-BBCE-25FD3D337815}" 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 {1FF1330C-F41E-4C18-9000-E78FB24F3AD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1FF1330C-F41E-4C18-9000-E78FB24F3AD5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FF1330C-F41E-4C18-9000-E78FB24F3AD5}.Debug|x64.ActiveCfg = Debug|x64 + {1FF1330C-F41E-4C18-9000-E78FB24F3AD5}.Debug|x64.Build.0 = Debug|x64 {1FF1330C-F41E-4C18-9000-E78FB24F3AD5}.Release|Any CPU.ActiveCfg = Release|Any CPU {1FF1330C-F41E-4C18-9000-E78FB24F3AD5}.Release|Any CPU.Build.0 = Release|Any CPU + {1FF1330C-F41E-4C18-9000-E78FB24F3AD5}.Release|x64.ActiveCfg = Release|x64 + {1FF1330C-F41E-4C18-9000-E78FB24F3AD5}.Release|x64.Build.0 = Release|x64 {60316DFC-53FD-42B4-BBCE-25FD3D337815}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60316DFC-53FD-42B4-BBCE-25FD3D337815}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60316DFC-53FD-42B4-BBCE-25FD3D337815}.Debug|x64.ActiveCfg = Debug|x64 + {60316DFC-53FD-42B4-BBCE-25FD3D337815}.Debug|x64.Build.0 = Debug|x64 {60316DFC-53FD-42B4-BBCE-25FD3D337815}.Release|Any CPU.ActiveCfg = Release|Any CPU {60316DFC-53FD-42B4-BBCE-25FD3D337815}.Release|Any CPU.Build.0 = Release|Any CPU + {60316DFC-53FD-42B4-BBCE-25FD3D337815}.Release|x64.ActiveCfg = Release|x64 + {60316DFC-53FD-42B4-BBCE-25FD3D337815}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SDK/Samples/ExternalCommand/CS/ExternalCommandRegistration/ExternalCommandClass.cs b/SDK/Samples/ExternalCommand/CS/ExternalCommandRegistration/ExternalCommandClass.cs index 344afe5a..57152c4f 100644 --- a/SDK/Samples/ExternalCommand/CS/ExternalCommandRegistration/ExternalCommandClass.cs +++ b/SDK/Samples/ExternalCommand/CS/ExternalCommandRegistration/ExternalCommandClass.cs @@ -19,14 +19,12 @@ // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. // -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using Autodesk.Revit.UI; -using System.Windows.Forms; using Autodesk.Revit.DB; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.ExternalCommandRegistration.CS { /// diff --git a/SDK/Samples/ExternalCommand/CS/ExternalCommandRegistration/ExternalCommandRegistration.csproj b/SDK/Samples/ExternalCommand/CS/ExternalCommandRegistration/ExternalCommandRegistration.csproj index 0e13cb64..39c37da5 100644 --- a/SDK/Samples/ExternalCommand/CS/ExternalCommandRegistration/ExternalCommandRegistration.csproj +++ b/SDK/Samples/ExternalCommand/CS/ExternalCommandRegistration/ExternalCommandRegistration.csproj @@ -1,107 +1,24 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {60316DFC-53FD-42B4-BBCE-25FD3D337815} - Library - Properties - ExternalCommandRegistration - ExternalCommandRegistration - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - 3.5 - - - 3.5 - - - - - - - - - True - True - ExternalCommandResource.resx - - - - - - ResXFileCodeGenerator - ExternalCommandResource.Designer.cs - - - - + + + None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/Properties/AssemblyInfo.cs b/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/Properties/AssemblyInfo.cs index d5a81c42..0ba836ea 100644 --- a/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/RevitAddInUtilityForm.cs b/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/RevitAddInUtilityForm.cs index f6ef0002..300829a2 100644 --- a/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/RevitAddInUtilityForm.cs +++ b/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/RevitAddInUtilityForm.cs @@ -53,7 +53,7 @@ namespace Revit.SDK.Samples.RevitAddInUtilitySample.CS { RevitAddInManifest Manifest = new RevitAddInManifest(); - FileInfo fileInfo = new FileInfo("..\\ExternalCommandRegistration\\ExternalCommandRegistration.dll"); + FileInfo fileInfo = new FileInfo("ExternalCommandRegistration.dll"); //create an external application RevitAddInApplication application1 = new RevitAddInApplication( @@ -97,7 +97,7 @@ namespace Revit.SDK.Samples.RevitAddInUtilitySample.CS Manifest.AddInCommands.Add(command2); //save addin manifest in same place with RevitAddInUtilitySample.exe - fileInfo = new FileInfo("ExteranlCommand.Sample.addin"); + fileInfo = new FileInfo("ExternalCommand.Sample.addin"); Manifest.SaveAs(fileInfo.FullName); AddInsInfoButton_Click(null, null); //show addins information in the tree view this.AddInsInfoButton.Enabled = true; @@ -109,7 +109,7 @@ namespace Revit.SDK.Samples.RevitAddInUtilitySample.CS /// private void AddInsInfoButton_Click(object sender, EventArgs e) { - FileInfo fileInfo = new FileInfo("ExteranlCommand.Sample.addin"); + FileInfo fileInfo = new FileInfo("ExternalCommand.Sample.addin"); RevitAddInManifest revitAddInManifest = Autodesk.RevitAddIns.AddInManifestUtility.GetRevitAddInManifest(fileInfo.FullName); @@ -170,12 +170,12 @@ namespace Revit.SDK.Samples.RevitAddInUtilitySample.CS } /// - /// Open new created AddIn manifest file - ExteranlCommand.Sample.addin + /// Open new created AddIn manifest file - ExternalCommand.Sample.addin /// private void OpenAddInFileButton_Click(object sender, EventArgs e) { - FileInfo fileInfo = new FileInfo("ExteranlCommand.Sample.addin"); - Process.Start(fileInfo.FullName); + FileInfo fileInfo = new FileInfo("ExternalCommand.Sample.addin"); + Process.Start(new ProcessStartInfo { FileName = fileInfo.FullName, UseShellExecute = true }); } } } diff --git a/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/RevitAddInUtilitySample.csproj b/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/RevitAddInUtilitySample.csproj index 2b829916..653f0bac 100644 --- a/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/RevitAddInUtilitySample.csproj +++ b/SDK/Samples/ExternalCommand/CS/RevitAddInUtilitySample/RevitAddInUtilitySample.csproj @@ -1,170 +1,34 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {1FF1330C-F41E-4C18-9000-E78FB24F3AD5} WinExe - Properties - RevitAddInUtilitySample - RevitAddInUtilitySample - v4.8 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - true - - - OnOutputUpdated - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - + - - - Form - - - RevitAddInUtilityForm.cs - - - - - RevitAddInUtilityForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + + + True + + + + + True + + \ No newline at end of file diff --git a/SDK/Samples/ExternalCommand/CS/VSProps/SDKSamples.Sdk.props b/SDK/Samples/ExternalCommand/CS/VSProps/SDKSamples.Sdk.props new file mode 100644 index 00000000..ba976e93 --- /dev/null +++ b/SDK/Samples/ExternalCommand/CS/VSProps/SDKSamples.Sdk.props @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/SDK/Samples/ExternalCommand/CS/VSProps/SDKSamples.Sdk.targets b/SDK/Samples/ExternalCommand/CS/VSProps/SDKSamples.Sdk.targets new file mode 100644 index 00000000..1caae586 --- /dev/null +++ b/SDK/Samples/ExternalCommand/CS/VSProps/SDKSamples.Sdk.targets @@ -0,0 +1,19 @@ + + + + + False + $(ProjectDir)..\..\..\..\..\..\..\$(ConfigurationName)$(PlatformName)\RevitAPI.dll + False + + + $(ProjectDir)..\..\..\..\..\..\..\$(ConfigurationName)$(PlatformName)\RevitAPIUI.dll + False + + + False + $(ProjectDir)..\..\..\..\..\..\..\$(ConfigurationName)$(PlatformName)\RevitAddInUtility.dll + False + + + \ No newline at end of file diff --git a/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/ExternalResourceDBServer.csproj b/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/ExternalResourceDBServer.csproj index 56e946b3..7ca0d40b 100644 --- a/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/ExternalResourceDBServer.csproj +++ b/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/ExternalResourceDBServer.csproj @@ -1,90 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {77CE4920-1BE6-4174-88BB-2892E71ACD11} - Library - Properties Revit.SDK.Samples.ExternalResourceDBServer.CS - ExternalResourceDBServer - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ExternalResourceDBServer.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ExternalResourceDBServer.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/SampleExternalResourceDBServer.cs b/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/SampleExternalResourceDBServer.cs index 6bb5163c..50fe98ab 100644 --- a/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/SampleExternalResourceDBServer.cs +++ b/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/SampleExternalResourceDBServer.cs @@ -271,16 +271,16 @@ namespace Revit.SDK.Samples.ExternalResourceDBServer.CS // The following checks can help with testing. However, they should not be necessary, since Revit checks all input paramters // before calling this method. - if (loadRequestId == null) - throw new ArgumentNullException("loadRequestId");; + if (loadRequestId == Guid.Empty) + throw new ArgumentNullException("loadRequestId"); if (resourceType == null) - throw new ArgumentNullException("resourceType");; + throw new ArgumentNullException("resourceType"); if (resourceReference == null) - throw new ArgumentNullException("resourceReference");; + throw new ArgumentNullException("resourceReference"); if (loadContext == null) - throw new ArgumentNullException("loadContext");; + throw new ArgumentNullException("loadContext"); if (loadContent == null) - throw new ArgumentNullException("loadContent");; + throw new ArgumentNullException("loadContent"); if (!SupportsExternalResourceType(resourceType)) throw new ArgumentOutOfRangeException("resourceType", "The specified resource type is not supported by this server."); diff --git a/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/ServerInterfaceExtensionsForRevitLinks.cs b/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/ServerInterfaceExtensionsForRevitLinks.cs deleted file mode 100644 index 05176398..00000000 --- a/SDK/Samples/ExternalResourceServer/ExternalResourceDBServer/CS/ServerInterfaceExtensionsForRevitLinks.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// (C) Copyright 2003-2019 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Autodesk.Revit; -using Autodesk.Revit.DB; -namespace Revit.SDK.Samples.ExternalResourceDBServer.CS -{ - - /// - /// Extension operator to support "Open (and Unload)" command. - /// Revit will call this method to determine the location of the locally-cached copy - /// of the linked model, and will open that copy directly. - /// - //===================================================================================== - public class GetLinkPathForOpen : IGetLocalPathForOpenCallback - { - /// - /// This implementation simply retrieves the same local file name that the server - /// uses when first copying the link document to the user's machine. - /// - public string GetLocalPathForOpen(ExternalResourceReference desiredReference) - { - return SampleExternalResourceDBServer.GetFullLinkCachedFilePath(desiredReference); - } - } - - - - /// - /// Extension operator to support handle updates when the user saves new shared coordinates in the - /// local copy of a link. - /// - //===================================================================================== - public class LocalLinkSharedCoordinatesSaved : IOnLocalLinkSharedCoordinatesSavedCallback - { - /// - /// When the user updates the shared coordinates in the link model, Revit calls this - /// method. In this implementation, the updated local version of the link on the user's - /// machine is uploaded (copied) back to the server location. - /// - public void OnLocalLinkSharedCoordinatesSaved(ExternalResourceReference changedReference) - { - string localLinkPath = SampleExternalResourceDBServer.GetFullLinkCachedFilePath(changedReference); - string fullServerPath = SampleExternalResourceDBServer.GetFullServerLinkFilePath(changedReference); - String serverDirectoryName = System.IO.Path.GetDirectoryName(fullServerPath); - if (!System.IO.Directory.Exists(serverDirectoryName)) - { - System.IO.Directory.CreateDirectory(serverDirectoryName); - } - System.IO.File.Copy(localLinkPath, fullServerPath, true); // Overwrite - } - } - -} diff --git a/SDK/Samples/ExternalResourceServer/ExternalResourceUIServer/CS/ExternalResourceUIServer.csproj b/SDK/Samples/ExternalResourceServer/ExternalResourceUIServer/CS/ExternalResourceUIServer.csproj index ab1e0c2f..063393b9 100644 --- a/SDK/Samples/ExternalResourceServer/ExternalResourceUIServer/CS/ExternalResourceUIServer.csproj +++ b/SDK/Samples/ExternalResourceServer/ExternalResourceUIServer/CS/ExternalResourceUIServer.csproj @@ -1,94 +1,21 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {1BA33B5D-C64B-4AA3-A367-240A349E47FE} - Library - Properties Revit.SDK.Samples.ExternalResourceUIServer.CS - ExternalResourceUIServer - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ExternalResourceUIServer.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ExternalResourceUIServer.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - + - - - - - - - - {77ce4920-1be6-4174-88bb-2892e71acd11} - ExternalResourceDBServer - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ExternalResourceServer/ExternalResourceUIServer/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ExternalResourceServer/ExternalResourceUIServer/CS/Properties/AssemblyInfo.cs index b575d573..96d0562e 100644 --- a/SDK/Samples/ExternalResourceServer/ExternalResourceUIServer/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ExternalResourceServer/ExternalResourceUIServer/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/FabricationPartLayout/CS/ExportToPCF.cs b/SDK/Samples/FabricationPartLayout/CS/ExportToPCF.cs index 7b551008..daf77859 100644 --- a/SDK/Samples/FabricationPartLayout/CS/ExportToPCF.cs +++ b/SDK/Samples/FabricationPartLayout/CS/ExportToPCF.cs @@ -21,18 +21,17 @@ // using System; -using System.Collections.Generic; using System.Linq; -using System.Text; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Fabrication; -using System.Windows.Forms; using System.IO; using System.Reflection; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; +using TaskDialogIcon = Autodesk.Revit.UI.TaskDialogIcon; + namespace Revit.SDK.Samples.FabricationPartLayout.CS { /// diff --git a/SDK/Samples/FabricationPartLayout/CS/FabPartGeometry.cs b/SDK/Samples/FabricationPartLayout/CS/FabPartGeometry.cs index 4365dcba..bcf0c0ea 100644 --- a/SDK/Samples/FabricationPartLayout/CS/FabPartGeometry.cs +++ b/SDK/Samples/FabricationPartLayout/CS/FabPartGeometry.cs @@ -23,16 +23,16 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using Autodesk.Revit.DB.Fabrication; using System.Windows.Forms; using System.IO; using System.Reflection; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; +using TaskDialogIcon = Autodesk.Revit.UI.TaskDialogIcon; + namespace Revit.SDK.Samples.FabricationPartLayout.CS { /// diff --git a/SDK/Samples/FabricationPartLayout/CS/FabricationPartLayout.csproj b/SDK/Samples/FabricationPartLayout/CS/FabricationPartLayout.csproj index 49d482fa..249ecc33 100644 --- a/SDK/Samples/FabricationPartLayout/CS/FabricationPartLayout.csproj +++ b/SDK/Samples/FabricationPartLayout/CS/FabricationPartLayout.csproj @@ -1,115 +1,21 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {806D4F74-F72D-40C2-BA7F-4DF99980D601} - Library - Properties Revit.SDK.Samples.FabricationPartLayout.CS - FabricationPartLayout - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\FabricationPartLayout.XML - x64 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\FabricationPartLayout.XML - x64 + - true - bin\x64\Debug\ - DEBUG;TRACE bin\x64\Debug\FabricationPartLayout.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset bin\x64\Release\FabricationPartLayout.XML true - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - - - - - - - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/FabricationPartLayout/CS/PartInfo.cs b/SDK/Samples/FabricationPartLayout/CS/PartInfo.cs index 29dd0e2d..fad35c1a 100644 --- a/SDK/Samples/FabricationPartLayout/CS/PartInfo.cs +++ b/SDK/Samples/FabricationPartLayout/CS/PartInfo.cs @@ -21,17 +21,14 @@ // using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using Autodesk.Revit.DB.Fabrication; -using System.Windows.Forms; using Autodesk.Revit.UI.Selection; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.FabricationPartLayout.CS { /// diff --git a/SDK/Samples/FabricationPartLayout/CS/PartRenumber.cs b/SDK/Samples/FabricationPartLayout/CS/PartRenumber.cs index d1b601ef..cf5fec7f 100644 --- a/SDK/Samples/FabricationPartLayout/CS/PartRenumber.cs +++ b/SDK/Samples/FabricationPartLayout/CS/PartRenumber.cs @@ -22,14 +22,13 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Fabrication; -using System.Windows.Forms; + +using TaskDialog = Autodesk.Revit.UI.TaskDialog; +using TaskDialogIcon = Autodesk.Revit.UI.TaskDialogIcon; namespace Revit.SDK.Samples.FabricationPartLayout.CS { diff --git a/SDK/Samples/FabricationPartLayout/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FabricationPartLayout/CS/Properties/AssemblyInfo.cs index 2963cfdc..1af424a3 100644 --- a/SDK/Samples/FabricationPartLayout/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FabricationPartLayout/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/FamilyCreation/AutoJoin/CS/AutoJoin.csproj b/SDK/Samples/FamilyCreation/AutoJoin/CS/AutoJoin.csproj index f33122fb..c3fc31d9 100644 --- a/SDK/Samples/FamilyCreation/AutoJoin/CS/AutoJoin.csproj +++ b/SDK/Samples/FamilyCreation/AutoJoin/CS/AutoJoin.csproj @@ -1,80 +1,17 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {B0F48DFB-6DAF-4451-8E7C-2617485D7CE0} - Library - Properties - AutoJoin - AutoJoin - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyCreation/AutoParameter/CS/AutoParameter.csproj b/SDK/Samples/FamilyCreation/AutoParameter/CS/AutoParameter.csproj index 38be4f4d..c3fc31d9 100644 --- a/SDK/Samples/FamilyCreation/AutoParameter/CS/AutoParameter.csproj +++ b/SDK/Samples/FamilyCreation/AutoParameter/CS/AutoParameter.csproj @@ -1,79 +1,17 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {EE7D1F8F-8DD3-4627-A00F-12F683066A1D} - Library - Properties - AutoParameter - AutoParameter - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyCreation/CreateAirHandler/CS/Command.cs b/SDK/Samples/FamilyCreation/CreateAirHandler/CS/Command.cs index 8d43ccff..379263b8 100644 --- a/SDK/Samples/FamilyCreation/CreateAirHandler/CS/Command.cs +++ b/SDK/Samples/FamilyCreation/CreateAirHandler/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -23,7 +23,6 @@ using System; using System.Collections.Generic; -using Autodesk.Revit; using Autodesk.Revit.Creation; using Autodesk.Revit.DB; using Autodesk.Revit.UI; diff --git a/SDK/Samples/FamilyCreation/CreateAirHandler/CS/CreateAirHandler.csproj b/SDK/Samples/FamilyCreation/CreateAirHandler/CS/CreateAirHandler.csproj index ea82e3a2..0aadd9c9 100644 --- a/SDK/Samples/FamilyCreation/CreateAirHandler/CS/CreateAirHandler.csproj +++ b/SDK/Samples/FamilyCreation/CreateAirHandler/CS/CreateAirHandler.csproj @@ -1,79 +1,15 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {3251A8F4-57C3-4D4E-B5C8-6E7AC7D4E17A} - Library - Properties - CreateAirHandler - CreateAirHandler - 512 - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyCreation/CreateAirHandler/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FamilyCreation/CreateAirHandler/CS/Properties/AssemblyInfo.cs index fe8b6d33..0fb6adf5 100644 --- a/SDK/Samples/FamilyCreation/CreateAirHandler/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FamilyCreation/CreateAirHandler/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -10,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("CreateAirHandler")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/FamilyCreation/CreateTruss/CS/CreateTruss.csproj b/SDK/Samples/FamilyCreation/CreateTruss/CS/CreateTruss.csproj index 33e89f27..dc34d568 100644 --- a/SDK/Samples/FamilyCreation/CreateTruss/CS/CreateTruss.csproj +++ b/SDK/Samples/FamilyCreation/CreateTruss/CS/CreateTruss.csproj @@ -1,123 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {8D917AFE-5CCC-4FA7-91C0-CD0C216AF7A3} - Library - Properties - CreateTruss - CreateTruss - - - 2.0 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyCreation/DWGFamilyCreation/CS/DWGFamilyCreation.csproj b/SDK/Samples/FamilyCreation/DWGFamilyCreation/CS/DWGFamilyCreation.csproj index 49905c06..abe4f1f7 100644 --- a/SDK/Samples/FamilyCreation/DWGFamilyCreation/CS/DWGFamilyCreation.csproj +++ b/SDK/Samples/FamilyCreation/DWGFamilyCreation/CS/DWGFamilyCreation.csproj @@ -1,94 +1,35 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {D39B82F4-2BDA-443B-A707-4EBDE04A86FA} - Library - Properties Revit.SDK.Samples.ImportExport.CS - DWGFamilyCreation - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\DWGFamilyCreation.xml - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\DWGFamilyCreation.xml - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - + True True Resources.resx - + Designer ResXFileCodeGenerator Resources.Designer.cs - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyCreation/GenericModelCreation/CS/GenericModelCreation.csproj b/SDK/Samples/FamilyCreation/GenericModelCreation/CS/GenericModelCreation.csproj index 6f73ab0c..0c728e5b 100644 --- a/SDK/Samples/FamilyCreation/GenericModelCreation/CS/GenericModelCreation.csproj +++ b/SDK/Samples/FamilyCreation/GenericModelCreation/CS/GenericModelCreation.csproj @@ -1,128 +1,20 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {185F7159-ADCC-4459-BBC4-2C39EB64FCFF} - Library - Properties Revit.SDK.Samples.GenericModelCreation.CS - GenericModelCreation - - - - - 2.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyCreation/TypeRegeneration/CS/MessageForm.Designer.cs b/SDK/Samples/FamilyCreation/TypeRegeneration/CS/MessageForm.Designer.cs index b6ba6aa2..b5bd62d3 100644 --- a/SDK/Samples/FamilyCreation/TypeRegeneration/CS/MessageForm.Designer.cs +++ b/SDK/Samples/FamilyCreation/TypeRegeneration/CS/MessageForm.Designer.cs @@ -35,9 +35,12 @@ namespace Revit.SDK.Samples.TypeRegeneration.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (timer != null) + timer.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/FamilyCreation/TypeRegeneration/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FamilyCreation/TypeRegeneration/CS/Properties/AssemblyInfo.cs index 8c2853b2..5f99c778 100644 --- a/SDK/Samples/FamilyCreation/TypeRegeneration/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FamilyCreation/TypeRegeneration/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("TypeRegeneration")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -34,3 +34,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/FamilyCreation/TypeRegeneration/CS/TypeRegeneration.csproj b/SDK/Samples/FamilyCreation/TypeRegeneration/CS/TypeRegeneration.csproj index df182f40..d558f7d0 100644 --- a/SDK/Samples/FamilyCreation/TypeRegeneration/CS/TypeRegeneration.csproj +++ b/SDK/Samples/FamilyCreation/TypeRegeneration/CS/TypeRegeneration.csproj @@ -1,98 +1,15 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {17799695-A334-4ACD-AD5E-2869DF5743FE} - Library - Properties - TypeRegeneration - TypeRegeneration - 512 - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\TypeRegeneration.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\TypeRegeneration.XML - + + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\TypeRegeneration.XML - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE bin\Release\TypeRegeneration.XML - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - MessageForm.cs - - - - - - MessageForm.cs - Designer - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyCreation/ValidateParameters/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FamilyCreation/ValidateParameters/CS/Properties/AssemblyInfo.cs index cc9a75b9..46cd9c6a 100644 --- a/SDK/Samples/FamilyCreation/ValidateParameters/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FamilyCreation/ValidateParameters/CS/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/FamilyCreation/ValidateParameters/CS/ValidateParameters.csproj b/SDK/Samples/FamilyCreation/ValidateParameters/CS/ValidateParameters.csproj index f9ae942f..541a03a5 100644 --- a/SDK/Samples/FamilyCreation/ValidateParameters/CS/ValidateParameters.csproj +++ b/SDK/Samples/FamilyCreation/ValidateParameters/CS/ValidateParameters.csproj @@ -1,99 +1,15 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {946EF9FD-9591-4C0A-9F2B-082130915255} - Library - Properties - ValidateParameters - ValidateParameters - 512 - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ValidateParameters.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\ValidateParameters.XML - + + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ValidateParameters.XML - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE bin\Release\ValidateParameters.XML - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - MessageForm.cs - - - - - - MessageForm.cs - Designer - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/Command.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/Command.cs index e092445d..d732b048 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/Command.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/CreatAlignment.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/CreatAlignment.cs index 590d880c..18a28af8 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/CreatAlignment.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/CreatAlignment.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateDimension.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateDimension.cs index ec7ca9d4..10c41bb8 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateDimension.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateDimension.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateExtrusion.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateExtrusion.cs index 5b4ab793..54ea5fda 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateExtrusion.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateExtrusion.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateReferencePlane.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateReferencePlane.cs index 89c31480..a507d966 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateReferencePlane.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/CreateReferencePlane.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/DoubleHungWinCreation.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/DoubleHungWinCreation.cs index 4a63366d..59d8eb43 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/DoubleHungWinCreation.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/DoubleHungWinCreation.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/GeoHelper.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/GeoHelper.cs index b8841c33..73268e51 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/GeoHelper.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/GeoHelper.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/Properties/AssemblyInfo.cs index 8c2853b2..5f99c778 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("TypeRegeneration")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -34,3 +34,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/Utility.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/Utility.cs index 65f953db..0ab22f71 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/Utility.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/Utility.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/ValidateWindowParameter.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/ValidateWindowParameter.cs index b33721b7..01bfbc73 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/ValidateWindowParameter.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/ValidateWindowParameter.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowCreation.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowCreation.cs index 640b27e1..9cf2869b 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowCreation.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowCreation.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowParameter.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowParameter.cs index b94ec009..1799b904 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowParameter.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowParameter.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowWizard.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowWizard.cs index 0e527f0d..03261ed5 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowWizard.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowWizard.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowWizard.csproj b/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowWizard.csproj index ed915ef1..0d93e78e 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowWizard.csproj +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/WindowWizard.csproj @@ -1,108 +1,23 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {4E7A12AC-56C6-4A73-8F03-404FAB98CC06} - Library - Properties - WindowWizard - WindowWizard - 512 - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\WindowWizard.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\WindowWizard.XML - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - - - - - - - - - - Form - - - WizardUI.cs - - - WizardUI.cs - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/WizardUI.Designer.cs b/SDK/Samples/FamilyCreation/WindowWizard/CS/WizardUI.Designer.cs index 18160ab4..9107edfb 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/WizardUI.Designer.cs +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/WizardUI.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -35,10 +35,19 @@ namespace Revit.SDK.Samples.WindowWizard.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); - } + if(components != null) + components.Dispose(); + if (bindSource != null) + bindSource.Dispose(); + if (m_newTip != null) + m_newTip.Dispose(); + if (m_copyTip != null) + m_copyTip.Dispose(); + if (m_errorTip != null) + m_errorTip.Dispose(); + } base.Dispose(disposing); } diff --git a/SDK/Samples/FamilyCreation/WindowWizard/CS/WizardUI.resx b/SDK/Samples/FamilyCreation/WindowWizard/CS/WizardUI.resx index 3216cd68..e9e0f112 100644 --- a/SDK/Samples/FamilyCreation/WindowWizard/CS/WizardUI.resx +++ b/SDK/Samples/FamilyCreation/WindowWizard/CS/WizardUI.resx @@ -116,19 +116,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step3_MemberSizes - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel1 - - - 0 - + 252, 12 @@ -155,54 +143,6 @@ 6 - - Step3_DiagonalsLable - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step3_MemberSizes - - - 0 - - - Step3_TopChordLable - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step3_MemberSizes - - - 1 - - - m_WinType - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step3_MemberSizes - - - 2 - - - m_unitSys - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step3_MemberSizes - - - 3 - 14, 16 @@ -381,78 +321,6 @@ 3 - - InputPathLabel - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step1_Steps - - - 0 - - - WindowPropertyLabel - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step1_Steps - - - 1 - - - InputDimensionLabel - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step1_Steps - - - 2 - - - Step1_HelpLable - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step1_Steps - - - 3 - - - Step1_HelpButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step1_Steps - - - 4 - - - SelectTypeLabel - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Step1_Steps - - - 5 - 13, 28 @@ -910,18 +778,6 @@ 11 - - groupBox1 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 0 - 253, 12 @@ -943,114 +799,6 @@ 5 - - button_duplicateType - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 0 - - - button_newType - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 1 - - - m_sillHeight - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 2 - - - m_inset - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 3 - - - m_width - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 4 - - - m_height - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 5 - - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 6 - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 7 - - - label4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 8 - 14, 13 @@ -1324,18 +1072,6 @@ 8 - - groupBox2 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel3 - - - 0 - 252, 12 @@ -1357,54 +1093,6 @@ 7 - - label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox2 - - - 0 - - - m_sashMat - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox2 - - - 1 - - - label11 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox2 - - - 2 - - - m_glassMat - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox2 - - - 3 - 14, 13 diff --git a/SDK/Samples/FamilyParametersOrder/CS/FamilyParametersOrder.csproj b/SDK/Samples/FamilyParametersOrder/CS/FamilyParametersOrder.csproj index fc5debb4..945bcb86 100644 --- a/SDK/Samples/FamilyParametersOrder/CS/FamilyParametersOrder.csproj +++ b/SDK/Samples/FamilyParametersOrder/CS/FamilyParametersOrder.csproj @@ -1,108 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {D56B1276-07D2-4025-868E-8E7BC3BC539F} - Library - Properties Revit.SDK.Samples.FamilyParametersOrder.CS - FamilyParametersOrder - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\FamilyParametersOrder.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\FamilyParametersOrder.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - Form - - - SortFamilyFilesParamsForm.cs - - - Form - - - SortLoadedFamiliesParamsForm.cs - - - - - - SortFamilyFilesParamsForm.cs - - - SortLoadedFamiliesParamsForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FamilyParametersOrder/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FamilyParametersOrder/CS/Properties/AssemblyInfo.cs index 5757ede2..72359f1a 100644 --- a/SDK/Samples/FamilyParametersOrder/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FamilyParametersOrder/CS/Properties/AssemblyInfo.cs @@ -21,7 +21,6 @@ // using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -53,3 +52,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/FamilyParametersOrder/CS/SortFamilyFilesParamsForm.cs b/SDK/Samples/FamilyParametersOrder/CS/SortFamilyFilesParamsForm.cs index 15ad4678..3ffb5594 100644 --- a/SDK/Samples/FamilyParametersOrder/CS/SortFamilyFilesParamsForm.cs +++ b/SDK/Samples/FamilyParametersOrder/CS/SortFamilyFilesParamsForm.cs @@ -21,19 +21,15 @@ // using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.IO; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.FamilyParametersOrder.CS { /// diff --git a/SDK/Samples/FamilyParametersOrder/CS/SortLoadedFamiliesParamsForm.cs b/SDK/Samples/FamilyParametersOrder/CS/SortLoadedFamiliesParamsForm.cs index 4deaa229..3270a0db 100644 --- a/SDK/Samples/FamilyParametersOrder/CS/SortLoadedFamiliesParamsForm.cs +++ b/SDK/Samples/FamilyParametersOrder/CS/SortLoadedFamiliesParamsForm.cs @@ -22,17 +22,12 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; using Autodesk.Revit.DB; -using Autodesk.Revit.UI; + +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.FamilyParametersOrder.CS { diff --git a/SDK/Samples/FindReferencesByDirection/FindColumns/CS/FindColumns.cs b/SDK/Samples/FindReferencesByDirection/FindColumns/CS/FindColumns.cs index beb05107..23487315 100644 --- a/SDK/Samples/FindReferencesByDirection/FindColumns/CS/FindColumns.cs +++ b/SDK/Samples/FindReferencesByDirection/FindColumns/CS/FindColumns.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FindReferencesByDirection/FindColumns/CS/FindColumns.csproj b/SDK/Samples/FindReferencesByDirection/FindColumns/CS/FindColumns.csproj index cfbd2e9d..a09b19a2 100644 --- a/SDK/Samples/FindReferencesByDirection/FindColumns/CS/FindColumns.csproj +++ b/SDK/Samples/FindReferencesByDirection/FindColumns/CS/FindColumns.csproj @@ -1,122 +1,22 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {E649C439-646C-4E9F-A103-DA63DCC7FAE3} - Library - Properties Revit.SDK.Samples.FindColumns.CS - FindColumns - - - 2.0 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + + true + 1.0.0.0 - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - + None diff --git a/SDK/Samples/FindReferencesByDirection/MeasureHeight/CS/MeasureHeight.cs b/SDK/Samples/FindReferencesByDirection/MeasureHeight/CS/MeasureHeight.cs index 0d8ebd17..c0c90d54 100644 --- a/SDK/Samples/FindReferencesByDirection/MeasureHeight/CS/MeasureHeight.cs +++ b/SDK/Samples/FindReferencesByDirection/MeasureHeight/CS/MeasureHeight.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FindReferencesByDirection/MeasureHeight/CS/MeasureHeight.csproj b/SDK/Samples/FindReferencesByDirection/MeasureHeight/CS/MeasureHeight.csproj index 876e2822..ba209de1 100644 --- a/SDK/Samples/FindReferencesByDirection/MeasureHeight/CS/MeasureHeight.csproj +++ b/SDK/Samples/FindReferencesByDirection/MeasureHeight/CS/MeasureHeight.csproj @@ -1,124 +1,25 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {02A9B46A-9B61-43D7-87D9-4176CC730997} - Library - Properties Revit.SDK.Samples.MeasureHeight.CS - MeasureHeight - - - 2.0 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + + true + 1.0.0.0 - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/Properties/AssemblyInfo.cs index bcbe0955..56f118fb 100644 --- a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("RayTraceBounce")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -33,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounce.cs b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounce.cs index 1f2c93b8..f5cd2af6 100644 --- a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounce.cs +++ b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounce.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -33,6 +33,8 @@ using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.RayTraceBounce.CS { /// diff --git a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounce.csproj b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounce.csproj index 569960ef..60dfb6e3 100644 --- a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounce.csproj +++ b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounce.csproj @@ -1,150 +1,12 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {73D0EC8C-8494-4A60-B54F-CD8AE698874B} - Library - Properties - RayTraceBounce - RayTraceBounce - - - - - 2.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - True - True - Resources.resx - - - Form - - - RayTraceBounceForm.cs - - - - - Designer - ResXFileCodeGenerator - Resources.Designer.cs - - - RayTraceBounceForm.cs - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounceForm.Designer.cs b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounceForm.Designer.cs index 0bad1c95..8912217a 100644 --- a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounceForm.Designer.cs +++ b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounceForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounceForm.cs b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounceForm.cs index 43dde303..685e4450 100644 --- a/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounceForm.cs +++ b/SDK/Samples/FindReferencesByDirection/RaytraceBounce/CS/RayTraceBounceForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,18 +22,14 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; using System.Diagnostics; using System.IO; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.RayTraceBounce.CS { /// diff --git a/SDK/Samples/FireRating/VB.NET/ExportFireRating.vb b/SDK/Samples/FireRating/VB.NET/ExportFireRating.vb index a41a11b2..3499cacb 100644 --- a/SDK/Samples/FireRating/VB.NET/ExportFireRating.vb +++ b/SDK/Samples/FireRating/VB.NET/ExportFireRating.vb @@ -109,7 +109,7 @@ Public Class ExportFireRating ' category that is sent to Excel by this sample Function LaunchExcel() As MsExcel.Application - Dim excel As MsExcel.Application = New MsExcel.ApplicationClass() + Dim excel As MsExcel.Application = New MsExcel.Application() If (excel Is Nothing) Then Return Nothing diff --git a/SDK/Samples/FireRating/VB.NET/FireRating.vbproj b/SDK/Samples/FireRating/VB.NET/FireRating.vbproj index 749f0199..906c9227 100644 --- a/SDK/Samples/FireRating/VB.NET/FireRating.vbproj +++ b/SDK/Samples/FireRating/VB.NET/FireRating.vbproj @@ -1,155 +1,34 @@ - - + Local - 9.0.30729 - 2.0 - {AE99AD71-0EFA-40E3-B37C-90F7E949220B} - Debug - AnyCPU - - - - - FireRating - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.FireRating.VB.NET - - - - Windows - - - v4.8 - - - - bin\ - FireRating.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full - - - bin\ - FireRating.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - FireRating.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - FireRating.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset + + false + - - False - .\Microsoft.Office.Interop.Excel.dll - True - - - System - - - System.Data - - - - System.XML - - - 3.5 - + + tlbimp + 9 + 1 + 00020813-0000-0000-c000-000000000046 + 0 + false + true + - - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FireRating/VB.NET/ImportFireRating.vb b/SDK/Samples/FireRating/VB.NET/ImportFireRating.vb index 67d098ed..3f5d8cb9 100644 --- a/SDK/Samples/FireRating/VB.NET/ImportFireRating.vb +++ b/SDK/Samples/FireRating/VB.NET/ImportFireRating.vb @@ -52,7 +52,7 @@ Public Class ImportFireRating Public Function Execute(ByVal commandData As ExternalCommandData, ByRef message As String, ByVal elements As Autodesk.Revit.DB.ElementSet) As Autodesk.Revit.UI.Result Implements Autodesk.Revit.UI.IExternalCommand.Execute 'Dim excel As Microsoft.Office.Interop.Excel.Application = New Microsoft.Office.Interop.Excel.ApplicationClass() - Dim excel As MsExcel.Application = New MsExcel.ApplicationClass() + Dim excel As MsExcel.Application = New MsExcel.Application() If (excel Is Nothing) Then message = "Failed to launch excel" @@ -84,8 +84,8 @@ Public Class ImportFireRating idLong = value fireRateDouble = fireRatingValue Catch ex As Exception - TaskDialog.Show("Revit", ex.ToString) - End Try + UI.TaskDialog.Show("Revit", ex.ToString) + End Try Dim elementId As Autodesk.Revit.DB.ElementId = New Autodesk.Revit.DB.ElementId(idLong) diff --git a/SDK/Samples/FireRating/VB.NET/Microsoft.Office.Interop.Excel.dll b/SDK/Samples/FireRating/VB.NET/Microsoft.Office.Interop.Excel.dll deleted file mode 100644 index bc1f5cd7..00000000 Binary files a/SDK/Samples/FireRating/VB.NET/Microsoft.Office.Interop.Excel.dll and /dev/null differ diff --git a/SDK/Samples/FoundationSlab/CS/FoundationSlab.csproj b/SDK/Samples/FoundationSlab/CS/FoundationSlab.csproj index 5799de7f..3fac7442 100644 --- a/SDK/Samples/FoundationSlab/CS/FoundationSlab.csproj +++ b/SDK/Samples/FoundationSlab/CS/FoundationSlab.csproj @@ -1,99 +1,15 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {53D3114D-D1C7-4C70-825B-CA28AE8FFE1D} - Library - Properties Revit.SDK.Samples.FoundationSlab.CS - FoundationSlab - false - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900;-Microsoft.Reliability#CA2000;-Microsoft.Reliability#CA2002;-Microsoft.Reliability#CA2003;-Microsoft.Reliability#CA2004;-Microsoft.Reliability#CA2006 - false - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900;-Microsoft.Reliability#CA2000;-Microsoft.Reliability#CA2002;-Microsoft.Reliability#CA2003;-Microsoft.Reliability#CA2004;-Microsoft.Reliability#CA2006 - prompt - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - FoundationSlabForm.cs - - - - - - - - Designer - FoundationSlabForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FoundationSlab/CS/FoundationSlabForm.Designer.cs b/SDK/Samples/FoundationSlab/CS/FoundationSlabForm.Designer.cs index 30299b01..a1e94c20 100644 --- a/SDK/Samples/FoundationSlab/CS/FoundationSlabForm.Designer.cs +++ b/SDK/Samples/FoundationSlab/CS/FoundationSlabForm.Designer.cs @@ -35,9 +35,13 @@ namespace Revit.SDK.Samples.FoundationSlab.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + components?.Dispose(); + selectedColumn?.Dispose(); + markColumn?.Dispose(); + levelNameColumn?.Dispose(); + slabTypeNameColumn?.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/FoundationSlab/CS/FoundationSlabForm.cs b/SDK/Samples/FoundationSlab/CS/FoundationSlabForm.cs index 77cb9c48..d92ccd0f 100644 --- a/SDK/Samples/FoundationSlab/CS/FoundationSlabForm.cs +++ b/SDK/Samples/FoundationSlab/CS/FoundationSlabForm.cs @@ -21,11 +21,6 @@ // using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; namespace Revit.SDK.Samples.FoundationSlab.CS diff --git a/SDK/Samples/FoundationSlab/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FoundationSlab/CS/Properties/AssemblyInfo.cs index 87fe5ffb..9b04036d 100644 --- a/SDK/Samples/FoundationSlab/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FoundationSlab/CS/Properties/AssemblyInfo.cs @@ -21,7 +21,6 @@ // using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -55,3 +54,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/FoundationSlab/CS/RegularSlab.cs b/SDK/Samples/FoundationSlab/CS/RegularSlab.cs index 1d86db98..9a65cf4d 100644 --- a/SDK/Samples/FoundationSlab/CS/RegularSlab.cs +++ b/SDK/Samples/FoundationSlab/CS/RegularSlab.cs @@ -33,7 +33,7 @@ namespace Revit.SDK.Samples.FoundationSlab.CS /// /// A class of regular slab. /// - public class RegularSlab + public class RegularSlab : IDisposable { bool m_selected = true; // Be selected or not. string m_mark; // The mark of the slab. @@ -187,5 +187,19 @@ namespace Revit.SDK.Samples.FoundationSlab.CS return true; } + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + ((IDisposable)m_maxBBox)?.Dispose(); + ((IDisposable)m_octagonalProfile)?.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/SDK/Samples/FrameBuilder/CS/CreateFrameForm.cs b/SDK/Samples/FrameBuilder/CS/CreateFrameForm.cs index d86d03c3..229cccb9 100644 --- a/SDK/Samples/FrameBuilder/CS/CreateFrameForm.cs +++ b/SDK/Samples/FrameBuilder/CS/CreateFrameForm.cs @@ -23,16 +23,12 @@ namespace Revit.SDK.Samples.FrameBuilder.CS { using System; - using System.Collections.Generic; using System.ComponentModel; - using System.Drawing; - using System.Text; using System.Diagnostics; using System.Windows.Forms; using System.Reflection; - using Autodesk.Revit.DB; - using Autodesk.Revit.UI; + using TaskDialog = Autodesk.Revit.UI.TaskDialog; /// /// main form to create framing diff --git a/SDK/Samples/FrameBuilder/CS/DuplicateTypeForm.cs b/SDK/Samples/FrameBuilder/CS/DuplicateTypeForm.cs index 598c9c1f..f103c222 100644 --- a/SDK/Samples/FrameBuilder/CS/DuplicateTypeForm.cs +++ b/SDK/Samples/FrameBuilder/CS/DuplicateTypeForm.cs @@ -23,14 +23,10 @@ namespace Revit.SDK.Samples.FrameBuilder.CS { using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Drawing; - using System.Text; using System.Windows.Forms; using Autodesk.Revit.DB; - using Autodesk.Revit.UI; + using TaskDialog = Autodesk.Revit.UI.TaskDialog; /// /// form to duplicate FamilySymbol and edit its name and parameters diff --git a/SDK/Samples/FrameBuilder/CS/FrameBuilder.csproj b/SDK/Samples/FrameBuilder/CS/FrameBuilder.csproj index 74547038..ad12894a 100644 --- a/SDK/Samples/FrameBuilder/CS/FrameBuilder.csproj +++ b/SDK/Samples/FrameBuilder/CS/FrameBuilder.csproj @@ -1,138 +1,13 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {FCA4DD1E-1C51-4B45-B0E1-95FEFC077548} - Library - Properties Revit.SDK.Samples.FrameBuilder.CS - FrameBuilder - - - - - - - - - v4.8 - - - - - 3.5 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - Migrated rules for FrameBuilder.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - true - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - Migrated rules for FrameBuilder.ruleset + - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt AllRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - CreateFrameForm.cs - - - Form - - - EditTypeNameForm.cs - - - Form - - - DuplicateTypeForm.cs - - - - - - - - - - - Designer - CreateFrameForm.cs - - - Designer - EditTypeNameForm.cs - - - Designer - DuplicateTypeForm.cs - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FrameBuilder/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FrameBuilder/CS/Properties/AssemblyInfo.cs index e3c0f86d..60ece681 100644 --- a/SDK/Samples/FrameBuilder/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FrameBuilder/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/FreeFormElement/CS/FreeFormElement.csproj b/SDK/Samples/FreeFormElement/CS/FreeFormElement.csproj index 29a33c33..b268d48f 100644 --- a/SDK/Samples/FreeFormElement/CS/FreeFormElement.csproj +++ b/SDK/Samples/FreeFormElement/CS/FreeFormElement.csproj @@ -1,109 +1,26 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {B0D3B3DA-011A-4215-B06D-E83914C2C237} - Library - Properties Revit.SDK.Samples.FreeFormElement.CS - FreeFormElement - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\FreeFormElement.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\FreeFormElement.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - - 3.5 - - - - - - - - - - True - True - Resources.resx - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - Generic Model.rft Always - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/FreeFormElement/CS/Properties/AssemblyInfo.cs b/SDK/Samples/FreeFormElement/CS/Properties/AssemblyInfo.cs index a20905df..a7f4557a 100644 --- a/SDK/Samples/FreeFormElement/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/FreeFormElement/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/GenerateFloor/CS/GenerateFloor.csproj b/SDK/Samples/GenerateFloor/CS/GenerateFloor.csproj index 2123e470..8f00d8b3 100644 --- a/SDK/Samples/GenerateFloor/CS/GenerateFloor.csproj +++ b/SDK/Samples/GenerateFloor/CS/GenerateFloor.csproj @@ -1,102 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {5B8D8333-3FD7-44AE-860D-41C7685C5A6B} - Library - Properties - GenerateFloor - GenerateFloor - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - GenerateFloorForm.cs - - - - - - Designer - GenerateFloorForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/GenerateFloor/CS/Properties/AssemblyInfo.cs b/SDK/Samples/GenerateFloor/CS/Properties/AssemblyInfo.cs index 2524c671..7d4ce72d 100644 --- a/SDK/Samples/GenerateFloor/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/GenerateFloor/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/GenericStructuralConnection/CS/DetailedStructuralConnectionOps.cs b/SDK/Samples/GenericStructuralConnection/CS/DetailedStructuralConnectionOps.cs index 60c99cda..ce36026e 100644 --- a/SDK/Samples/GenericStructuralConnection/CS/DetailedStructuralConnectionOps.cs +++ b/SDK/Samples/GenericStructuralConnection/CS/DetailedStructuralConnectionOps.cs @@ -276,7 +276,7 @@ namespace Revit.SDK.Samples.GenericStructuralConnection.CS Schema schema = null; Guid guid = GetConnectionHandlerTypeGuid(connection, doc); - if (guid != null && guid != Guid.Empty) + if (guid != Guid.Empty) schema = Schema.ListSchemas().Where(x => x.GUID == guid).FirstOrDefault(); return schema; @@ -298,7 +298,7 @@ namespace Revit.SDK.Samples.GenericStructuralConnection.CS return Guid.Empty; StructuralConnectionHandlerType connType = (StructuralConnectionHandlerType)doc.GetElement(typeId); - if (connType == null || connType.ConnectionGuid == null) + if (connType == null) return Guid.Empty; return connType.ConnectionGuid; diff --git a/SDK/Samples/GenericStructuralConnection/CS/GenericStructuralConnection.csproj b/SDK/Samples/GenericStructuralConnection/CS/GenericStructuralConnection.csproj index c07671fc..edda4290 100644 --- a/SDK/Samples/GenericStructuralConnection/CS/GenericStructuralConnection.csproj +++ b/SDK/Samples/GenericStructuralConnection/CS/GenericStructuralConnection.csproj @@ -1,111 +1,20 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {2B65D97C-DEED-4FFF-9E02-03B6BB6BEF2A} - Library - Properties Revit.SDK.Samples.GenericStructuralConnection.CS - GenericStructuralConnection - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\GenericStructuralConnection.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\GenericStructuralConnection.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - Form - - - StructuralConnectionForm.cs - - - - - - - - - StructuralConnectionForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/GenericStructuralConnection/CS/Properties/AssemblyInfo.cs b/SDK/Samples/GenericStructuralConnection/CS/Properties/AssemblyInfo.cs index f305770f..79b990c2 100644 --- a/SDK/Samples/GenericStructuralConnection/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/GenericStructuralConnection/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/Application.cs b/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/Application.cs index 12a69d1c..13ef14b8 100644 --- a/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/Application.cs +++ b/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/Application.cs @@ -36,6 +36,7 @@ using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.ApplicationServices; +using System.Runtime.Versioning; namespace Revit.SDK.Samples.BRepBuilderExample.CS { @@ -77,6 +78,7 @@ namespace Revit.SDK.Samples.BRepBuilderExample.CS IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); + } void createRibbonButtons(UIControlledApplication application) diff --git a/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/BRepBuilderExample.csproj b/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/BRepBuilderExample.csproj index 6a56a1dd..4352ffcd 100644 --- a/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/BRepBuilderExample.csproj +++ b/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/BRepBuilderExample.csproj @@ -1,102 +1,16 @@ - - + - - None - - - - - Debug - AnyCPU 9.0.30729 - 2.0 - {64730D77-160D-4DA4-9708-66FDD4CAF8FE} - Library - Properties Revit.SDK.Samples.BRepBuilderExample.CS - BRepBuilderExample - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\BRepBuilderExample.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - OnOutputUpdated + true + - - - - - - - - - - - - 4.5.2 - - - - - + - - - - - - - - True - True - Resources.resx - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/Properties/AssemblyInfo.cs b/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/Properties/AssemblyInfo.cs index 4cb0ce91..1ff7c090 100644 --- a/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/GeometryAPI/BRepBuilderExample/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/Command.cs b/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/Command.cs index 4ec89ab8..e9eb7b8f 100644 --- a/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/Command.cs +++ b/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/ComputedSymbolGeometry.cs b/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/ComputedSymbolGeometry.cs index 7aaaf388..351f0314 100644 --- a/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/ComputedSymbolGeometry.cs +++ b/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/ComputedSymbolGeometry.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/ComputedSymbolGeometry.csproj b/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/ComputedSymbolGeometry.csproj index e5c9fc64..cb4c9ef1 100644 --- a/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/ComputedSymbolGeometry.csproj +++ b/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/ComputedSymbolGeometry.csproj @@ -1,78 +1,15 @@ - - + + - Debug - AnyCPU - 9.0.30729 - 2.0 - {40B42DD4-B031-4F67-B4DF-032E93564603} - Library - Properties - ComputedSymbolGeometry - ComputedSymbolGeometry - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - + None diff --git a/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/Properties/AssemblyInfo.cs b/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/Properties/AssemblyInfo.cs index 407d62f3..ca3229b1 100644 --- a/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/GeometryAPI/ComputedSymbolGeometry/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -10,7 +9,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("ComputedSymbolGeometry")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2011")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/Command.cs b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/Command.cs index 339394f0..230d5494 100644 --- a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/Command.cs +++ b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -65,24 +65,25 @@ namespace Revit.SDK.Samples.EnergyAnalysisModel.CS Transaction trans = new Transaction(commandData.Application.ActiveUIDocument.Document, "Revit.SDK.Samples.EnergyAnalysisModel"); trans.Start(); // Create an object that is responsible for collecting users inputs and getting analysis data of current model. - EnergyAnalysisModel analysisModel = new EnergyAnalysisModel(commandData.Application.ActiveUIDocument.Document); - - // Create the UI for users inputs options and view analysis models. - using (OptionsAndAnalysisForm form = new OptionsAndAnalysisForm(analysisModel)) + using (EnergyAnalysisModel analysisModel = new EnergyAnalysisModel(commandData.Application.ActiveUIDocument.Document)) { - // make analysis data ready - analysisModel.Initialize(); - // show dialog to browser analysis model - if (DialogResult.OK != form.ShowDialog()) - { - trans.RollBack(); - return Result.Cancelled; - } + // Create the UI for users inputs options and view analysis models. + using (OptionsAndAnalysisForm form = new OptionsAndAnalysisForm(analysisModel)) + { + // make analysis data ready + analysisModel.Initialize(); + // show dialog to browser analysis model + if (DialogResult.OK != form.ShowDialog()) + { + trans.RollBack(); + return Result.Cancelled; + } + } + trans.Commit(); + return Result.Succeeded; } - trans.Commit(); - return Result.Succeeded; - } + } - #endregion - } + #endregion + } } \ No newline at end of file diff --git a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/EnergyAnalysisModel.cs b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/EnergyAnalysisModel.cs index c8d95618..42352b9e 100644 --- a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/EnergyAnalysisModel.cs +++ b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/EnergyAnalysisModel.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -32,27 +32,18 @@ using Autodesk.Revit.DB.Structure; namespace Revit.SDK.Samples.EnergyAnalysisModel.CS { - public class EnergyAnalysisModel + public class EnergyAnalysisModel : IDisposable { // An EnergyAnalysisDetailModel member that can get all analysis data includes surfaces, spaces and openings. private EnergyAnalysisDetailModel m_energyAnalysisDetailModel; + // Options for Energy Analysis process - private EnergyAnalysisDetailModelOptions m_options; + public EnergyAnalysisDetailModelOptions m_options; + // revit document private Document RevitDoc; - - // Options Property - public EnergyAnalysisDetailModelOptions Options - { - get - { - return m_options; - } - set - { - m_options = value; - } - } + + private bool disposedValue; /// /// Constructor @@ -61,7 +52,7 @@ namespace Revit.SDK.Samples.EnergyAnalysisModel.CS public EnergyAnalysisModel(Document doc) { RevitDoc = doc; - m_options = new EnergyAnalysisDetailModelOptions(); + this.m_options = new EnergyAnalysisDetailModelOptions(); } /// @@ -231,13 +222,33 @@ namespace Revit.SDK.Samples.EnergyAnalysisModel.CS m_options.Tier = EnergyAnalysisDetailModelTier.NotComputed; break; case "SecondLevelBoundaries": - m_options.Tier = Autodesk.Revit.DB.Analysis.EnergyAnalysisDetailModelTier.SecondLevelBoundaries; + m_options.Tier = EnergyAnalysisDetailModelTier.SecondLevelBoundaries; break; // the default Tier is SecondLevelBoundaries default: - m_options.Tier = Autodesk.Revit.DB.Analysis.EnergyAnalysisDetailModelTier.SecondLevelBoundaries; + m_options.Tier = EnergyAnalysisDetailModelTier.SecondLevelBoundaries; break; } } + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + m_options?.Dispose(); + m_energyAnalysisDetailModel?.Dispose(); + } + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/EnergyAnalysisModel.csproj b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/EnergyAnalysisModel.csproj index 1cbe55bb..95553a92 100644 --- a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/EnergyAnalysisModel.csproj +++ b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/EnergyAnalysisModel.csproj @@ -1,96 +1,20 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {028B7EED-3CAE-4D38-9254-82B2F7083CA4} - Library - Properties - EnergyAnalysisModel - EnergyAnalysisModel - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - 3.5 - - - - - - - Form - - - OptionsAndAnalysisForm.cs - - - OptionsAndAnalysisForm.cs - - + None diff --git a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/OptionsAndAnalysisForm.cs b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/OptionsAndAnalysisForm.cs index 8d0596b6..541e3c71 100644 --- a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/OptionsAndAnalysisForm.cs +++ b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/OptionsAndAnalysisForm.cs @@ -33,7 +33,7 @@ namespace Revit.SDK.Samples.EnergyAnalysisModel.CS { public partial class OptionsAndAnalysisForm : Form { - EnergyAnalysisModel m_model = null; + EnergyAnalysisModel m_model; public OptionsAndAnalysisForm(EnergyAnalysisModel analysisModel) { m_model = analysisModel; @@ -45,9 +45,9 @@ namespace Revit.SDK.Samples.EnergyAnalysisModel.CS { // get UI input of options m_model.SetTier(this.comboBoxTier.SelectedText); - m_model.Options.ExportMullions = this.checkBoxExportMullions.Checked; - m_model.Options.IncludeShadingSurfaces = this.checkBoxIncludeShadingSurfaces.Checked; - m_model.Options.SimplifyCurtainSystems = this.checkBoxSimplifyCurtainSystems.Checked; + m_model.m_options.ExportMullions = this.checkBoxExportMullions.Checked; + m_model.m_options.IncludeShadingSurfaces = this.checkBoxIncludeShadingSurfaces.Checked; + m_model.m_options.SimplifyCurtainSystems = this.checkBoxSimplifyCurtainSystems.Checked; m_model.Initialize(); m_model.RefreshAnalysisData(treeViewAnalyticalData); diff --git a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/Properties/AssemblyInfo.cs b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/Properties/AssemblyInfo.cs index eaa82eb8..468982ed 100644 --- a/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/GeometryAPI/EnergyAnalysisModel/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("EnergyAnalysisModel")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2011")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -34,3 +34,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/GeometryAPI/GeometryCreation_BooleanOperation/CS/GeometryCreation_BooleanOperation.csproj b/SDK/Samples/GeometryAPI/GeometryCreation_BooleanOperation/CS/GeometryCreation_BooleanOperation.csproj index a72ba782..7220c45b 100644 --- a/SDK/Samples/GeometryAPI/GeometryCreation_BooleanOperation/CS/GeometryCreation_BooleanOperation.csproj +++ b/SDK/Samples/GeometryAPI/GeometryCreation_BooleanOperation/CS/GeometryCreation_BooleanOperation.csproj @@ -1,128 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {2C458098-01F5-40CA-90F5-3368CF8EB6BD} - Library - Properties Revit.SDK.Samples.GeometryCreation_BooleanOperation.CS - GeometryCreation_BooleanOperation - - - v4.8 - - - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\GeometryCreation_BooleanOperation.xml - GeometryCreation_BooleanOperation.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - GeometryCreation_BooleanOperation.ruleset - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\GeometryCreation_BooleanOperation.xml - full - x64 - prompt - GeometryCreation_BooleanOperation.ruleset - - - bin\x64\Release\ - TRACE - true - true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated + + true + MinimumRecommendedRules.ruleset - - - - - - - - - 3.5 - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/Command.cs b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/Command.cs index 0e381a8f..a339be28 100644 --- a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/Command.cs +++ b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/Command.cs @@ -70,8 +70,8 @@ namespace Revit.SDK.Samples.ProximityDetection_WallJoinControl.CS WallJoinControl walljoinControl = WallJoinControl.getInstance(application, document); // Create the UI for users select operation and view the results. - using (ProximityDetectionAndWallJoinControlForm form = - new ProximityDetectionAndWallJoinControlForm(document, proximityDetection, walljoinControl)) + using (PrxmtDtctnWallJoinControl form = + new PrxmtDtctnWallJoinControl(document, proximityDetection, walljoinControl)) { // show dialog to browser operations and results if (DialogResult.OK != form.ShowDialog()) diff --git a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/Properties/AssemblyInfo.cs b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/Properties/AssemblyInfo.cs index 9a7a7f7e..6af2faa9 100644 --- a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetection_WallJoinControl.csproj b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetection_WallJoinControl.csproj index e26d1c82..f2636f14 100644 --- a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetection_WallJoinControl.csproj +++ b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetection_WallJoinControl.csproj @@ -1,135 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {C89EA386-EFDF-42DB-9B5D-045B9D4117DA} - Library - Properties Revit.SDK.Samples.ProximityDetection_WallJoinControl.CS - ProximityDetection_WallJoinControl - - - v4.8 - - - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ProximityDetection_WallJoinControl.xml - ProximityDetection_WallJoinControl.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - ProximityDetection_WallJoinControl.ruleset - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ProximityDetection_WallJoinControl.xml - full - x64 - prompt - ProximityDetection_WallJoinControl.ruleset - - - bin\x64\Release\ - TRACE - true - true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated + + true + MinimumRecommendedRules.ruleset - - - - - - - - 3.5 - - - 3.5 - - - - - - - - Form - - - ProximityDetectionAndWallJoinControlForm.cs - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetectionAndWallJoinControlForm.Designer.cs b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/PrxmtDtctnWallJoinControl.Designer.cs similarity index 97% rename from SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetectionAndWallJoinControlForm.Designer.cs rename to SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/PrxmtDtctnWallJoinControl.Designer.cs index 9b41e4c0..30fe9580 100644 --- a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetectionAndWallJoinControlForm.Designer.cs +++ b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/PrxmtDtctnWallJoinControl.Designer.cs @@ -1,6 +1,6 @@ namespace Revit.SDK.Samples.ProximityDetection_WallJoinControl.CS { - partial class ProximityDetectionAndWallJoinControlForm + partial class PrxmtDtctnWallJoinControl { /// /// Required designer variable. diff --git a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetectionAndWallJoinControlForm.cs b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/PrxmtDtctnWallJoinControl.cs similarity index 94% rename from SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetectionAndWallJoinControlForm.cs rename to SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/PrxmtDtctnWallJoinControl.cs index 81b4064c..687666b1 100644 --- a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetectionAndWallJoinControlForm.cs +++ b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/PrxmtDtctnWallJoinControl.cs @@ -37,7 +37,7 @@ namespace Revit.SDK.Samples.ProximityDetection_WallJoinControl.CS /// /// The form that show the operations and results /// - public partial class ProximityDetectionAndWallJoinControlForm : System.Windows.Forms.Form + public partial class PrxmtDtctnWallJoinControl : System.Windows.Forms.Form { /// /// revit document @@ -58,7 +58,7 @@ namespace Revit.SDK.Samples.ProximityDetection_WallJoinControl.CS /// Revit document /// The object that is responsible for proximity detection /// The object that is responsible for controlling the joint of walls - public ProximityDetectionAndWallJoinControlForm(Autodesk.Revit.DB.Document doc, + public PrxmtDtctnWallJoinControl(Autodesk.Revit.DB.Document doc, ProximityDetection proximityDetection, WallJoinControl walljoinControl) { diff --git a/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetectionAndWallJoinControlForm.resx b/SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/PrxmtDtctnWallJoinControl.resx similarity index 100% rename from SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/ProximityDetectionAndWallJoinControlForm.resx rename to SDK/Samples/GeometryAPI/ProximityDetection_WallJoinControl/CS/PrxmtDtctnWallJoinControl.resx diff --git a/SDK/Samples/GeometryAPI/UpdateExternallyTaggedBRep/CS/Properties/AssemblyInfo.cs b/SDK/Samples/GeometryAPI/UpdateExternallyTaggedBRep/CS/Properties/AssemblyInfo.cs index 0d918dc8..af51b5c4 100644 --- a/SDK/Samples/GeometryAPI/UpdateExternallyTaggedBRep/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/GeometryAPI/UpdateExternallyTaggedBRep/CS/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/GeometryAPI/UpdateExternallyTaggedBRep/CS/UpdateExternallyTaggedBRep.csproj b/SDK/Samples/GeometryAPI/UpdateExternallyTaggedBRep/CS/UpdateExternallyTaggedBRep.csproj index 6154961d..6ec9fa33 100644 --- a/SDK/Samples/GeometryAPI/UpdateExternallyTaggedBRep/CS/UpdateExternallyTaggedBRep.csproj +++ b/SDK/Samples/GeometryAPI/UpdateExternallyTaggedBRep/CS/UpdateExternallyTaggedBRep.csproj @@ -1,125 +1,24 @@ - - + - - None - - - - - Debug - AnyCPU 8.0.30703 - 2.0 - {E052E98F-A97D-4EFE-BE49-DC7480040616} - Library - Properties Revit.SDK.Samples.UpdateExternallyTaggedBRep.CS - UpdateExternallyTaggedBRep - v4.8 - 512 + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 + + true bin\Debug\UpdateExternallyTaggedBRep.xml - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + true bin\Release\UpdateExternallyTaggedBRep.xml - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 - true - bin\Debug\UpdateExternallyTaggedBRep.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x64 - true - bin\Release\UpdateExternallyTaggedBRep.xml - - - OnOutputUpdated - - - - - - - - - - - - - 4.8 - - - - - + - - - - - - - - True - True - Resources.resx - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/GetSetDefaultTypes/CS/GetSetDefaultTypes.csproj b/SDK/Samples/GetSetDefaultTypes/CS/GetSetDefaultTypes.csproj index 41bf390f..3e510058 100644 --- a/SDK/Samples/GetSetDefaultTypes/CS/GetSetDefaultTypes.csproj +++ b/SDK/Samples/GetSetDefaultTypes/CS/GetSetDefaultTypes.csproj @@ -1,47 +1,16 @@ - - + + - Debug - AnyCPU - 8.0.30703 + true 2.0 - {256B7C47-FE2A-40A0-877D-664D63ACA41D} - Library - Properties Revit.SDK.Samples.GetSetDefaultTypes.CS - GetSetDefaultTypes - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - true - bin\Debug\ScriptManager.xml - - - full - false - bin\Release\ - DEBUG;TRACE - prompt - 4 - true true bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ScriptManager.xml 3 true - full - x64 bin\Debug\DockableDialogs.dll.CodeAnalysisLog.xml true GlobalSuppressions.cs @@ -55,9 +24,6 @@ true bin\x64\Release\ - DEBUG;TRACE - full - x64 bin\Release\DockableDialogs.dll.CodeAnalysisLog.xml true GlobalSuppressions.cs @@ -69,64 +35,23 @@ false true + OnOutputUpdated - - - - - - - - - - - - - - - - - DefaultElementTypes.xaml - - - - DefaultFamilyTypes.xaml - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - Always - - - Always - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" -if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - None - \ No newline at end of file + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" +if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + + + + Always + + + Always + + + diff --git a/SDK/Samples/GetSetDefaultTypes/CS/Properties/AssemblyInfo.cs b/SDK/Samples/GetSetDefaultTypes/CS/Properties/AssemblyInfo.cs index 8b304bf1..0cd82438 100644 --- a/SDK/Samples/GetSetDefaultTypes/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/GetSetDefaultTypes/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -32,7 +32,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2014")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/GridCreation/CS/CreateGridsData.cs b/SDK/Samples/GridCreation/CS/CreateGridsData.cs index fb762240..63dfc8b8 100644 --- a/SDK/Samples/GridCreation/CS/CreateGridsData.cs +++ b/SDK/Samples/GridCreation/CS/CreateGridsData.cs @@ -21,15 +21,11 @@ // using System; -using System.Collections.Generic; -using System.Text; using System.Collections; -using System.Windows.Forms; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using Application = Autodesk.Revit.ApplicationServices.Application; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.GridCreation.CS { diff --git a/SDK/Samples/GridCreation/CS/GridCreation.csproj b/SDK/Samples/GridCreation/CS/GridCreation.csproj index 37022f09..dbccb6d6 100644 --- a/SDK/Samples/GridCreation/CS/GridCreation.csproj +++ b/SDK/Samples/GridCreation/CS/GridCreation.csproj @@ -1,153 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {9CBA7F2F-0B89-415D-B46E-F68057ACB04F} - Library - Properties Revit.SDK.Samples.GridCreation.CS - GridCreation - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\GridCreation.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\GridCreation.XML - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - - Form - - - CreateWithSelectedCurvesForm.cs - - - - - - Form - - - GridCreationOptionForm.cs - - - Form - - - CreateOrthogonalGridsForm.cs - - - - Designer - CreateWithSelectedCurvesForm.cs - - - Designer - GridCreationOptionForm.cs - - - Designer - CreateOrthogonalGridsForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - Designer - CreateRadialAndArcGridsForm.cs - - - True - Resources.resx - True - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - Form - - - CreateRadialAndArcGridsForm.cs - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/GridCreation/CS/Properties/AssemblyInfo.cs b/SDK/Samples/GridCreation/CS/Properties/AssemblyInfo.cs index 9e9746d7..34a3d05c 100644 --- a/SDK/Samples/GridCreation/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/GridCreation/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/GridCreation/CS/Validation.cs b/SDK/Samples/GridCreation/CS/Validation.cs index 4dadedcf..283bdd0e 100644 --- a/SDK/Samples/GridCreation/CS/Validation.cs +++ b/SDK/Samples/GridCreation/CS/Validation.cs @@ -21,13 +21,12 @@ // using System; -using System.Collections.Generic; -using System.Text; using System.Windows.Forms; using System.Resources; using System.Collections; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.GridCreation.CS { diff --git a/SDK/Samples/HelloRevit/CS/HelloRevit.csproj b/SDK/Samples/HelloRevit/CS/HelloRevit.csproj index 9ab52bc9..1bbd91c6 100644 --- a/SDK/Samples/HelloRevit/CS/HelloRevit.csproj +++ b/SDK/Samples/HelloRevit/CS/HelloRevit.csproj @@ -1,82 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {BE595C77-7550-4497-8043-22A060ED3EB7} - Library - Properties Revit.SDK.Samples.HelloWorld.CS - HelloRevit - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/HelloRevit/VB.NET/HelloRevit.vbproj b/SDK/Samples/HelloRevit/VB.NET/HelloRevit.vbproj index 292e5a1d..7ebee10d 100644 --- a/SDK/Samples/HelloRevit/VB.NET/HelloRevit.vbproj +++ b/SDK/Samples/HelloRevit/VB.NET/HelloRevit.vbproj @@ -1,145 +1,20 @@ - - + Local - 9.0.30729 - 2.0 - {A1D73F2A-54CE-43CE-B80A-708AAED3F4D1} - Debug - AnyCPU - - - - - HelloRevit - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.HelloRevit.VB.NET - - - - Windows - - - v4.8 - - - - bin\Debug\ - - 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false - - bin\Release\ - - - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ImportExport/CS/Export/ExportDGNOptionsForm.cs b/SDK/Samples/ImportExport/CS/Export/ExportDGNOptionsForm.cs index d31f3ba3..f8182e76 100644 --- a/SDK/Samples/ImportExport/CS/Export/ExportDGNOptionsForm.cs +++ b/SDK/Samples/ImportExport/CS/Export/ExportDGNOptionsForm.cs @@ -21,18 +21,14 @@ // using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; using System.IO; -using System.Reflection; using System.Diagnostics; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.ImportExport.CS { /// diff --git a/SDK/Samples/ImportExport/CS/Export/ExportIMGOptionsForm.Designer.cs b/SDK/Samples/ImportExport/CS/Export/ExportIMGOptionsForm.Designer.cs index 1888ae5d..eecf0649 100644 --- a/SDK/Samples/ImportExport/CS/Export/ExportIMGOptionsForm.Designer.cs +++ b/SDK/Samples/ImportExport/CS/Export/ExportIMGOptionsForm.Designer.cs @@ -20,6 +20,8 @@ // (Rights in Technical Data and Computer Software), as applicable. // +using System; + namespace Revit.SDK.Samples.ImportExport.CS { partial class ExportIMGOptionsForm @@ -35,9 +37,10 @@ namespace Revit.SDK.Samples.ImportExport.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + components?.Dispose(); + ((IDisposable)m_exportOptions)?.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/ImportExport/CS/Export/ExportIMGOptionsForm.cs b/SDK/Samples/ImportExport/CS/Export/ExportIMGOptionsForm.cs index ef3270e6..86042815 100644 --- a/SDK/Samples/ImportExport/CS/Export/ExportIMGOptionsForm.cs +++ b/SDK/Samples/ImportExport/CS/Export/ExportIMGOptionsForm.cs @@ -22,16 +22,13 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.ImportExport.CS { /// diff --git a/SDK/Samples/ImportExport/CS/Export/ExportPDFData.cs b/SDK/Samples/ImportExport/CS/Export/ExportPDFData.cs index 48d4a319..76612f7a 100644 --- a/SDK/Samples/ImportExport/CS/Export/ExportPDFData.cs +++ b/SDK/Samples/ImportExport/CS/Export/ExportPDFData.cs @@ -38,10 +38,8 @@ namespace Revit.SDK.Samples.ImportExport.CS #endregion #region Class Properties - /// - /// Combine - /// - public bool Combine + + internal bool Combine { get { diff --git a/SDK/Samples/ImportExport/CS/Export/ExportPDFOptionsForm.cs b/SDK/Samples/ImportExport/CS/Export/ExportPDFOptionsForm.cs index 9f3c2805..f2e3416b 100644 --- a/SDK/Samples/ImportExport/CS/Export/ExportPDFOptionsForm.cs +++ b/SDK/Samples/ImportExport/CS/Export/ExportPDFOptionsForm.cs @@ -42,10 +42,11 @@ namespace Revit.SDK.Samples.ImportExport.CS /// private ExportPDFData m_data; - /// - /// ExportPDFOptionsForm constructor - /// - public ExportPDFOptionsForm(ExportPDFData data) + /// + /// Constructor + /// + /// Pdf export data + public ExportPDFOptionsForm(ExportPDFData data) { m_data = data; InitializeComponent(); diff --git a/SDK/Samples/ImportExport/CS/Export/ExportWithViewsForm.cs b/SDK/Samples/ImportExport/CS/Export/ExportWithViewsForm.cs index 1315bd78..991a7b7f 100644 --- a/SDK/Samples/ImportExport/CS/Export/ExportWithViewsForm.cs +++ b/SDK/Samples/ImportExport/CS/Export/ExportWithViewsForm.cs @@ -21,16 +21,13 @@ // using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; using System.IO; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.ImportExport.CS { /// diff --git a/SDK/Samples/ImportExport/CS/Import/ImportDWGForm.cs b/SDK/Samples/ImportExport/CS/Import/ImportDWGForm.cs index 67917c6a..c58d7691 100644 --- a/SDK/Samples/ImportExport/CS/Import/ImportDWGForm.cs +++ b/SDK/Samples/ImportExport/CS/Import/ImportDWGForm.cs @@ -21,19 +21,14 @@ // using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.Text; using System.Windows.Forms; -using System.Reflection; using System.IO; -using Autodesk.Revit; -using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.ImportExport.CS { /// diff --git a/SDK/Samples/ImportExport/CS/Import/ImportInventorData.cs b/SDK/Samples/ImportExport/CS/Import/ImportInventorData.cs deleted file mode 100644 index cb5b8bf9..00000000 --- a/SDK/Samples/ImportExport/CS/Import/ImportInventorData.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// (C) Copyright 2003-2019 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// - -using System; -using System.Collections.Generic; -using System.Text; - -using Autodesk.Revit; -using Autodesk.Revit.DB; -using Autodesk.Revit.UI; - -namespace Revit.SDK.Samples.ImportExport.CS -{ - /// - /// Data class which stores the information for importing image format - /// - class ImportInventorData : ImportData - { - /// - /// Constructor - /// - /// Revit command data - /// Format to import - public ImportInventorData(ExternalCommandData commandData, ImportFormat importFormat) - : base(commandData, importFormat) - { - m_filter = "Autodesk Exchange Files (*.adsk)|*.adsk"; - m_title = "Import Inventor File"; - } - - /// - /// Collect the parameters and import - /// - /// - public override bool Import() - { - - //Import - Transaction t = new Transaction(m_activeDoc); - t.SetName("Import"); - t.Start(); - Document doc =m_commandData.Application.Application.OpenBuildingComponentDocument(m_importFileFullName); - t.Commit(); - - return doc == null ? false : true; - } - } -} diff --git a/SDK/Samples/ImportExport/CS/ImportExport.csproj b/SDK/Samples/ImportExport/CS/ImportExport.csproj index 143194c6..4a93559d 100644 --- a/SDK/Samples/ImportExport/CS/ImportExport.csproj +++ b/SDK/Samples/ImportExport/CS/ImportExport.csproj @@ -1,205 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {3505D5A1-24CB-46C3-8077-276BC07757D9} - Library - Properties Revit.SDK.Samples.ImportExport.CS - ImportExport - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\ImportExport.XML - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ImportExport.XML - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - - OnOutputUpdated - - - - - - - 3.5 - + - - - - - - Form - - - ExportIMGOptionsForm.cs - - - - Form - - - ExportPDFOptionsForm.cs - - - - - - Form - - - ExportDGNOptionsForm.cs - - - - - Form - - - ExportDWFOptionForm.cs - - - - - - - - Form - - - ExportBaseOptionsForm.cs - - - - - - - Form - - - ImportDWGForm.cs - - - Form - - - ExportWithViewsForm.cs - - - - Form - - - MainForm.cs - - - - - Form - - - SelectViewsForm.cs - - - True - True - Resources.resx - - - - - - Designer - ExportDWFOptionForm.cs - - - Designer - ExportDGNOptionsForm.cs - - - ExportIMGOptionsForm.cs - - - ExportPDFOptionsForm.cs - - - Designer - ExportWithViewsForm.cs - - - Designer - ExportBaseOptionsForm.cs - - - Designer - ImportDWGForm.cs - - - Designer - MainForm.cs - - - Designer - SelectViewsForm.cs - - - Designer - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ImportExport/CS/MainData.cs b/SDK/Samples/ImportExport/CS/MainData.cs index f2084300..c721de6a 100644 --- a/SDK/Samples/ImportExport/CS/MainData.cs +++ b/SDK/Samples/ImportExport/CS/MainData.cs @@ -21,14 +21,13 @@ // using System; -using System.Collections.Generic; -using System.Text; using System.IO; using System.Windows.Forms; -using Autodesk.Revit; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.ImportExport.CS { /// diff --git a/SDK/Samples/ImportExport/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ImportExport/CS/Properties/AssemblyInfo.cs index b46d8853..f51deb4d 100644 --- a/SDK/Samples/ImportExport/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ImportExport/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/InCanvasControlAPI/CS/InCanvasControlAPI.csproj b/SDK/Samples/InCanvasControlAPI/CS/InCanvasControlAPI.csproj index 06ed24eb..4591b234 100644 --- a/SDK/Samples/InCanvasControlAPI/CS/InCanvasControlAPI.csproj +++ b/SDK/Samples/InCanvasControlAPI/CS/InCanvasControlAPI.csproj @@ -1,94 +1,13 @@ - - - - - None - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {685C2952-1BD0-42D8-B43B-6856A475DF1F} - Library - Properties - InCanvasControlAPI - InCanvasControlAPI - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\InCanvasControlAPI.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\InCanvasControlAPI.XML - + + - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 true bin\Debug\InCanvasControlAPI.XML - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x64 true bin\Release\InCanvasControlAPI.XML - - OnOutputUpdated - - - - - - - - - - 4.7 - - - - - - - - - - - - - - Always @@ -97,16 +16,9 @@ Always - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/InPlaceMembers/CS/GraphicsData.cs b/SDK/Samples/InPlaceMembers/CS/GraphicsData.cs index 3b603d5f..08e8dd30 100644 --- a/SDK/Samples/InPlaceMembers/CS/GraphicsData.cs +++ b/SDK/Samples/InPlaceMembers/CS/GraphicsData.cs @@ -118,7 +118,7 @@ namespace Revit.SDK.Samples.InPlaceMembers.CS /// /// initialize some member data /// - protected virtual void Initialize() + protected void Initialize() { double INITANGLE = Math.PI / 4; diff --git a/SDK/Samples/InPlaceMembers/CS/InPlaceMembers.csproj b/SDK/Samples/InPlaceMembers/CS/InPlaceMembers.csproj index 67e7ae1c..a1f958ff 100644 --- a/SDK/Samples/InPlaceMembers/CS/InPlaceMembers.csproj +++ b/SDK/Samples/InPlaceMembers/CS/InPlaceMembers.csproj @@ -1,110 +1,21 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {4996A0A3-C581-4B6B-858F-67F22712CF02} - Library - Properties Revit.SDK.Samples.InPlaceMembers.CS - InPlaceMembers - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - Form - - - InPlaceMembersForm.cs - - + Component - - - - - Designer - InPlaceMembersForm.cs - - - Designer - PictureBox3D.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/InPlaceMembers/CS/PictureBox3D.cs b/SDK/Samples/InPlaceMembers/CS/PictureBox3D.cs index 9927ed58..b8662f70 100644 --- a/SDK/Samples/InPlaceMembers/CS/PictureBox3D.cs +++ b/SDK/Samples/InPlaceMembers/CS/PictureBox3D.cs @@ -23,12 +23,9 @@ using System; using System.Collections.Generic; -using System.Text; using System.Drawing; using System.Drawing.Drawing2D; -using System.ComponentModel; using System.Windows.Forms; -using System.Windows.Forms.ComponentModel; namespace Revit.SDK.Samples.InPlaceMembers.CS { @@ -192,5 +189,14 @@ namespace Revit.SDK.Samples.InPlaceMembers.CS return plgpts; } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + ((IDisposable)m_transform)?.Dispose(); + } + base.Dispose(disposing); + } } } diff --git a/SDK/Samples/InPlaceMembers/CS/Properties/AssemblyInfo.cs b/SDK/Samples/InPlaceMembers/CS/Properties/AssemblyInfo.cs index 2f94eff5..d46b0d22 100644 --- a/SDK/Samples/InPlaceMembers/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/InPlaceMembers/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/InvisibleParam/CS/InvisibleParam.csproj b/SDK/Samples/InvisibleParam/CS/InvisibleParam.csproj index b09ec0ad..4a9fe9df 100644 --- a/SDK/Samples/InvisibleParam/CS/InvisibleParam.csproj +++ b/SDK/Samples/InvisibleParam/CS/InvisibleParam.csproj @@ -1,78 +1,20 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {607E7608-B813-4FB7-9262-0F0BE09A302C} - Library - Properties Revit.SDK.Samples.InvisibleParam.CS - InvisibleParam - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Journaling/CS/Journaling.csproj b/SDK/Samples/Journaling/CS/Journaling.csproj index 6445e70c..1d259a41 100644 --- a/SDK/Samples/Journaling/CS/Journaling.csproj +++ b/SDK/Samples/Journaling/CS/Journaling.csproj @@ -1,103 +1,18 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D5BF2857-5A60-48C4-9944-6E57A0781ED2} - Library - Properties - Journaling - Journaling - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - Form - - - JournalingForm.cs - - + UserControl - - PointUserControl.cs - - - - - Designer - JournalingForm.cs - - - PointUserControl.cs - Designer - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Journaling/CS/JournalingForm.cs b/SDK/Samples/Journaling/CS/JournalingForm.cs index fb244f7c..053777a4 100644 --- a/SDK/Samples/Journaling/CS/JournalingForm.cs +++ b/SDK/Samples/Journaling/CS/JournalingForm.cs @@ -22,15 +22,10 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; using Autodesk.Revit.DB; -using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Journaling.CS { diff --git a/SDK/Samples/Journaling/CS/PointUserControl.cs b/SDK/Samples/Journaling/CS/PointUserControl.cs index 78c15e5f..30b9776a 100644 --- a/SDK/Samples/Journaling/CS/PointUserControl.cs +++ b/SDK/Samples/Journaling/CS/PointUserControl.cs @@ -22,15 +22,11 @@ using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Text; using System.Windows.Forms; -using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.ModelLines.CS { diff --git a/SDK/Samples/Journaling/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Journaling/CS/Properties/AssemblyInfo.cs index 710f8848..faf40269 100644 --- a/SDK/Samples/Journaling/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Journaling/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/LevelsProperty/CS/LevelsForm.cs b/SDK/Samples/LevelsProperty/CS/LevelsForm.cs index bce45010..75d9f581 100644 --- a/SDK/Samples/LevelsProperty/CS/LevelsForm.cs +++ b/SDK/Samples/LevelsProperty/CS/LevelsForm.cs @@ -23,13 +23,9 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; -using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.LevelsProperty.CS { diff --git a/SDK/Samples/LevelsProperty/CS/LevelsProperty.csproj b/SDK/Samples/LevelsProperty/CS/LevelsProperty.csproj index d4397642..ce14296f 100644 --- a/SDK/Samples/LevelsProperty/CS/LevelsProperty.csproj +++ b/SDK/Samples/LevelsProperty/CS/LevelsProperty.csproj @@ -1,123 +1,17 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {3BDA192E-06F3-43B2-8ADD-A1D8766935A0} - Library - Properties Revit.SDK.Samples.LevelsProperty.CS - LevelsProperty - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - LevelsForm.cs - - - - True - True - Resources.resx - - - - - - Designer - LevelsForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/LevelsProperty/CS/Properties/AssemblyInfo.cs b/SDK/Samples/LevelsProperty/CS/Properties/AssemblyInfo.cs index 5d8c32e4..a1e124cf 100644 --- a/SDK/Samples/LevelsProperty/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/LevelsProperty/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/Loads/CS/LoadCaseTabPage.cs b/SDK/Samples/Loads/CS/LoadCaseTabPage.cs index f0d0ed25..23b0079f 100644 --- a/SDK/Samples/Loads/CS/LoadCaseTabPage.cs +++ b/SDK/Samples/Loads/CS/LoadCaseTabPage.cs @@ -22,14 +22,9 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; -using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Loads.CS { diff --git a/SDK/Samples/Loads/CS/LoadCombinationDeal.cs b/SDK/Samples/Loads/CS/LoadCombinationDeal.cs index 95dfbee6..e2f8cd0a 100644 --- a/SDK/Samples/Loads/CS/LoadCombinationDeal.cs +++ b/SDK/Samples/Loads/CS/LoadCombinationDeal.cs @@ -23,15 +23,13 @@ using System; using System.Collections.Generic; -using System.Text; -using System.Windows.Forms; -using Autodesk; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Structure; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.Loads.CS { /// diff --git a/SDK/Samples/Loads/CS/LoadCombinationUsageMap.cs b/SDK/Samples/Loads/CS/LoadCombinationUsageMap.cs index 3aaa4701..620daf57 100644 --- a/SDK/Samples/Loads/CS/LoadCombinationUsageMap.cs +++ b/SDK/Samples/Loads/CS/LoadCombinationUsageMap.cs @@ -22,11 +22,8 @@ using System; -using System.Collections.Generic; -using System.Text; -using System.Windows.Forms; -using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Loads.CS { diff --git a/SDK/Samples/Loads/CS/LoadCombinationsTabPage.cs b/SDK/Samples/Loads/CS/LoadCombinationsTabPage.cs index 3470bcb5..3f9f5e53 100644 --- a/SDK/Samples/Loads/CS/LoadCombinationsTabPage.cs +++ b/SDK/Samples/Loads/CS/LoadCombinationsTabPage.cs @@ -22,14 +22,11 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.Text; using System.Windows.Forms; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Loads.CS { diff --git a/SDK/Samples/Loads/CS/Loads.csproj b/SDK/Samples/Loads/CS/Loads.csproj index 91088a4c..dc34d568 100644 --- a/SDK/Samples/Loads/CS/Loads.csproj +++ b/SDK/Samples/Loads/CS/Loads.csproj @@ -1,112 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {62E74082-D02B-4E8D-8A0B-72C20B339CB1} - Library - Properties - Loads - Loads - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - - - - Form - - - - - Form - - - LoadsForm.cs - - - - - - Designer - LoadsForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Loads/CS/LoadsForm.Designer.cs b/SDK/Samples/Loads/CS/LoadsForm.Designer.cs index 5ff2b0df..ceee2030 100644 --- a/SDK/Samples/Loads/CS/LoadsForm.Designer.cs +++ b/SDK/Samples/Loads/CS/LoadsForm.Designer.cs @@ -36,9 +36,23 @@ namespace Revit.SDK.Samples.Loads.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + components?.Dispose(); + combinationNameColumn?.Dispose(); + combinationFormulaColumn?.Dispose(); + combinationTypeColumn?.Dispose(); + combinationStateColumn?.Dispose(); + combinationUsageColumn?.Dispose(); + usageSetColumn?.Dispose(); + usageNameColumn?.Dispose(); + formulaFactorColumn?.Dispose(); + formulaCaseColumn?.Dispose(); + LoadCasesName?.Dispose(); + LoadCasesNumber?.Dispose(); + LoadCasesNature?.Dispose(); + LoadCasesCategory?.Dispose(); + LoadNatureName?.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/Loads/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Loads/CS/Properties/AssemblyInfo.cs index 86691e80..d9536646 100644 --- a/SDK/Samples/Loads/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Loads/CS/Properties/AssemblyInfo.cs @@ -22,7 +22,6 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -56,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/Massing/DistanceToPanels/CS/DistanceToPanels.csproj b/SDK/Samples/Massing/DistanceToPanels/CS/DistanceToPanels.csproj index 7d7e658a..a2fbd239 100644 --- a/SDK/Samples/Massing/DistanceToPanels/CS/DistanceToPanels.csproj +++ b/SDK/Samples/Massing/DistanceToPanels/CS/DistanceToPanels.csproj @@ -1,79 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {5903E05A-67E3-4E91-B3BC-8207F0A7F274} - Library - Properties Revit.SDK.Samples.DistanceToPanels.CS - DistanceToPanels - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/Command.cs b/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/Command.cs deleted file mode 100644 index 9134b854..00000000 --- a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/Command.cs +++ /dev/null @@ -1,154 +0,0 @@ -// -// (C) Copyright 2003-2019 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// - -using System; -using System.Collections.Generic; -using System.Text; - -using Autodesk.Revit; -using Autodesk.Revit.DB; -using Autodesk.Revit.UI; -using Autodesk.Revit.Attributes; - -namespace Revit.SDK.Samples.DividedSurfaceByIntersects.CS -{ - /// - /// the entry point of the sample - /// - [Transaction(TransactionMode.Manual)] - [Regeneration(RegenerationOption.Manual)] - [Journaling(JournalingMode.NoCommandData)] - public class Command : IExternalCommand - { - /// - /// The active Revit document - /// - Document m_document; - - /// - /// Implement this method as an external command for Revit. - /// - /// An object that is passed to the external application - /// which contains data related to the command, - /// such as the application object and active view. - /// A message that can be set by the external application - /// which will be displayed if a failure or cancellation is returned by - /// the external command. - /// A set of elements to which the external application - /// can add elements that are to be highlighted in case of failure or cancellation. - /// Return the status of the external command. - /// A result of Succeeded means that the API external method functioned as expected. - /// Cancelled can be used to signify that the user cancelled the external operation - /// at some point. Failure should be returned if the application is unable to proceed with - /// the operation. - public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements) - { - // store the active Revit document - m_document = commandData.Application.ActiveUIDocument.Document; - - DividedSurface ds = GetDividedSurface(); - if (null == ds) - { - message = "Open the family file from the sample folder first."; - return Result.Failed; - } - IEnumerable planes = GetPlanes(); - IEnumerable lines = GetLines(); - - Transaction act = new Transaction(m_document); - act.Start("AddRemoveIntersects"); - try - { - // step 1: divide the surface with reference planes and levels - foreach (ElementId id in planes) - { - if (ds.CanBeIntersectionElement(id)) - { - ds.AddIntersectionElement(id); - } - } - - // step 2: remove all the reference planes and level intersection elements - IEnumerable intersects = ds.GetAllIntersectionElements(); - - foreach (ElementId id in intersects) - { - ds.RemoveIntersectionElement(id); - } - - // step 3: divide the surface with model lines instead - foreach (ElementId id in lines) - { - if (ds.CanBeIntersectionElement(id)) - { - ds.AddIntersectionElement(id); - } - } - } - catch (Exception) - { - act.RollBack(); - } - finally - { - act.Commit(); - } - - return Autodesk.Revit.UI.Result.Succeeded; - } - - private DividedSurface GetDividedSurface() - { - return m_document.GetElement(new ElementId(31519L)) as DividedSurface; - } - - private IEnumerable GetPlanes() - { - // 1027, 1071 & 1072 are ids of the reference planes and levels drawn in the family file - yield return new ElementId(1027L); - yield return new ElementId(1071L); - yield return new ElementId(1072L); - } - - private IEnumerable GetLines() - { - // the "31xxx" numberic values are ids of the model lines drawn in the family file - yield return new ElementId(31170L); - yield return new ElementId(31206L); - yield return new ElementId(31321L); - yield return new ElementId(31343L); - yield return new ElementId(31377L); - yield return new ElementId(31395L); - } - - /// - /// Get element by its Id - /// - /// - /// - /// - public T GetElement(long eid) where T : Element - { - return m_document.GetElement(new ElementId(eid)) as T; - } - } -} diff --git a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/DividedSurfaceByIntersects.addin b/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/DividedSurfaceByIntersects.addin deleted file mode 100644 index c4487d98..00000000 --- a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/DividedSurfaceByIntersects.addin +++ /dev/null @@ -1,13 +0,0 @@ - - - - DividedSurfaceByIntersects.dll - 40ac79c8-68d6-4517-a999-dcf83dac72c4 - Revit.SDK.Samples.DividedSurfaceByIntersects.CS.Command - DividedSurface by intersects - Customize DividedSurface with intersection elements - AlwaysVisible - ADSK - Autodesk, www.autodesk.com - - \ No newline at end of file diff --git a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/DividedSurfaceByIntersects.csproj b/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/DividedSurfaceByIntersects.csproj deleted file mode 100644 index b1bad858..00000000 --- a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/DividedSurfaceByIntersects.csproj +++ /dev/null @@ -1,86 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {0FFDC8F7-AE63-4792-9FBC-B2A55FB9CF5A} - Library - Properties - Revit.SDK.Samples.DividedSurfaceByIntersects.CS - DividedSurfaceByIntersects - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - true - - - bin\x64\Release\ - TRACE - true - true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" -if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - - - None - - \ No newline at end of file diff --git a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/ReadMe_DividedSurfaceByIntersects.rtf b/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/ReadMe_DividedSurfaceByIntersects.rtf deleted file mode 100644 index c09d9516..00000000 --- a/SDK/Samples/Massing/DividedSurfaceByIntersects/CS/ReadMe_DividedSurfaceByIntersects.rtf +++ /dev/null @@ -1,225 +0,0 @@ -{\rtf1\adeflang1025\ansi\ansicpg1252\uc2\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe2052\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} -{\f13\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt ??\'a1\'a7??};}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;} -{\f40\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'cb\'ce\'cc\'e5;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} -{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} -{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f42\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f43\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\f45\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f46\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f47\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f48\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\f49\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f50\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f52\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f53\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} -{\f55\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f56\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f57\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f58\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} -{\f59\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f60\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f174\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt ??\'a1\'a7??};}{\f382\fbidi \froman\fcharset238\fprq2 Cambria Math CE;} -{\f383\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f385\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f386\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f389\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;} -{\f444\fbidi \fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} -{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;} -{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} -{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} -{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;} -{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} -{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} -{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; -\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128; -\red192\green192\blue192;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{ -\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 -\snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* -\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1 -\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 -\snext11 \ssemihidden \sunhideused \sqformat Normal Table;}}{\*\listtable{\list\listtemplateid662589476\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698703 -\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713 -\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715 -\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703 -\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713 -\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715 -\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703 -\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713 -\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715 -\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid149104828}}{\*\listoverridetable{\listoverride\listid149104828\listoverridecount0\ls1}}{\*\pgptbl {\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}} -{\*\rsidtbl \rsid19609\rsid1054238\rsid1397567\rsid2129111\rsid2295410\rsid3214741\rsid3560174\rsid3884642\rsid3885759\rsid4279075\rsid4604504\rsid4927746\rsid5600209\rsid7365022\rsid7628105\rsid8415828\rsid9916534\rsid10695215\rsid11222526\rsid12331322 -\rsid12525595\rsid12720386\rsid13307167\rsid15991898\rsid16466704}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Carl Zhang} -{\creatim\yr2010\mo3\dy3\hr14\min33}{\revtim\yr2010\mo3\dy9\hr15\min52}{\version78}{\edmins90}{\nofpages1}{\nofwords162}{\nofchars929}{\nofcharsws1089}{\vern32771}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}} -\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect -\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701 -\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot7628105 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \hich .}} -{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \hich )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang -{\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang -{\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 -\fs22\lang1033\langfe2052\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\loch\af1\hich\af1\dbch\af13\insrsid7365022 \hich\af1\dbch\af13\loch\f1 arla}{\rtlch\fcs1 \ab\af1\afs20 -\ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3560174 -\hich\af1\dbch\af31505\loch\f1 DividedSurfaceByIntersects}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 -\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 2011.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8415828 -\hich\af1\dbch\af31505\loch\f1 2011}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 .0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 -\ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4604504 \hich\af1\dbch\af31505\loch\f1 Medium}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 -\b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid3885759 -\hich\af1\dbch\af13\loch\f1 Families}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5600209 -\hich\af1\dbch\af31505\loch\f1 Divide surface with intersects}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 .\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 -\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\hich\af1\dbch\af31505\loch\f1 This sample demonstrates }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12720386 \hich\af1\dbch\af31505\loch\f1 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 - main features: -\par }\pard \ltrpar\ql \fi-360\li1440\ri0\nowidctlpar\tx1440\wrapdefault\faauto\rin0\lin1440\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 1.\tab How to }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid12720386 \hich\af1\dbch\af31505\loch\f1 add intersects to DividedSurface}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 . -\par }\pard \ltrpar\ql \fi-360\li1440\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1440\itap0\pararsid12720386 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 2.\tab How to }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid12720386 \hich\af1\dbch\af31505\loch\f1 remove intersects to DividedSurface}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 .}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322\charrsid12720386 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 -\par }\pard \ltrpar\ql \fi360\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\fs20\loch\af1\hich\af1\dbch\af13\insrsid13307167 \hich\af1\dbch\af13\loch\f1 UI.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 IExternalCommand}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 - -\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2295410 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 .CurtainSystem}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 -\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 -\par \hich\af1\dbch\af31505\loch\f1 Command.cs -\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 \hich\f1 This file contains the class \'93\loch\f1 \hich\f1 Command\'94 -\loch\f1 \hich\f1 which inherits from \'93\loch\f1 \hich\f1 IExternalCommand\'94\loch\f1 \hich\f1 interface and implements the \'93\loch\f1 \hich\f1 Execute\'94\loch\f1 method}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 . -\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin0\itap0\pararsid4927746 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\hich\af1\dbch\af31505\loch\f1 -\par \hich\af1\dbch\af31505\loch\f1 Functionalities: -\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9916534 \hich\af1\dbch\af31505\loch\f1 Divid -\hich\af1\dbch\af31505\loch\f1 e the surface with intersect}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3214741 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7365022 \hich\af1\dbch\af31505\loch\f1 elements (} -{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3214741 \hich\af1\dbch\af31505\loch\f1 Level, ReferencePlane, ModelCurve, etc)}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 . -\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9916534 \hich\af1\dbch\af31505\loch\f1 Remove the intersects}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3214741 -\hich\af1\dbch\af31505\loch\f1 that don\hich\f1 \rquote \loch\f1 t need any more}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 . -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid12331322 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3214741 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Implementations: -\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\tab \hich\af1\dbch\af31505\loch\f1 Add/ remove }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid1054238 \hich\af1\dbch\af31505\loch\f1 Intersects}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 via -\par }\pard \ltrpar\ql \fi360\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 void }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3214741\charrsid3214741 -\hich\af1\dbch\af31505\loch\f1 AddIntersectionElement(ElementId ^newIntersectionElemId)}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\par \hich\af1\dbch\af31505\loch\f1 void }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10695215\charrsid10695215 \hich\af1\dbch\af31505\loch\f1 RemoveIntersectionElement(ElementId ^referenceElemIdToRemove)}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid12331322 -\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf2\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid12331322 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\insrsid16466704 \hich\af1\dbch\af31505\loch\f1 1.\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx360\wrapdefault\faauto\ls1\rin0\lin720\itap0\pararsid12331322 {\rtlch\fcs1 -\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid16466704 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Open the family file \'93}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322\charrsid12331322 \hich\af1\dbch\af31505\loch\f1 DividedSurface.rfa}{\rtlch\fcs1 -\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid16466704 \loch\af1\dbch\af31505\hich\f1 \'94}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 in the sample\hich\f1 \rquote \loch\f1 s folder; -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 2.\tab}\hich\af1\dbch\af31505\loch\f1 Run the command; -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 \hich\af1\dbch\af31505\loch\f1 3.\tab}\hich\af1\dbch\af31505\loch\f1 The DividedSurface changes;}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid12331322\charrsid12331322 -\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12331322 -\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8 -72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7 -2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b -44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7 -065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000 -00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08 -84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc -52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353 -bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468 -656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c -070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7 -29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65 -312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8 -a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04 -98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c -94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471 -7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671 -9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1 -e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5 -193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1 -17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2 -8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6 -6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a -668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847 -bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e -16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b -5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0 -8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2 -c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966 -0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b -7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb -9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0 -088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf -8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26 -ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0 -28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6 -345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93 -b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30 -254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74 -68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24 -51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198 -720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528 -a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000 -000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000 -002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468 -656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000 -00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000 -00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000} -{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d -617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 -6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 -656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} -{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; -\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9; -\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7; -\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference; -\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000 -4d73786d6c322e534158584d4c5265616465722e352e3000000000000000000000060000 -d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f0000000000000000000000003035 -4d785dbfca01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 -000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/SDK/Samples/Massing/ManipulateForm/CS/ManipulateForm.csproj b/SDK/Samples/Massing/ManipulateForm/CS/ManipulateForm.csproj index bfae4977..4ef5a180 100644 --- a/SDK/Samples/Massing/ManipulateForm/CS/ManipulateForm.csproj +++ b/SDK/Samples/Massing/ManipulateForm/CS/ManipulateForm.csproj @@ -1,86 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {BB2EF34C-8AF6-439D-B8D3-3CE31FA6B4E7} - Library - Properties Revit.SDK.Samples.ManipulateForm.CS - ManipulateForm - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ManipulateForm.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ManipulateForm.xml - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Massing/MeasurePanelArea/CS/Command.cs b/SDK/Samples/Massing/MeasurePanelArea/CS/Command.cs index 577682b7..6965e36d 100644 --- a/SDK/Samples/Massing/MeasurePanelArea/CS/Command.cs +++ b/SDK/Samples/Massing/MeasurePanelArea/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/Massing/MeasurePanelArea/CS/FormPanelArea.cs b/SDK/Samples/Massing/MeasurePanelArea/CS/FormPanelArea.cs index 8fb73702..6df1ddbc 100644 --- a/SDK/Samples/Massing/MeasurePanelArea/CS/FormPanelArea.cs +++ b/SDK/Samples/Massing/MeasurePanelArea/CS/FormPanelArea.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -34,6 +34,7 @@ using Autodesk.Revit.UI; using Panel = Autodesk.Revit.DB.Panel; using Element = Autodesk.Revit.DB.Element; using Instance = Autodesk.Revit.DB.Instance; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.MeasurePanelArea.CS { @@ -356,6 +357,5 @@ namespace Revit.SDK.Samples.MeasurePanelArea.CS } return returns; } - } } \ No newline at end of file diff --git a/SDK/Samples/Massing/MeasurePanelArea/CS/MeasurePanelArea.csproj b/SDK/Samples/Massing/MeasurePanelArea/CS/MeasurePanelArea.csproj index c2009adf..15de814e 100644 --- a/SDK/Samples/Massing/MeasurePanelArea/CS/MeasurePanelArea.csproj +++ b/SDK/Samples/Massing/MeasurePanelArea/CS/MeasurePanelArea.csproj @@ -1,138 +1,14 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {C8EF18E0-E9E6-4F81-83DC-1581BABBB057} - Library - Properties Revit.SDK.Samples.MeasurePanelArea.CS - MeasurePanelArea - v4.8 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - Form - - - FormPanelArea.cs - - - - - FormPanelArea.cs - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Massing/MeasurePanelArea/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Massing/MeasurePanelArea/CS/Properties/AssemblyInfo.cs index 28633c8a..6613730d 100644 --- a/SDK/Samples/Massing/MeasurePanelArea/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Massing/MeasurePanelArea/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("DividedSurfaceAnalysis")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -34,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/Massing/NewForm/CS/Command.cs b/SDK/Samples/Massing/NewForm/CS/Command.cs index b44d5881..8bbc510b 100644 --- a/SDK/Samples/Massing/NewForm/CS/Command.cs +++ b/SDK/Samples/Massing/NewForm/CS/Command.cs @@ -402,8 +402,6 @@ namespace Revit.SDK.Samples.NewForm.CS modelcurve = FormUtils.MakeArc(commandData.Application, ptA, ptB, ptC); ref_ar.Append(modelcurve.GeometryCurve.Reference); ref_ar_ar.Append(ref_ar); - ref_ar = new ReferenceArray(); - ref_ar_ar.Append(ref_ar); Autodesk.Revit.DB.Form form = doc.FamilyCreate.NewLoftForm(true, ref_ar_ar); diff --git a/SDK/Samples/Massing/NewForm/CS/NewForm.csproj b/SDK/Samples/Massing/NewForm/CS/NewForm.csproj index 3b0ac18b..8aa00362 100644 --- a/SDK/Samples/Massing/NewForm/CS/NewForm.csproj +++ b/SDK/Samples/Massing/NewForm/CS/NewForm.csproj @@ -1,85 +1,24 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {DA7BD106-7313-443F-8AC6-18A1FF28ECE4} - Library - Properties Revit.SDK.Samples.NewForm.CS - NewForm - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - 3.5 - - - 3.5 - - - 3.5 - - - + - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/Command.cs b/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/Command.cs index 719bdae7..beff5f5d 100644 --- a/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/Command.cs +++ b/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -28,6 +28,8 @@ using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.PanelEdgeLengthAngle.CS { /// @@ -81,7 +83,7 @@ namespace Revit.SDK.Samples.PanelEdgeLengthAngle.CS // step 3: compute the length and angle and set them to the parameters InstParameters instParams = GetParams(inst); EdgeArray edges = GetEdges(inst); - SetParams(edges, instParams); + SetParams(m_doc, edges, instParams); } } return Autodesk.Revit.UI.Result.Succeeded; @@ -166,9 +168,10 @@ namespace Revit.SDK.Samples.PanelEdgeLengthAngle.CS /// /// Compute the length and angle data of the edges, then update the parameters with these values /// + /// The active document. /// The edges of the curtain panel /// The parameters which records the length and angle data - private void SetParams(EdgeArray edge_ar, InstParameters instParams) + private void SetParams(Document document, EdgeArray edge_ar, InstParameters instParams) { double length4 = 0d; double angle3 = 0d; @@ -194,14 +197,21 @@ namespace Revit.SDK.Samples.PanelEdgeLengthAngle.CS angle4 = AngleBetweenEdges(edge4, edge1); } - instParams["Length1"].Set(length1); - instParams["Length2"].Set(length2); - instParams["Length3"].Set(length3); - instParams["Length4"].Set(length4); - instParams["Angle1"].Set(angle1); - instParams["Angle2"].Set(angle2); - instParams["Angle3"].Set(angle3); - instParams["Angle4"].Set(angle4); + using (Transaction transaction = new Transaction(document, "Update family instance parameters")) + { + transaction.Start(); + + instParams["Length1"].Set(length1); + instParams["Length2"].Set(length2); + instParams["Length3"].Set(length3); + instParams["Length4"].Set(length4); + instParams["Angle1"].Set(angle1); + instParams["Angle2"].Set(angle2); + instParams["Angle3"].Set(angle3); + instParams["Angle4"].Set(angle4); + + transaction.Commit(); + } } /// diff --git a/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/PanelEdgeLengthAngle.csproj b/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/PanelEdgeLengthAngle.csproj index 41a54849..87eea9cb 100644 --- a/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/PanelEdgeLengthAngle.csproj +++ b/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/PanelEdgeLengthAngle.csproj @@ -1,78 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {5DB5F654-5829-4B0E-BB6B-E3895625E49A} - Library - Properties Revit.SDK.Samples.PanelEdgeLengthAngle.CS - PanelEdgeLengthAngle - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/Properties/AssemblyInfo.cs index 61217ec5..95949e4f 100644 --- a/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Massing/PanelEdgeLengthAngle/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk, Inc.")] [assembly: AssemblyProduct("PanelEdgeLengthAngle")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/CS/Command.cs b/SDK/Samples/Massing/ParameterValuesFromImage/CS/Command.cs index ecba4f25..1f75f1cc 100644 --- a/SDK/Samples/Massing/ParameterValuesFromImage/CS/Command.cs +++ b/SDK/Samples/Massing/ParameterValuesFromImage/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/CS/ParameterValuesFromImage.csproj b/SDK/Samples/Massing/ParameterValuesFromImage/CS/ParameterValuesFromImage.csproj index 55f0c52c..72743041 100644 --- a/SDK/Samples/Massing/ParameterValuesFromImage/CS/ParameterValuesFromImage.csproj +++ b/SDK/Samples/Massing/ParameterValuesFromImage/CS/ParameterValuesFromImage.csproj @@ -1,89 +1,22 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {D58D3CE6-43A4-4EBD-B034-16EFB738FA37} - Library - Properties Revit.SDK.Samples.ParameterValuesFromImage.CS - ParameterValuesFromImage - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - 3.5 - - - - 3.5 - - - 3.5 - - - + - - - - - - None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Massing/ParameterValuesFromImage/CS/Properties/AssemblyInfo.cs index 126522eb..a033cbb8 100644 --- a/SDK/Samples/Massing/ParameterValuesFromImage/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Massing/ParameterValuesFromImage/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("ParamValueFromImage")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -34,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale.bmp b/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale.bmp deleted file mode 100644 index 90c809b3..00000000 Binary files a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale.bmp and /dev/null differ diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale2.bmp b/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale2.bmp deleted file mode 100644 index b926e782..00000000 Binary files a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale2.bmp and /dev/null differ diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale3.bmp b/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale3.bmp deleted file mode 100644 index ab043b4c..00000000 Binary files a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale3.bmp and /dev/null differ diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale4.bmp b/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale4.bmp deleted file mode 100644 index abbe034b..00000000 Binary files a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale4.bmp and /dev/null differ diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale5.bmp b/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale5.bmp deleted file mode 100644 index 879ecbda..00000000 Binary files a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale5.bmp and /dev/null differ diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale6.bmp b/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale6.bmp deleted file mode 100644 index 5b859506..00000000 Binary files a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale6.bmp and /dev/null differ diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale7.bmp b/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale7.bmp deleted file mode 100644 index f2e0afb8..00000000 Binary files a/SDK/Samples/Massing/ParameterValuesFromImage/Tower.rfa_grayscale7.bmp and /dev/null differ diff --git a/SDK/Samples/Massing/ParameterValuesFromImage/brickFanWall.rfa_grayscale.bmp b/SDK/Samples/Massing/ParameterValuesFromImage/brickFanWall.rfa_grayscale.bmp deleted file mode 100644 index 922bc249..00000000 Binary files a/SDK/Samples/Massing/ParameterValuesFromImage/brickFanWall.rfa_grayscale.bmp and /dev/null differ diff --git a/SDK/Samples/Massing/PointCurveCreation/CS/PointCurveCreation.csproj b/SDK/Samples/Massing/PointCurveCreation/CS/PointCurveCreation.csproj index 7ed9f780..d9b6108f 100644 --- a/SDK/Samples/Massing/PointCurveCreation/CS/PointCurveCreation.csproj +++ b/SDK/Samples/Massing/PointCurveCreation/CS/PointCurveCreation.csproj @@ -1,88 +1,27 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {0413877F-9549-46A7-8BD5-C6583E74764A} - Library - Properties Revit.SDK.Samples.PointCurveCreation.CS - PointCurveCreation - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - 3.5 - - - 3.5 - - - 3.5 - - - + - - - - - - None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/MaterialProperties/CS/AssemblyInfo.cs b/SDK/Samples/MaterialProperties/CS/AssemblyInfo.cs index 0a9dfe3f..29e7d0dd 100644 --- a/SDK/Samples/MaterialProperties/CS/AssemblyInfo.cs +++ b/SDK/Samples/MaterialProperties/CS/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -34,7 +34,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -79,3 +79,5 @@ using System.Runtime.CompilerServices; [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/MaterialProperties/CS/MaterialProperties.cs b/SDK/Samples/MaterialProperties/CS/MaterialProperties.cs index 5b53e08f..1ec44629 100644 --- a/SDK/Samples/MaterialProperties/CS/MaterialProperties.cs +++ b/SDK/Samples/MaterialProperties/CS/MaterialProperties.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -165,7 +165,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS if (!Init()) { // there must be exactly one beam, column or brace selected - TaskDialog.Show("Revit", "You should select only one beam, structural column or brace."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "You should select only one beam, structural column or brace."); return Autodesk.Revit.UI.Result.Failed; } @@ -178,7 +178,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS } catch { - TaskDialog.Show("Revit", "Sorry that your command failed."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Sorry that your command failed."); return Autodesk.Revit.UI.Result.Failed; } documentTransaction.Commit(); diff --git a/SDK/Samples/MaterialProperties/CS/MaterialProperties.csproj b/SDK/Samples/MaterialProperties/CS/MaterialProperties.csproj index 5d5eb4ba..7d9e44f2 100644 --- a/SDK/Samples/MaterialProperties/CS/MaterialProperties.csproj +++ b/SDK/Samples/MaterialProperties/CS/MaterialProperties.csproj @@ -1,144 +1,27 @@ - - + Local - 9.0.30729 - 2.0 - {4AD14A32-1CFA-4843-A645-E34FA2868F57} - Debug - AnyCPU - - - - - MaterialProperties - - JScript Grid IE50 false - Library - MaterialProperties - OnBuildSuccess - - - - - - - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - true - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - true - 4 - none - prompt + + false + - true - bin\x64\Debug\ - DEBUG;TRACE 285212672 4096 - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE 285212672 - true true 4096 - x64 - prompt MinimumRecommendedRules.ruleset + - OnOutputUpdated - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - Code - - - Code - - - Form - - - MaterialPropertiesForm.cs - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/MaterialProperties/CS/MaterialPropertiesForm.cs b/SDK/Samples/MaterialProperties/CS/MaterialPropertiesForm.cs index 4fdfc2b8..57e513c8 100644 --- a/SDK/Samples/MaterialProperties/CS/MaterialPropertiesForm.cs +++ b/SDK/Samples/MaterialProperties/CS/MaterialPropertiesForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -45,7 +45,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS private System.Windows.Forms.Button cancelButton; private System.Windows.Forms.Button applyButton; private System.Windows.Forms.Button changeButton; - private System.Windows.Forms.DataGrid parameterDataGrid; + private System.Windows.Forms.DataGridView parameterDataGridView; /// /// Required designer variable. @@ -66,8 +66,8 @@ namespace Revit.SDK.Samples.MaterialProperties.CS // Required for Windows Form Designer support // InitializeComponent(); - parameterDataGrid.PreferredColumnWidth = parameterDataGrid.Width / 2 - 2; - + //parameterDataGrid.PreferredColumnWidth = parameterDataGrid.Width / 2 - 2; + m_dataBuffer = dataBuffer; } @@ -79,10 +79,24 @@ namespace Revit.SDK.Samples.MaterialProperties.CS if (disposing) { if (components != null) - { - components.Dispose(); - } - } + components.Dispose(); + if (typeLable != null) + typeLable.Dispose(); + if (typeComboBox != null) + typeComboBox.Dispose(); + if (subTypeComboBox != null) + subTypeComboBox.Dispose(); + if (okButton != null) + okButton.Dispose(); + if (cancelButton != null) + cancelButton.Dispose(); + if (applyButton != null) + applyButton.Dispose(); + if (changeButton != null) + changeButton.Dispose(); + if (parameterDataGridView != null) + parameterDataGridView.Dispose(); + } base.Dispose(disposing); } @@ -98,12 +112,12 @@ namespace Revit.SDK.Samples.MaterialProperties.CS this.typeLable = new System.Windows.Forms.Label(); this.typeComboBox = new System.Windows.Forms.ComboBox(); this.subTypeComboBox = new System.Windows.Forms.ComboBox(); - this.parameterDataGrid = new System.Windows.Forms.DataGrid(); + this.parameterDataGridView = new System.Windows.Forms.DataGridView(); this.okButton = new System.Windows.Forms.Button(); this.cancelButton = new System.Windows.Forms.Button(); this.applyButton = new System.Windows.Forms.Button(); this.changeButton = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.parameterDataGrid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.parameterDataGridView)).BeginInit(); this.SuspendLayout(); // // typeLable @@ -136,16 +150,16 @@ namespace Revit.SDK.Samples.MaterialProperties.CS // // parameterDataGrid // - this.parameterDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.parameterDataGrid.CaptionVisible = false; - this.parameterDataGrid.DataMember = ""; - this.parameterDataGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText; - this.parameterDataGrid.Location = new System.Drawing.Point(16, 88); - this.parameterDataGrid.Name = "parameterDataGrid"; - this.parameterDataGrid.ReadOnly = true; - this.parameterDataGrid.RowHeadersVisible = false; - this.parameterDataGrid.Size = new System.Drawing.Size(480, 380); - this.parameterDataGrid.TabIndex = 4; + this.parameterDataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + //this.parameterDataGrid.CaptionVisible = false; + this.parameterDataGridView.DataMember = ""; + //this.parameterDataGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText; + this.parameterDataGridView.Location = new System.Drawing.Point(16, 88); + this.parameterDataGridView.Name = "parameterDataGrid"; + this.parameterDataGridView.ReadOnly = true; + this.parameterDataGridView.RowHeadersVisible = false; + this.parameterDataGridView.Size = new System.Drawing.Size(480, 380); + this.parameterDataGridView.TabIndex = 4; // // okButton // @@ -197,7 +211,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS this.Controls.Add(this.applyButton); this.Controls.Add(this.cancelButton); this.Controls.Add(this.okButton); - this.Controls.Add(this.parameterDataGrid); + this.Controls.Add(this.parameterDataGridView); this.Controls.Add(this.subTypeComboBox); this.Controls.Add(this.typeComboBox); this.Controls.Add(this.typeLable); @@ -208,7 +222,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS this.ShowInTaskbar = false; this.Text = "Material Properties"; this.Load += new System.EventHandler(this.MaterialPropFrm_Load); - ((System.ComponentModel.ISupportInitialize)(this.parameterDataGrid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.parameterDataGridView)).EndInit(); this.ResumeLayout(false); } @@ -239,7 +253,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS subTypeComboBox.DataSource = m_dataBuffer.SteelCollection; subTypeComboBox.DisplayMember = "MaterialName"; subTypeComboBox.ValueMember = "Material"; - parameterDataGrid.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, (StructuralAssetClass)typeComboBox.SelectedIndex); + parameterDataGridView.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, (StructuralAssetClass)typeComboBox.SelectedIndex); } else if ((StructuralAssetClass)typeComboBox.SelectedIndex == StructuralAssetClass.Concrete) { @@ -249,7 +263,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS subTypeComboBox.DataSource = m_dataBuffer.ConcreteCollection; subTypeComboBox.DisplayMember = "MaterialName"; subTypeComboBox.ValueMember = "Material"; - parameterDataGrid.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, (StructuralAssetClass)typeComboBox.SelectedIndex); + parameterDataGridView.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, (StructuralAssetClass)typeComboBox.SelectedIndex); } else { @@ -257,7 +271,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS changeButton.Enabled = false; subTypeComboBox.DataSource = new ArrayList(); subTypeComboBox.Enabled = false; - parameterDataGrid.DataSource = new DataTable(); + parameterDataGridView.DataSource = new DataTable(); } } @@ -274,7 +288,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS m_dataBuffer.UpdateMaterial(subTypeComboBox.SelectedValue); } - parameterDataGrid.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, (StructuralAssetClass)typeComboBox.SelectedIndex); + parameterDataGridView.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, (StructuralAssetClass)typeComboBox.SelectedIndex); } /// @@ -326,11 +340,11 @@ namespace Revit.SDK.Samples.MaterialProperties.CS /// private void changeButton_Click(object sender, System.EventArgs e) { - TaskDialog.Show("Revit", "This will change the unit weight of all instances that use this material in current document."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "This will change the unit weight of all instances that use this material in current document."); if (!m_dataBuffer.ChangeUnitWeight()) { - TaskDialog.Show("Revit", "Failed to change the unit weight."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Failed to change the unit weight."); return; } LoadCurrentMaterial(); @@ -355,7 +369,7 @@ namespace Revit.SDK.Samples.MaterialProperties.CS return; subTypeComboBox.SelectedValue = tmp; - parameterDataGrid.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, (StructuralAssetClass)typeComboBox.SelectedIndex); + parameterDataGridView.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, (StructuralAssetClass)typeComboBox.SelectedIndex); } } } \ No newline at end of file diff --git a/SDK/Samples/MaterialProperties/VB.NET/AssemblyInfo.vb b/SDK/Samples/MaterialProperties/VB.NET/AssemblyInfo.vb index 1c79c024..4bea01b1 100644 --- a/SDK/Samples/MaterialProperties/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/MaterialProperties/VB.NET/AssemblyInfo.vb @@ -1,5 +1,5 @@ ' -' (C) Copyright 2003-2019 by Autodesk, Inc. +' (C) Copyright 2003-2023 by Autodesk, Inc. ' ' Permission to use, copy, modify, and distribute this software in ' object code form for any purpose and without fee is hereby granted, @@ -52,4 +52,6 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + + \ No newline at end of file diff --git a/SDK/Samples/MaterialProperties/VB.NET/MaterialProperties.vb b/SDK/Samples/MaterialProperties/VB.NET/MaterialProperties.vb index 1f4c824a..a92edf07 100644 --- a/SDK/Samples/MaterialProperties/VB.NET/MaterialProperties.vb +++ b/SDK/Samples/MaterialProperties/VB.NET/MaterialProperties.vb @@ -29,7 +29,7 @@ Imports System.Collections Imports Autodesk.Revit.DB Imports Autodesk.Revit.UI -Imports Autodesk.Revit.DB.Structure +Imports autodesk.Revit.DB.Structure ' All Autodesk Revit external commands must support this interface @@ -168,7 +168,7 @@ Public Class MaterialProperties m_revit = revit If Not (Init()) Then 'there must be exactly one beam, column or brace selected - TaskDialog.Show("Revit", "You should select only one beam, structural column or brace.") + Autodesk.Revit.UI.TaskDialog.Show("Revit", "You should select only one beam, structural column or brace.") Return Autodesk.Revit.UI.Result.Failed End If @@ -178,7 +178,7 @@ Public Class MaterialProperties Try displayForm.ShowDialog() Catch ex As Exception - TaskDialog.Show("Revit", "Sorry that your command failed.") + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Sorry that your command failed.") Return Autodesk.Revit.UI.Result.Failed End Try documentTransaction.Commit() diff --git a/SDK/Samples/MaterialProperties/VB.NET/MaterialProperties.vbproj b/SDK/Samples/MaterialProperties/VB.NET/MaterialProperties.vbproj index c5cacfec..0a487758 100644 --- a/SDK/Samples/MaterialProperties/VB.NET/MaterialProperties.vbproj +++ b/SDK/Samples/MaterialProperties/VB.NET/MaterialProperties.vbproj @@ -1,150 +1,23 @@ - - + Local - 9.0.30729 - 2.0 - {A4DABB0B-29A5-4749-BBD5-224D942E718E} - Debug - AnyCPU - - - - - MaterialProperties - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.MaterialProperties.VB.NET Revit.SDK.Samples.MaterialProperties.VB.NET.%28None%29 - - Windows - - - v4.8 - - - - bin\ - - 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false + true + true - - bin\ - - - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - Form - - - MaterialPropertiesForm.vb - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/MaterialProperties/VB.NET/MaterialPropertiesForm.vb b/SDK/Samples/MaterialProperties/VB.NET/MaterialPropertiesForm.vb index 05f089b6..3d03313d 100644 --- a/SDK/Samples/MaterialProperties/VB.NET/MaterialPropertiesForm.vb +++ b/SDK/Samples/MaterialProperties/VB.NET/MaterialPropertiesForm.vb @@ -63,225 +63,225 @@ Public Class MaterialPropertiesForm Friend WithEvents changeButton As System.Windows.Forms.Button Friend WithEvents applyButton As System.Windows.Forms.Button Friend WithEvents okButton As System.Windows.Forms.Button - Friend WithEvents parameterDataGrid As System.Windows.Forms.DataGrid - Friend WithEvents subTypeComboBox As System.Windows.Forms.ComboBox - Friend WithEvents typeComboBox As System.Windows.Forms.ComboBox - Friend WithEvents typeLable As System.Windows.Forms.Label - Friend WithEvents exitButton As System.Windows.Forms.Button - Private Sub InitializeComponent() - Me.changeButton = New System.Windows.Forms.Button - Me.applyButton = New System.Windows.Forms.Button - Me.exitButton = New System.Windows.Forms.Button - Me.okButton = New System.Windows.Forms.Button - Me.parameterDataGrid = New System.Windows.Forms.DataGrid - Me.subTypeComboBox = New System.Windows.Forms.ComboBox - Me.typeComboBox = New System.Windows.Forms.ComboBox - Me.typeLable = New System.Windows.Forms.Label - CType(Me.parameterDataGrid, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SuspendLayout() - ' - 'changeButton - ' - Me.changeButton.Location = New System.Drawing.Point(353, 455) - Me.changeButton.Name = "changeButton" - Me.changeButton.Size = New System.Drawing.Size(128, 23) - Me.changeButton.TabIndex = 16 - Me.changeButton.Text = "Change &Unit Weight" - ' - 'applyButton - ' - Me.applyButton.Location = New System.Drawing.Point(267, 455) - Me.applyButton.Name = "applyButton" - Me.applyButton.Size = New System.Drawing.Size(75, 23) - Me.applyButton.TabIndex = 15 - Me.applyButton.Text = "&Apply" - ' - 'exitButton - ' - Me.exitButton.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.exitButton.Location = New System.Drawing.Point(173, 455) - Me.exitButton.Name = "exitButton" - Me.exitButton.Size = New System.Drawing.Size(75, 23) - Me.exitButton.TabIndex = 14 - Me.exitButton.Text = "&Cancel" - ' - 'okButton - ' - Me.okButton.Location = New System.Drawing.Point(87, 455) - Me.okButton.Name = "okButton" - Me.okButton.Size = New System.Drawing.Size(75, 23) - Me.okButton.TabIndex = 13 - Me.okButton.Text = "&OK" - ' - 'parameterDataGrid - ' - Me.parameterDataGrid.CaptionVisible = False - Me.parameterDataGrid.DataMember = "" - Me.parameterDataGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText - Me.parameterDataGrid.Location = New System.Drawing.Point(12, 69) - Me.parameterDataGrid.Name = "parameterDataGrid" - Me.parameterDataGrid.ReadOnly = True - Me.parameterDataGrid.RowHeadersVisible = False - Me.parameterDataGrid.Size = New System.Drawing.Size(480, 380) - Me.parameterDataGrid.TabIndex = 12 - ' - 'subTypeComboBox - ' - Me.subTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList - Me.subTypeComboBox.Location = New System.Drawing.Point(100, 42) - Me.subTypeComboBox.Name = "subTypeComboBox" - Me.subTypeComboBox.Size = New System.Drawing.Size(264, 21) - Me.subTypeComboBox.TabIndex = 11 - ' - 'typeComboBox - ' - Me.typeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList - Me.typeComboBox.Location = New System.Drawing.Point(100, 7) - Me.typeComboBox.Name = "typeComboBox" - Me.typeComboBox.Size = New System.Drawing.Size(264, 21) - Me.typeComboBox.TabIndex = 10 - ' - 'typeLable - ' - Me.typeLable.Location = New System.Drawing.Point(13, 7) - Me.typeLable.Name = "typeLable" - Me.typeLable.Size = New System.Drawing.Size(80, 23) - Me.typeLable.TabIndex = 9 - Me.typeLable.Text = "Material Type:" - ' - 'MaterialPropertiesForm - ' - Me.AcceptButton = Me.okButton - Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) - Me.CancelButton = Me.exitButton - Me.ClientSize = New System.Drawing.Size(502, 481) - Me.Controls.Add(Me.changeButton) - Me.Controls.Add(Me.applyButton) - Me.Controls.Add(Me.exitButton) - Me.Controls.Add(Me.okButton) - Me.Controls.Add(Me.parameterDataGrid) - Me.Controls.Add(Me.subTypeComboBox) - Me.Controls.Add(Me.typeComboBox) - Me.Controls.Add(Me.typeLable) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog - Me.MaximizeBox = False - Me.MinimizeBox = False - Me.Name = "MaterialPropertiesForm" - Me.ShowInTaskbar = False - Me.Text = "Material Properties" - CType(Me.parameterDataGrid, System.ComponentModel.ISupportInitialize).EndInit() - Me.ResumeLayout(False) + Friend WithEvents parameterDataGridView As System.Windows.Forms.DataGridView + Friend WithEvents subTypeComboBox As System.Windows.Forms.ComboBox + Friend WithEvents typeComboBox As System.Windows.Forms.ComboBox + Friend WithEvents typeLable As System.Windows.Forms.Label + Friend WithEvents exitButton As System.Windows.Forms.Button + Private Sub InitializeComponent() + Me.changeButton = New System.Windows.Forms.Button + Me.applyButton = New System.Windows.Forms.Button + Me.exitButton = New System.Windows.Forms.Button + Me.okButton = New System.Windows.Forms.Button + Me.parameterDataGridView = New System.Windows.Forms.DataGridView + Me.subTypeComboBox = New System.Windows.Forms.ComboBox + Me.typeComboBox = New System.Windows.Forms.ComboBox + Me.typeLable = New System.Windows.Forms.Label + CType(Me.parameterDataGridView, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'changeButton + ' + Me.changeButton.Location = New System.Drawing.Point(353, 455) + Me.changeButton.Name = "changeButton" + Me.changeButton.Size = New System.Drawing.Size(128, 23) + Me.changeButton.TabIndex = 16 + Me.changeButton.Text = "Change &Unit Weight" + ' + 'applyButton + ' + Me.applyButton.Location = New System.Drawing.Point(267, 455) + Me.applyButton.Name = "applyButton" + Me.applyButton.Size = New System.Drawing.Size(75, 23) + Me.applyButton.TabIndex = 15 + Me.applyButton.Text = "&Apply" + ' + 'exitButton + ' + Me.exitButton.DialogResult = System.Windows.Forms.DialogResult.Cancel + Me.exitButton.Location = New System.Drawing.Point(173, 455) + Me.exitButton.Name = "exitButton" + Me.exitButton.Size = New System.Drawing.Size(75, 23) + Me.exitButton.TabIndex = 14 + Me.exitButton.Text = "&Cancel" + ' + 'okButton + ' + Me.okButton.Location = New System.Drawing.Point(87, 455) + Me.okButton.Name = "okButton" + Me.okButton.Size = New System.Drawing.Size(75, 23) + Me.okButton.TabIndex = 13 + Me.okButton.Text = "&OK" + ' + 'parameterDataGridView + ' + 'Me.parameterDataGridView.CaptionVisible = False + Me.parameterDataGridView.DataMember = "" + 'Me.parameterDataGridView.HeaderForeColor = System.Drawing.SystemColors.ControlText + Me.parameterDataGridView.Location = New System.Drawing.Point(12, 69) + Me.parameterDataGridView.Name = "parameterDataGridView" + Me.parameterDataGridView.ReadOnly = True + Me.parameterDataGridView.RowHeadersVisible = False + Me.parameterDataGridView.Size = New System.Drawing.Size(480, 380) + Me.parameterDataGridView.TabIndex = 12 + ' + 'subTypeComboBox + ' + Me.subTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.subTypeComboBox.Location = New System.Drawing.Point(100, 42) + Me.subTypeComboBox.Name = "subTypeComboBox" + Me.subTypeComboBox.Size = New System.Drawing.Size(264, 21) + Me.subTypeComboBox.TabIndex = 11 + ' + 'typeComboBox + ' + Me.typeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.typeComboBox.Location = New System.Drawing.Point(100, 7) + Me.typeComboBox.Name = "typeComboBox" + Me.typeComboBox.Size = New System.Drawing.Size(264, 21) + Me.typeComboBox.TabIndex = 10 + ' + 'typeLable + ' + Me.typeLable.Location = New System.Drawing.Point(13, 7) + Me.typeLable.Name = "typeLable" + Me.typeLable.Size = New System.Drawing.Size(80, 23) + Me.typeLable.TabIndex = 9 + Me.typeLable.Text = "Material Type:" + ' + 'MaterialPropertiesForm + ' + Me.AcceptButton = Me.okButton + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) + Me.CancelButton = Me.exitButton + Me.ClientSize = New System.Drawing.Size(502, 481) + Me.Controls.Add(Me.changeButton) + Me.Controls.Add(Me.applyButton) + Me.Controls.Add(Me.exitButton) + Me.Controls.Add(Me.okButton) + Me.Controls.Add(Me.parameterDataGridView) + Me.Controls.Add(Me.subTypeComboBox) + Me.Controls.Add(Me.typeComboBox) + Me.Controls.Add(Me.typeLable) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "MaterialPropertiesForm" + Me.ShowInTaskbar = False + Me.Text = "Material Properties" + CType(Me.parameterDataGridView, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) - End Sub + End Sub #End Region - Dim m_dataBuffer As MaterialProperties = Nothing + Dim m_dataBuffer As MaterialProperties = Nothing - 'set selected element's material to current selection and close form - Private Sub okButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles okButton.Click - If Not (subTypeComboBox.SelectedValue Is Nothing) Then - m_dataBuffer.SetMaterial(subTypeComboBox.SelectedValue) - End If - Me.Close() - End Sub + 'set selected element's material to current selection and close form + Private Sub okButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles okButton.Click + If Not (subTypeComboBox.SelectedValue Is Nothing) Then + m_dataBuffer.SetMaterial(subTypeComboBox.SelectedValue) + End If + Me.Close() + End Sub - 'close form - Private Sub cancelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click - Me.Close() - End Sub + 'close form + Private Sub cancelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click + Me.Close() + End Sub - 'set selected element's material to current selection - Private Sub applyButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles applyButton.Click - If Not (subTypeComboBox.SelectedValue Is Nothing) Then - m_dataBuffer.SetMaterial(subTypeComboBox.SelectedValue) - End If - End Sub + 'set selected element's material to current selection + Private Sub applyButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles applyButton.Click + If Not (subTypeComboBox.SelectedValue Is Nothing) Then + m_dataBuffer.SetMaterial(subTypeComboBox.SelectedValue) + End If + End Sub - 'change unit weight all instances of the elements that use this material - Private Sub changeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles changeButton.Click - Autodesk.Revit.UI.TaskDialog.Show("Revit", "This will change the unit weight of all instances that use this material in current document.") + 'change unit weight all instances of the elements that use this material + Private Sub changeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles changeButton.Click + Autodesk.Revit.UI.TaskDialog.Show("Revit", "This will change the unit weight of all instances that use this material in current document.") - If Not (m_dataBuffer.ChangeUnitWeight()) Then - Autodesk.Revit.UI.TaskDialog.Show("Revit", "Failed to change the unit weight.") + If Not (m_dataBuffer.ChangeUnitWeight()) Then + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Failed to change the unit weight.") + Return + End If + LoadCurrentMaterial() + End Sub + + ' when typeComboBox changed, then update the subTypeCombobox + Private Sub typeComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles typeComboBox.SelectedIndexChanged + If (CType(typeComboBox.SelectedIndex, StructuralAssetClass) = StructuralAssetClass.Metal) Then + applyButton.Enabled = True + changeButton.Enabled = True + subTypeComboBox.Enabled = True + subTypeComboBox.DataSource = m_dataBuffer.SteelCollection + subTypeComboBox.DisplayMember = "MaterialName" + subTypeComboBox.ValueMember = "Material" + parameterDataGridView.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, CType(typeComboBox.SelectedIndex, StructuralAssetClass)) + ElseIf (CType(typeComboBox.SelectedIndex, StructuralAssetClass) = StructuralAssetClass.Concrete) Then + applyButton.Enabled = True + changeButton.Enabled = True + subTypeComboBox.Enabled = True + subTypeComboBox.DataSource = m_dataBuffer.ConcreteCollection + subTypeComboBox.DisplayMember = "MaterialName" + subTypeComboBox.ValueMember = "Material" + parameterDataGridView.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, CType(typeComboBox.SelectedIndex, StructuralAssetClass)) + Else + applyButton.Enabled = False + changeButton.Enabled = False + subTypeComboBox.DataSource = New ArrayList + subTypeComboBox.Enabled = False + parameterDataGridView.DataSource = New DataTable + End If + + If typeComboBox.SelectedIndex = CInt(m_dataBuffer.CurrentType) Then + If (m_dataBuffer.CurrentMaterial Is Nothing Or (m_dataBuffer.CurrentType <> StructuralAssetClass.Metal And m_dataBuffer.CurrentType <> StructuralAssetClass.Concrete)) Then Return - End If - LoadCurrentMaterial() - End Sub + End If - ' when typeComboBox changed, then update the subTypeCombobox - Private Sub typeComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles typeComboBox.SelectedIndexChanged - If (CType(typeComboBox.SelectedIndex, StructuralAssetClass) = StructuralAssetClass.Metal) Then - applyButton.Enabled = True - changeButton.Enabled = True - subTypeComboBox.Enabled = True - subTypeComboBox.DataSource = m_dataBuffer.SteelCollection - subTypeComboBox.DisplayMember = "MaterialName" - subTypeComboBox.ValueMember = "Material" - parameterDataGrid.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, CType(typeComboBox.SelectedIndex, StructuralAssetClass)) - ElseIf (CType(typeComboBox.SelectedIndex, StructuralAssetClass) = StructuralAssetClass.Concrete) Then - applyButton.Enabled = True - changeButton.Enabled = True - subTypeComboBox.Enabled = True - subTypeComboBox.DataSource = m_dataBuffer.ConcreteCollection - subTypeComboBox.DisplayMember = "MaterialName" - subTypeComboBox.ValueMember = "Material" - parameterDataGrid.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, CType(typeComboBox.SelectedIndex, StructuralAssetClass)) - Else - applyButton.Enabled = False - changeButton.Enabled = False - subTypeComboBox.DataSource = New ArrayList - subTypeComboBox.Enabled = False - parameterDataGrid.DataSource = New DataTable - End If - - If typeComboBox.SelectedIndex = CInt(m_dataBuffer.CurrentType) Then - If (m_dataBuffer.CurrentMaterial Is Nothing Or (m_dataBuffer.CurrentType <> StructuralAssetClass.Metal And m_dataBuffer.CurrentType <> StructuralAssetClass.Concrete)) Then - Return - End If - - Dim tmp As Autodesk.Revit.DB.Material - tmp = m_dataBuffer.CurrentMaterial - If (tmp Is Nothing) Then - Return - End If - subTypeComboBox.SelectedValue = tmp - parameterDataGrid.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, _ + Dim tmp As Autodesk.Revit.DB.Material + tmp = m_dataBuffer.CurrentMaterial + If (tmp Is Nothing) Then + Return + End If + subTypeComboBox.SelectedValue = tmp + parameterDataGridView.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, CType(typeComboBox.SelectedIndex, StructuralAssetClass)) - ElseIf subTypeComboBox.Items.Count = 0 Then - parameterDataGrid.DataSource = New DataTable - End If - End Sub + ElseIf subTypeComboBox.Items.Count = 0 Then + parameterDataGridView.DataSource = New DataTable + End If + End Sub - 'change the content in datagrid according to selected material type - Private Sub subTypeComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles subTypeComboBox.SelectedIndexChanged - If subTypeComboBox.SelectedValue Is Nothing Then - parameterDataGrid.DataSource = New DataTable - End If - parameterDataGrid.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, CType(typeComboBox.SelectedIndex, StructuralAssetClass)) - End Sub + 'change the content in datagrid according to selected material type + Private Sub subTypeComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles subTypeComboBox.SelectedIndexChanged + If subTypeComboBox.SelectedValue Is Nothing Then + parameterDataGridView.DataSource = New DataTable + End If + parameterDataGridView.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, CType(typeComboBox.SelectedIndex, StructuralAssetClass)) + End Sub - 'update display data to selected element's material - Private Sub LoadCurrentMaterial() - typeComboBox.DataSource = m_dataBuffer.MaterialTypes - typeComboBox.SelectedIndex = CInt(m_dataBuffer.CurrentType) - If (m_dataBuffer.CurrentMaterial Is Nothing Or (m_dataBuffer.CurrentType <> StructuralAssetClass.Metal And m_dataBuffer.CurrentType <> StructuralAssetClass.Concrete)) Then - Return - End If + 'update display data to selected element's material + Private Sub LoadCurrentMaterial() + typeComboBox.DataSource = m_dataBuffer.MaterialTypes + typeComboBox.SelectedIndex = CInt(m_dataBuffer.CurrentType) + If (m_dataBuffer.CurrentMaterial Is Nothing Or (m_dataBuffer.CurrentType <> StructuralAssetClass.Metal And m_dataBuffer.CurrentType <> StructuralAssetClass.Concrete)) Then + Return + End If - Dim tmp As Autodesk.Revit.DB.Material - tmp = m_dataBuffer.CurrentMaterial - If (tmp Is Nothing) Then - Return - End If - subTypeComboBox.SelectedValue = tmp - parameterDataGrid.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, _ + Dim tmp As autodesk.Revit.DB.Material + tmp = m_dataBuffer.CurrentMaterial + If (tmp Is Nothing) Then + Return + End If + subTypeComboBox.SelectedValue = tmp + parameterDataGridView.DataSource = m_dataBuffer.GetParameterTable(subTypeComboBox.SelectedValue, CType(typeComboBox.SelectedIndex, StructuralAssetClass)) - End Sub + End Sub - ' when the form loading, then load the current material of your selected beam, column or brace - Private Sub MaterialPropertiesForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load - parameterDataGrid.PreferredColumnWidth = parameterDataGrid.Width / 2 - 2 - LoadCurrentMaterial() + ' when the form loading, then load the current material of your selected beam, column or brace + Private Sub MaterialPropertiesForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load + 'parameterDataGridView.PreferredColumnWidth = parameterDataGridView.Width / 2 - 2 + LoadCurrentMaterial() End Sub End Class diff --git a/SDK/Samples/MaterialQuantities/CS/MaterialQuantities.cs b/SDK/Samples/MaterialQuantities/CS/MaterialQuantities.cs index 7f30454f..815d7653 100644 --- a/SDK/Samples/MaterialQuantities/CS/MaterialQuantities.cs +++ b/SDK/Samples/MaterialQuantities/CS/MaterialQuantities.cs @@ -40,7 +40,7 @@ namespace Revit.Samples.MaterialQuantities [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] [Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)] - public class Command : IExternalCommand + public class Command : IExternalCommand, IDisposable { static AddInId appId = new AddInId(new Guid("7E5CAC0D-F3D8-4040-89D6-0828D681561B")); /// @@ -98,6 +98,20 @@ namespace Revit.Samples.MaterialQuantities private TextWriter m_writer; #endregion + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_writer != null) + m_writer.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } /// diff --git a/SDK/Samples/MaterialQuantities/CS/MaterialQuantities.csproj b/SDK/Samples/MaterialQuantities/CS/MaterialQuantities.csproj index aa32b0bf..75ed1c5c 100644 --- a/SDK/Samples/MaterialQuantities/CS/MaterialQuantities.csproj +++ b/SDK/Samples/MaterialQuantities/CS/MaterialQuantities.csproj @@ -1,125 +1,23 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {54451AFB-95BC-4337-B801-6FB4B3A92046} - Library - Properties Revit.Test.CSTemplate - MaterialQuantities - - - 2.0 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - None diff --git a/SDK/Samples/MaterialQuantities/CS/Properties/AssemblyInfo.cs b/SDK/Samples/MaterialQuantities/CS/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..63368518 --- /dev/null +++ b/SDK/Samples/MaterialQuantities/CS/Properties/AssemblyInfo.cs @@ -0,0 +1,56 @@ +// +// (C) Copyright 2003-2023 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + + +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("MaterialQuantities")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MaterialQuantities")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ModelLines/CS/ModelLines.cs b/SDK/Samples/ModelLines/CS/ModelLines.cs index dd15acb5..c013cea8 100644 --- a/SDK/Samples/ModelLines/CS/ModelLines.cs +++ b/SDK/Samples/ModelLines/CS/ModelLines.cs @@ -23,11 +23,9 @@ using System; using System.Collections.Generic; -using System.Text; using System.Collections.ObjectModel; using System.Linq; -using Autodesk.Revit; using Autodesk.Revit.DB; namespace Revit.SDK.Samples.ModelLines.CS @@ -36,7 +34,7 @@ namespace Revit.SDK.Samples.ModelLines.CS /// The main deal class, which takes charge of showing the number of each model line type /// and creating one instance for each type using Revit API /// - public class ModelLines + public class ModelLines : IDisposable { // Private members Autodesk.Revit.UI.UIApplication m_revit; // Store the reference of the application in revit @@ -525,6 +523,24 @@ namespace Revit.SDK.Samples.ModelLines.CS return workPlane; } + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + ((IDisposable)m_lineArray)?.Dispose(); + ((IDisposable)m_arcArray)?.Dispose(); + ((IDisposable)m_ellipseArray)?.Dispose(); + ((IDisposable)m_hermiteArray)?.Dispose(); + ((IDisposable)m_nurbArray)?.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + #endregion } } diff --git a/SDK/Samples/ModelLines/CS/ModelLines.csproj b/SDK/Samples/ModelLines/CS/ModelLines.csproj index 8c702711..1d259a41 100644 --- a/SDK/Samples/ModelLines/CS/ModelLines.csproj +++ b/SDK/Samples/ModelLines/CS/ModelLines.csproj @@ -1,122 +1,18 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F3413A79-C2DC-4C02-A03A-B614123258BC} - Library - Properties - ModelLines - ModelLines - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - Form - - - ModelLinesForm.cs - - + UserControl - - PointUserControl.cs - - - - Form - - - SketchPlaneForm.cs - - - - Designer - ModelLinesForm.cs - - - Designer - PointUserControl.cs - - - Designer - SketchPlaneForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ModelLines/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ModelLines/CS/Properties/AssemblyInfo.cs index e9e530a7..c6c78455 100644 --- a/SDK/Samples/ModelLines/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ModelLines/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ModelLines/CS/SketchPlaneForm.cs b/SDK/Samples/ModelLines/CS/SketchPlaneForm.cs index 30e27bd2..6b0c2f5d 100644 --- a/SDK/Samples/ModelLines/CS/SketchPlaneForm.cs +++ b/SDK/Samples/ModelLines/CS/SketchPlaneForm.cs @@ -21,15 +21,9 @@ // using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; -using Autodesk.Revit.DB; -using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.ModelLines.CS { diff --git a/SDK/Samples/ModelessDialog/ModelessForm_ExternalEvent/CS/ModelessForm_ExternalEvent.csproj b/SDK/Samples/ModelessDialog/ModelessForm_ExternalEvent/CS/ModelessForm_ExternalEvent.csproj index a915cade..3ef655a2 100644 --- a/SDK/Samples/ModelessDialog/ModelessForm_ExternalEvent/CS/ModelessForm_ExternalEvent.csproj +++ b/SDK/Samples/ModelessDialog/ModelessForm_ExternalEvent/CS/ModelessForm_ExternalEvent.csproj @@ -1,101 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {43F92905-6F3B-4C1C-945D-C661E6DAFDDC} - Library - Properties Revit.SDK.Samples.ModelessForm_ExternalEvent.CS - ModelessForm_ExternalEvent - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ModelessForm_ExternalEvent.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ModelessForm_ExternalEvent.XML true - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - Form - - - ModelessForm.cs - - - - - - - - ModelessForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ModelessDialog/ModelessForm_ExternalEvent/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ModelessDialog/ModelessForm_ExternalEvent/CS/Properties/AssemblyInfo.cs index 2633e703..f5a3a78a 100644 --- a/SDK/Samples/ModelessDialog/ModelessForm_ExternalEvent/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ModelessDialog/ModelessForm_ExternalEvent/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/Application.cs b/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/Application.cs index 99cc0d68..cfe31817 100644 --- a/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/Application.cs +++ b/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/Application.cs @@ -19,18 +19,7 @@ // restrictions set forth in FAR 52.227-19 (Commercial Computer // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows.Forms; -using System.IO; - -using Autodesk; -using Autodesk.Revit; -using Autodesk.Revit.DB; using Autodesk.Revit.UI; -using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.UI.Events; namespace Revit.SDK.Samples.ModelessForm_IdlingEvent.CS diff --git a/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/ModelessForm_IdlingEvent.csproj b/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/ModelessForm_IdlingEvent.csproj index ca038a18..fded87e2 100644 --- a/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/ModelessForm_IdlingEvent.csproj +++ b/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/ModelessForm_IdlingEvent.csproj @@ -1,101 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {FF2F1165-E481-4291-9A93-24AFB379DD62} - Library - Properties Revit.SDK.Samples.ModelessForm_IdlingEvent.CS - ModelessForm_IdlingEvent - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ModelessForm_IdlingEvent.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ModelessForm_IdlingEvent.XML true - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - Form - - - ModelessForm.cs - - - - - - - - ModelessForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/Properties/AssemblyInfo.cs index 998749ef..94e2e52b 100644 --- a/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ModelessDialog/ModelessForm_IdlingEvent/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/MoveLinear/CS/Command.cs b/SDK/Samples/MoveLinear/CS/Command.cs index 8ed3968c..176a4988 100644 --- a/SDK/Samples/MoveLinear/CS/Command.cs +++ b/SDK/Samples/MoveLinear/CS/Command.cs @@ -21,11 +21,11 @@ // using System; -using System.Windows.Forms; -using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.MoveLinear.CS { /// diff --git a/SDK/Samples/MoveLinear/CS/MoveLinear.csproj b/SDK/Samples/MoveLinear/CS/MoveLinear.csproj index 14026100..e5f82b29 100644 --- a/SDK/Samples/MoveLinear/CS/MoveLinear.csproj +++ b/SDK/Samples/MoveLinear/CS/MoveLinear.csproj @@ -1,148 +1,26 @@ - - + - Local - 9.0.30729 - 2.0 - {E33970AA-7837-4C5A-BAE0-A43D46E6F19B} - Debug - AnyCPU - - - - - MoveLinear - - JScript Grid IE50 false - Library - MoveLinear - - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 1.0.0.%2a - false - true - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - false - false - true - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - true - false - false - true - 4 - none - prompt + + False + - true - bin\x64\Debug\ - DEBUG;TRACE 285212672 4096 - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE 285212672 - true true 4096 - x64 - prompt MinimumRecommendedRules.ruleset + - OnOutputUpdated - - - - System - - - System.Data - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - Code - - - Code - - - - - False - .NET Framework 2.0 - true - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/MultiThreading/WorkThread/CS/WorkThread.csproj b/SDK/Samples/MultiThreading/WorkThread/CS/WorkThread.csproj index 809e6588..5d7dc6b0 100644 --- a/SDK/Samples/MultiThreading/WorkThread/CS/WorkThread.csproj +++ b/SDK/Samples/MultiThreading/WorkThread/CS/WorkThread.csproj @@ -1,91 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {20723726-7C67-4AA0-B404-A03027C7A770} - Library - Properties Revit.SDK.Samples.WorkThread.CS - WorkThread - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\WorkThread.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\WorkThread.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/MultiplanarRebar/CS/MultiplanarRebar.csproj b/SDK/Samples/MultiplanarRebar/CS/MultiplanarRebar.csproj index 2f0dca42..34bb9393 100644 --- a/SDK/Samples/MultiplanarRebar/CS/MultiplanarRebar.csproj +++ b/SDK/Samples/MultiplanarRebar/CS/MultiplanarRebar.csproj @@ -1,113 +1,19 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {463F71D3-E23F-43FE-A526-8021F0CD3BB0} - Library - Properties Revit.SDK.Samples.MultiplanarRebar.CS - MultiplanarRebar - v4.8 - - - - true - full - false - bin\debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - - True - True - Resources.resx - - - - Form - - - CorbelReinforcementOptionsForm.cs - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - CorbelReinforcementOptionsForm.cs - Designer - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/MultiplanarRebar/CS/Properties/AssemblyInfo.cs b/SDK/Samples/MultiplanarRebar/CS/Properties/AssemblyInfo.cs index 536893bd..aa1daca5 100644 --- a/SDK/Samples/MultiplanarRebar/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/MultiplanarRebar/CS/Properties/AssemblyInfo.cs @@ -33,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/NetworkPressureLossReport/CS/NetworkPressureLossReport.addin b/SDK/Samples/NetworkPressureLossReport/CS/NetworkPressureLossReport.addin index 13770e71..63f965b7 100644 --- a/SDK/Samples/NetworkPressureLossReport/CS/NetworkPressureLossReport.addin +++ b/SDK/Samples/NetworkPressureLossReport/CS/NetworkPressureLossReport.addin @@ -1,7 +1,7 @@  - D:\git\revit\RevitAdditions\RevitSDK\Software Development Kit\Samples\NetworkPressureLossReport\CS\bin\Debug\NetworkPressureLossReport.dll + NetworkPressureLossReport.dll a000b64b-a718-48e7-bf5c-7f1f7452490b Revit.SDK.Samples.NetworkPressureLossReport.Command Pressure Loss Report diff --git a/SDK/Samples/NetworkPressureLossReport/CS/NetworkPressureLossReport.csproj b/SDK/Samples/NetworkPressureLossReport/CS/NetworkPressureLossReport.csproj index fe9cee24..b2f7934a 100644 --- a/SDK/Samples/NetworkPressureLossReport/CS/NetworkPressureLossReport.csproj +++ b/SDK/Samples/NetworkPressureLossReport/CS/NetworkPressureLossReport.csproj @@ -1,43 +1,13 @@ - - + + - Debug - AnyCPU - 9.0.30729 + true 2.0 - {D9F2AB5B-1348-421A-9B08-9B4ED74A82CE} - Library - Properties Revit.SDK.Samples.NetworkPressureLossReport.CS - NetworkPressureLossReport - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - true true bin\x64\Debug\ - DEBUG;TRACE - full x64 prompt MinimumRecommendedRules.ruleset @@ -45,7 +15,6 @@ bin\x64\Release\ - TRACE true true pdbonly @@ -53,53 +22,15 @@ prompt MinimumRecommendedRules.ruleset + OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - - - - - - NetworkDialog.xaml - - - - - Designer - MSBuild:Compile - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" -if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - None + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" +if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + \ No newline at end of file diff --git a/SDK/Samples/NetworkPressureLossReport/CS/Properties/AssemblyInfo.cs b/SDK/Samples/NetworkPressureLossReport/CS/Properties/AssemblyInfo.cs index 1e2ee763..4bed7b49 100644 --- a/SDK/Samples/NetworkPressureLossReport/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/NetworkPressureLossReport/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Autodesk")] [assembly: AssemblyProduct("NetworkPressureLossReport")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2022")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -44,6 +44,7 @@ using System.Runtime.InteropServices; // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("72ce761f-210a-40ce-ae47-e75e1356af1f")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] // Version information for an assembly consists of the following four values: // diff --git a/SDK/Samples/NetworkPressureLossReport/CS/SegmentInfo.cs b/SDK/Samples/NetworkPressureLossReport/CS/SegmentInfo.cs index 4ea8cba1..f2c9c690 100644 --- a/SDK/Samples/NetworkPressureLossReport/CS/SegmentInfo.cs +++ b/SDK/Samples/NetworkPressureLossReport/CS/SegmentInfo.cs @@ -2,10 +2,11 @@ using System.Collections.Generic; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Analysis; +using Autodesk.Revit.DB.ExtensibleStorage; namespace Revit.SDK.Samples.NetworkPressureLossReport { - internal class SegmentInfo + internal class SegmentInfo : IDisposable { private MEPNetworkSegmentId m_id; private MEPAnalyticalSegmentType m_segmentType; @@ -21,6 +22,7 @@ namespace Revit.SDK.Samples.NetworkPressureLossReport private XYZ m_startPt; private XYZ m_endPt; const double Tolerance = 0.0000001; + private bool isDisposed; public double Flow { @@ -114,6 +116,23 @@ namespace Revit.SDK.Samples.NetworkPressureLossReport } } } + + public void Dispose() + { + // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposing || isDisposed) + return; + + (m_id as IDisposable)?.Dispose(); + + isDisposed = true; + } } internal class CompareNetworkSegmentId : IEqualityComparer diff --git a/SDK/Samples/NewHostedSweep/CS/Data/ModificationData.cs b/SDK/Samples/NewHostedSweep/CS/Data/ModificationData.cs index 0b32ade4..461bfb1f 100644 --- a/SDK/Samples/NewHostedSweep/CS/Data/ModificationData.cs +++ b/SDK/Samples/NewHostedSweep/CS/Data/ModificationData.cs @@ -29,6 +29,7 @@ using Autodesk.Revit; using Autodesk.Revit.DB.Architecture; using System.Drawing.Design; using System.ComponentModel; +using System.Transactions; namespace Revit.SDK.Samples.NewHostedSweep.CS { @@ -57,11 +58,6 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS /// private UIDocument m_rvtUIDoc; - /// - /// Sub transaction - /// - Transaction m_transaction; - /// /// Constructor with HostedSweep and CreationData as parameters. @@ -75,8 +71,6 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS m_elemToModify = elem; m_creationData = creationData; - m_transaction = new Transaction(m_rvtDoc, "External Tool"); - m_creationData.EdgeAdded += new CreationData.EdgeEventHandler(m_creationData_EdgeAdded); m_creationData.EdgeRemoved += @@ -102,15 +96,18 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS /// private void m_creationData_SymbolChanged(ElementType sym) { - try + using (var transaction = new Autodesk.Revit.DB.Transaction(m_rvtDoc, "External Tool")) { - StartTransaction(); - m_elemToModify.ChangeTypeId(sym.Id); - CommitTransaction(); - } - catch - { - RollbackTransaction(); + try + { + transaction.Start(); + m_elemToModify.ChangeTypeId(sym.Id); + transaction.Commit(); + } + catch + { + transaction.RollBack(); + } } } @@ -121,15 +118,18 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS /// private void m_creationData_EdgeRemoved(Edge edge) { - try + using (var transaction = new Autodesk.Revit.DB.Transaction(m_rvtDoc, "External Tool")) { - StartTransaction(); - m_elemToModify.RemoveSegment(edge.Reference); - CommitTransaction(); - } - catch - { - RollbackTransaction(); + try + { + transaction.Start(); + m_elemToModify.RemoveSegment(edge.Reference); + transaction.Commit(); + } + catch + { + transaction.RollBack(); + } } } @@ -139,26 +139,29 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS /// private void m_creationData_EdgeAdded(Edge edge) { - try - { - StartTransaction(); - if (m_elemToModify is Fascia) - { - (m_elemToModify as Fascia).AddSegment(edge.Reference); - } - else if (m_elemToModify is Gutter) - { - (m_elemToModify as Gutter).AddSegment(edge.Reference); - } - else if (m_elemToModify is SlabEdge) - { - (m_elemToModify as SlabEdge).AddSegment(edge.Reference); - } - CommitTransaction(); - } - catch + using (var transaction = new Autodesk.Revit.DB.Transaction(m_rvtDoc, "External Tool")) { - RollbackTransaction(); + try + { + transaction.Start(); + if (m_elemToModify is Fascia) + { + (m_elemToModify as Fascia).AddSegment(edge.Reference); + } + else if (m_elemToModify is Gutter) + { + (m_elemToModify as Gutter).AddSegment(edge.Reference); + } + else if (m_elemToModify is SlabEdge) + { + (m_elemToModify as SlabEdge).AddSegment(edge.Reference); + } + transaction.Commit(); + } + catch + { + transaction.RollBack(); + } } } @@ -167,15 +170,19 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS /// public void ShowElement() { - try + + using (var transaction = new Autodesk.Revit.DB.Transaction(m_rvtDoc, "External Tool")) { - StartTransaction(); - m_rvtUIDoc.ShowElements(m_elemToModify); - CommitTransaction(); - } - catch - { - RollbackTransaction(); + try + { + transaction.Start(); + m_rvtUIDoc.ShowElements(m_elemToModify); + transaction.Commit(); + } + catch + { + transaction.RollBack(); + } } } @@ -208,19 +215,22 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS } set { - try + using (var transaction = new Autodesk.Revit.DB.Transaction(m_rvtDoc, "External Tool")) { - StartTransaction(); - Parameter angle = GetParameter("Angle"); - if (angle != null) - angle.SetValueString(value); - else - m_elemToModify.Angle = double.Parse(value); - CommitTransaction(); - } - catch - { - RollbackTransaction(); + try + { + transaction.Start(); + Parameter angle = GetParameter("Angle"); + if (angle != null) + angle.SetValueString(value); + else + m_elemToModify.Angle = double.Parse(value); + transaction.Commit(); + } + catch + { + transaction.RollBack(); + } } } } @@ -267,15 +277,19 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS { if (value != m_elemToModify.HorizontalFlipped) { - try + + using (var transaction = new Autodesk.Revit.DB.Transaction(m_rvtDoc, "External Tool")) { - StartTransaction(); - m_elemToModify.HorizontalFlip(); - CommitTransaction(); - } - catch - { - RollbackTransaction(); + try + { + transaction.Start(); + m_elemToModify.HorizontalFlip(); + transaction.Commit(); + } + catch + { + transaction.RollBack(); + } } } } @@ -297,19 +311,22 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS } set { - try - { - StartTransaction(); - Parameter horiOff = GetParameter("Horizontal Profile Offset"); - if (horiOff != null) - horiOff.SetValueString(value); - else - m_elemToModify.HorizontalOffset = double.Parse(value); - CommitTransaction(); - } - catch - { - RollbackTransaction(); + using (var transaction = new Autodesk.Revit.DB.Transaction(m_rvtDoc, "External Tool")) + { + try + { + transaction.Start(); + Parameter horiOff = GetParameter("Horizontal Profile Offset"); + if (horiOff != null) + horiOff.SetValueString(value); + else + m_elemToModify.HorizontalOffset = double.Parse(value); + transaction.Commit(); + } + catch + { + transaction.RollBack(); + } } } } @@ -328,15 +345,19 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS { if (value != m_elemToModify.VerticalFlipped) { - try + + using (var transaction = new Autodesk.Revit.DB.Transaction(m_rvtDoc, "External Tool")) { - StartTransaction(); - m_elemToModify.VerticalFlip(); - CommitTransaction(); - } - catch - { - RollbackTransaction(); + try + { + transaction.Start(); + m_elemToModify.VerticalFlip(); + transaction.Commit(); + } + catch + { + transaction.RollBack(); + } } } } @@ -358,19 +379,22 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS } set { - try + using (var transaction = new Autodesk.Revit.DB.Transaction(m_rvtDoc, "External Tool")) { - StartTransaction(); - Parameter vertOff = GetParameter("Vertical Profile Offset"); - if (vertOff != null) - vertOff.SetValueString(value); - else - m_elemToModify.VerticalOffset = double.Parse(value); - CommitTransaction(); - } - catch - { - RollbackTransaction(); + try + { + transaction.Start(); + Parameter vertOff = GetParameter("Vertical Profile Offset"); + if (vertOff != null) + vertOff.SetValueString(value); + else + m_elemToModify.VerticalOffset = double.Parse(value); + transaction.Commit(); + } + catch + { + transaction.RollBack(); + } } } } @@ -384,21 +408,5 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS { return m_elemToModify.LookupParameter(name); } - - - public TransactionStatus StartTransaction() - { - return m_transaction.Start(); - } - - public TransactionStatus CommitTransaction() - { - return m_transaction.Commit(); - } - - public TransactionStatus RollbackTransaction() - { - return m_transaction.RollBack(); - } } } diff --git a/SDK/Samples/NewHostedSweep/CS/Forms/EdgeFetchForm.Designer.cs b/SDK/Samples/NewHostedSweep/CS/Forms/EdgeFetchForm.Designer.cs index 63276f42..b0fa38eb 100644 --- a/SDK/Samples/NewHostedSweep/CS/Forms/EdgeFetchForm.Designer.cs +++ b/SDK/Samples/NewHostedSweep/CS/Forms/EdgeFetchForm.Designer.cs @@ -35,9 +35,12 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (m_centerMatrix != null) + m_centerMatrix.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/NewHostedSweep/CS/Forms/EdgeFetchForm.cs b/SDK/Samples/NewHostedSweep/CS/Forms/EdgeFetchForm.cs index ab262928..78da3b22 100644 --- a/SDK/Samples/NewHostedSweep/CS/Forms/EdgeFetchForm.cs +++ b/SDK/Samples/NewHostedSweep/CS/Forms/EdgeFetchForm.cs @@ -396,7 +396,7 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS ExtractCheckedEdgesAndSelectedSymbol(); if (m_creationData.EdgesForHostedSweep.Count == 0) { - TaskDialog.Show("Revit", "At least one edge should be selected!"); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "At least one edge should be selected!"); return; } this.DialogResult = DialogResult.OK; diff --git a/SDK/Samples/NewHostedSweep/CS/Forms/MainForm.Designer.cs b/SDK/Samples/NewHostedSweep/CS/Forms/MainForm.Designer.cs index 7916c649..7efbbc6c 100644 --- a/SDK/Samples/NewHostedSweep/CS/Forms/MainForm.Designer.cs +++ b/SDK/Samples/NewHostedSweep/CS/Forms/MainForm.Designer.cs @@ -35,9 +35,12 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (m_binding != null) + m_binding.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/NewHostedSweep/CS/Geom/ElementGeometry.cs b/SDK/Samples/NewHostedSweep/CS/Geom/ElementGeometry.cs index 2ca82c16..3c1d8f0e 100644 --- a/SDK/Samples/NewHostedSweep/CS/Geom/ElementGeometry.cs +++ b/SDK/Samples/NewHostedSweep/CS/Geom/ElementGeometry.cs @@ -227,7 +227,7 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS /// and indicates whether the edge is selected or highlighted. /// public class EdgeBinding : IDisposable - { + { /// /// Edge points in world coordinate system of Revit. /// @@ -386,16 +386,25 @@ namespace Revit.SDK.Samples.NewHostedSweep.CS #region IDisposable Members - /// - /// Dispose - /// + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_gdiEdge != null) + m_gdiEdge.Dispose(); + if (m_pen != null) + m_pen.Dispose(); + if (m_region != null) + m_region.Dispose(); + } + } + public void Dispose() { - m_gdiEdge.Dispose(); - m_pen.Dispose(); - m_region.Dispose(); + Dispose(disposing: true); + GC.SuppressFinalize(this); } #endregion - } + } } diff --git a/SDK/Samples/NewHostedSweep/CS/NewHostedSweep.csproj b/SDK/Samples/NewHostedSweep/CS/NewHostedSweep.csproj index d2dd58ec..c0f72197 100644 --- a/SDK/Samples/NewHostedSweep/CS/NewHostedSweep.csproj +++ b/SDK/Samples/NewHostedSweep/CS/NewHostedSweep.csproj @@ -1,105 +1,21 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {BB5C52F3-93FC-441C-91D4-758182CC2747} - Library - Properties Revit.SDK.Samples.NewHostedSweep.CS - NewHostedSweep - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - - - - - Form - - - MainForm.cs - - - - - Form - - - HostedSweepModifyForm.cs - - - Form - - - EdgeFetchForm.cs - - - - - - + + + Designer MainForm.cs @@ -113,19 +29,7 @@ EdgeFetchForm.cs - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/NewHostedSweep/CS/Properties/AssemblyInfo.cs b/SDK/Samples/NewHostedSweep/CS/Properties/AssemblyInfo.cs index 212a7184..a5fe3949 100644 --- a/SDK/Samples/NewHostedSweep/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/NewHostedSweep/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/NewMacro/CS/ModuleMaker.cs b/SDK/Samples/NewMacro/CS/ModuleMaker.cs new file mode 100644 index 00000000..dc4e9ade --- /dev/null +++ b/SDK/Samples/NewMacro/CS/ModuleMaker.cs @@ -0,0 +1,82 @@ +using System; +using System.IO; +using System.Reflection; +using System.Windows.Forms; +using Autodesk.Revit.DB.Macros; +using Autodesk.Revit.UI; + + +namespace Revit.SDK.Samples.NewMacro.CS +{ + /// + /// Implements the Revit Macro interface IModuleMaker. + /// + internal class ModuleMaker : IModuleMaker + { + /// + /// Implement this method as an external function to create MacroModule. + /// + /// Current Module Folder,Add All Macro Project File to this folder. + internal const string MacroName = "HelloWorld"; + internal const string ProjectName = "MacroSample"; + internal const string DllName = "NewMacro"; + + public ModuleMaker() + { + } + public void Execute(string folder) + { + try + { + if (string.Compare(ProjectName, Path.GetFileName(folder)) != 0) + { + Autodesk.Revit.UI.TaskDialog.Show($"Error", $"New project name don't pair default project name"); + return; + } + string addinFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + string srcDir = Path.Combine(addinFolder, DllName, ProjectName); + CopyDir(srcDir, folder); + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + /// + /// Copy all file in source directory to destination directory. + /// If destination directory exists the file which has the same name in source directory, will not replace it. + /// + /// A directory contains source files. + /// Destination directory + private void CopyDir(string SrcDir, string DestDir) + { + if(!Directory.Exists(SrcDir)) + { + Autodesk.Revit.UI.TaskDialog.Show($"Error", $"Create Project Failed, Can't found the Project in {SrcDir}"); + } + + if (!Directory.Exists(DestDir)) + { + Directory.CreateDirectory(DestDir); + } + string[] files = Directory.GetFiles(SrcDir); + foreach (string file in files) + { + string name =Path.GetFileName(file); + string dest = Path.Combine(DestDir, name); + File.Copy(file, dest); + } + + string[] subDirs = Directory.GetDirectories(SrcDir); + foreach (string subDir in subDirs) + { + string subName = Path.GetFileName(subDir); + string subDest = Path.Combine(DestDir, subName); + CopyDir(subDir, subDest); + } + + } + } + +} diff --git a/SDK/Samples/NewMacro/CS/NewMacro.addin b/SDK/Samples/NewMacro/CS/NewMacro.addin new file mode 100644 index 00000000..00575232 --- /dev/null +++ b/SDK/Samples/NewMacro/CS/NewMacro.addin @@ -0,0 +1,13 @@ + + + + NewMacro.dll + 3FC66690-01AA-477F-AFB5-A9C0134BD60B + Revit.SDK.Samples.NewMacro.CS.Command + New Macro + Generate a new MacroModule: "MacroSample" which include a new Macro: "HelloWorld" + AlwaysVisible + ADSK + Autodesk, www.autodesk.com + + diff --git a/SDK/Samples/NewMacro/CS/NewMacro.cs b/SDK/Samples/NewMacro/CS/NewMacro.cs new file mode 100644 index 00000000..db823354 --- /dev/null +++ b/SDK/Samples/NewMacro/CS/NewMacro.cs @@ -0,0 +1,129 @@ +// +// (C) Copyright 2003-2022 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Macros; +using Autodesk.Revit.UI.Macros; +using System.Threading; +using System.IO; + +namespace Revit.SDK.Samples.NewMacro.CS +{ + /// + /// Implements the Revit add-in interface IExternalCommand. + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + [Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)] + public class Command : IExternalCommand + { + + #region IExternalCommand Members Implementation + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// A message that can be set by the external application + /// which will be displayed if a failure or cancellation is returned by + /// the external command. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// Return the status of the external command. + /// A result of Succeeded means that the API external method functioned as expected. + /// Cancelled can be used to signify that the user cancelled the external operation + /// at some point. Failure should be returned if the application is unable to proceed with + /// the operation. + public Autodesk.Revit.UI.Result Execute(Autodesk.Revit.UI.ExternalCommandData commandData, + ref string message, Autodesk.Revit.DB.ElementSet elements) + { + try + { + UIMacroManager uiMacroManager = UIMacroManager.GetMacroManager(commandData.Application); + //Create new MacroModule, if exists old MacroModule with same name,return old. + MacroModule module = GetModule(uiMacroManager, ModuleMaker.ProjectName); + + if (module == null) + { + ModuleSettings ms = new ModuleSettings(ModuleMaker.ProjectName, MacroLanguageType.CSharp); + module = uiMacroManager.AddModule(ms, MacroEnvironment.UI, new ModuleMaker()); + } + + Macro macro = GetMacro(module, ModuleMaker.MacroName); + if (macro != null) + { + macro.Execute(); + } + else + { + TaskDialog.Show("Error", $"can't found Macro:{ModuleMaker.MacroName}"); + return Result.Failed; + } + + } + catch (Exception e) + { + message = e.Message; + return Result.Failed; + } + return Result.Succeeded; + } + + + /// + /// Get MacroModule from UIMacroManager. + /// + /// UIMacroManager, manage all UI MacroModules. + /// Used to identify the module. + private MacroModule GetModule(UIMacroManager uiMacroManager, string moduleName) + { + + foreach (var module in uiMacroManager.MacroManager) + { + if (module == null || module.Name != moduleName) + continue; + return module; + } + return null; + } + + /// + /// Get Macro from MacroModule. + /// + /// MacroModule, manage all Macro in current Module. + /// Used to identify the Macro. + private Macro GetMacro(MacroModule module, string macroName) + { + if (module == null) + return null; + foreach (var macroMethod in module) + { + if (macroMethod != null && macroMethod.Name == macroName) + return macroMethod; + } + return null; + } + #endregion IExternalCommand Members Implementation + } +} diff --git a/SDK/Samples/NewMacro/CS/NewMacro.csproj b/SDK/Samples/NewMacro/CS/NewMacro.csproj new file mode 100644 index 00000000..682e8a9e --- /dev/null +++ b/SDK/Samples/NewMacro/CS/NewMacro.csproj @@ -0,0 +1,23 @@ + + + + MinimumRecommendedRules.ruleset + + + true + MinimumRecommendedRules.ruleset + + + + + + + + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" +if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + + + None + + \ No newline at end of file diff --git a/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Addin/MacroSample.dat b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Addin/MacroSample.dat new file mode 100644 index 00000000..9044d546 Binary files /dev/null and b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Addin/MacroSample.dat differ diff --git a/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Addin/MacroSample.dll b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Addin/MacroSample.dll new file mode 100644 index 00000000..89ee48f8 Binary files /dev/null and b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Addin/MacroSample.dll differ diff --git a/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/MacroSample.csproj b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/MacroSample.csproj new file mode 100644 index 00000000..d4f90586 --- /dev/null +++ b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/MacroSample.csproj @@ -0,0 +1,38 @@ + + + net7.0-windows + enable + enable + + + x64 + false + false + False + True + Portable + ..\..\Addin\ + MacroSample + obj\ + DEBUG;TRACE + obj\Debug + false + false + false + false + false + false + false + + + + False + + + False + + + + + + \ No newline at end of file diff --git a/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/Properties/AssemblyInfo.cs b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..7f4a7cce --- /dev/null +++ b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NewModule")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NewModule")] +[assembly: AssemblyCopyright("Copyright 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/ThisApplication.Designer.cs b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/ThisApplication.Designer.cs new file mode 100644 index 00000000..4273ee52 --- /dev/null +++ b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/ThisApplication.Designer.cs @@ -0,0 +1,45 @@ +namespace MacroSample { + + public sealed partial class ThisApplication : Autodesk.Revit.UI.Macros.ApplicationEntryPoint { + + public event System.EventHandler Startup; + + public event System.EventHandler Shutdown; + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void OnStartup() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void FinishInitialization() { + base.FinishInitialization(); + this.OnStartup(); + this.InternalStartup(); + if ((this.Startup != null)) { + this.Startup(this, System.EventArgs.Empty); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void OnShutdown() { + if ((this.Shutdown != null)) { + this.Shutdown(this, System.EventArgs.Empty); + } + base.OnShutdown(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override string PrimaryCookie { + get { + return "ThisApplication"; + } + } + } +} diff --git a/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/ThisApplication.cs b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/ThisApplication.cs new file mode 100644 index 00000000..772a6378 --- /dev/null +++ b/SDK/Samples/NewMacro/CS/NewMacro/MacroSample/Source/MacroSample/ThisApplication.cs @@ -0,0 +1,37 @@ +using System; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI.Selection; +using System.Collections.Generic; +using System.Linq; + +namespace MacroSample +{ + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.DB.Macros.AddInId("65157549-1E87-4196-81E8-645940E38AD3")] + public partial class ThisApplication + { + private void Module_Startup(object? sender, EventArgs e) + { + + } + + private void Module_Shutdown(object? sender, EventArgs e) + { + + } + + #region Revit Macros generated code + private void InternalStartup() + { + this.Startup += new System.EventHandler(Module_Startup); + this.Shutdown += new System.EventHandler(Module_Shutdown); + } + #endregion + + public void HelloWorld() + { + TaskDialog.Show("MacroSample", "HelloWorld"); + } + } +} diff --git a/SDK/Samples/NewMacro/CS/Properties/AssemblyInfo.cs b/SDK/Samples/NewMacro/CS/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..fd37f5ed --- /dev/null +++ b/SDK/Samples/NewMacro/CS/Properties/AssemblyInfo.cs @@ -0,0 +1,59 @@ +// +// (C) Copyright 2003-2019 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NewMacro")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NewMacro")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7ba20956-98fa-4f1b-9a58-6716332a7b88")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/NewMacro/CS/ReadMe_NewMacro.rtf b/SDK/Samples/NewMacro/CS/ReadMe_NewMacro.rtf new file mode 100644 index 00000000..e99b33a5 --- /dev/null +++ b/SDK/Samples/NewMacro/CS/ReadMe_NewMacro.rtf @@ -0,0 +1,464 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe2052\themelang3084\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;} +{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f36\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}DengXian{\*\falt |\'a1\'a7??\'a1\'ec?\'a1\'ec??};} +{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f44\fbidi \fnil\fcharset134\fprq2{\*\panose 00000000000000000000}@DengXian;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;} +{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f46\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f47\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f49\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f50\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f51\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f52\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\f53\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f54\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f56\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f57\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} +{\f59\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f60\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f61\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f62\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} +{\f63\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f64\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f66\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f67\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} +{\f69\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f70\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f71\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f72\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} +{\f73\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f74\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f386\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f387\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} +{\f389\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f390\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f393\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f394\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} +{\f408\fbidi \fnil\fcharset0\fprq2 DengXian Western{\*\falt |\'a1\'a7??\'a1\'ec?\'a1\'ec??};}{\f406\fbidi \fnil\fcharset238\fprq2 DengXian CE{\*\falt |\'a1\'a7??\'a1\'ec?\'a1\'ec??};} +{\f407\fbidi \fnil\fcharset204\fprq2 DengXian Cyr{\*\falt |\'a1\'a7??\'a1\'ec?\'a1\'ec??};}{\f409\fbidi \fnil\fcharset161\fprq2 DengXian Greek{\*\falt |\'a1\'a7??\'a1\'ec?\'a1\'ec??};}{\f416\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} +{\f417\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f419\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f420\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f421\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);} +{\f422\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f423\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f424\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\f488\fbidi \fnil\fcharset0\fprq2 @DengXian Western;} +{\f486\fbidi \fnil\fcharset238\fprq2 @DengXian CE;}{\f487\fbidi \fnil\fcharset204\fprq2 @DengXian Cyr;}{\f489\fbidi \fnil\fcharset161\fprq2 @DengXian Greek;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;} +{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);} +{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} +{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} +{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} +{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; +\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap +\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 +\af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang3084\langfe3084\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp3084\langfenp3084 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext11 \ssemihidden \sunhideused +Normal Table;}{\s15\ql \li720\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\fs22\lang3084\langfe3084\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp3084\langfenp3084 \sbasedon0 \snext15 \sqformat \spriority34 \styrsid13042760 List Paragraph;}}{\*\listtable{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc23\levelnfcn23 +\leveljc0\leveljcn0\levelfollow0\levelstartat46\levelspace0\levelindent0{\leveltext\leveltemplateid1138159812\'01-;}{\levelnumbers;}\loch\af1\hich\af1\dbch\af31505\fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0 +{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698691 +\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 +\fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel +\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid81998702}{\list\listtemplateid-1{\listlevel\levelnfc0\levelnfcn0 +\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li360\lin360 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\'04\'00.\'01.;}{\levelnumbers\'01\'03;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-432\li792\lin792 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'06\'00.\'01.\'02.;}{\levelnumbers\'01\'03\'05;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-504\li1224\lin1224 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'08\'00.\'01.\'02.\'03.;}{\levelnumbers\'01\'03\'05\'07;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-648\li1728\lin1728 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'0a\'00.\'01.\'02.\'03.\'04.;}{\levelnumbers\'01\'03\'05\'07\'09;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-792\li2232\lin2232 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'0c\'00.\'01.\'02.\'03.\'04.\'05.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-936\li2736\lin2736 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'0e\'00.\'01.\'02.\'03.\'04.\'05.\'06.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-1080\li3240\lin3240 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'10\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-1224\li3744\lin3744 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0 +{\leveltext\'12\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-1440\li4320\lin4320 }{\listname ;}\listid101074719}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0 +\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698705\'02\'00);}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1800\lin1800 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0 +\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2520\lin2520 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113039\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3960\lin3960 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid202113051\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li4680\lin4680 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid202113039\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113049\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li6120\lin6120 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113051\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6840\lin6840 }{\listname ;}\listid170997105}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\levelspace360\levelindent0{\leveltext\leveltemplateid67698705\'02\'00);}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid202113049\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid202113051\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113039\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113049\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113051\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113039\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113049\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113051\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6480\lin6480 }{\listname ;}\listid179979791}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\levelspace0\levelindent0{\leveltext\leveltemplateid202113039\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 +\levelindent0{\leveltext\leveltemplateid202113049\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0 +{\leveltext\leveltemplateid202113051\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113039\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113049\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113051\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113039\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113049\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113051\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6480\lin6480 }{\listname ;}\listid250430617}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\levelspace0\levelindent0{\leveltext\leveltemplateid202113039\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 +\levelindent0{\leveltext\leveltemplateid202113049\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0 +{\leveltext\leveltemplateid202113051\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113039\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113049\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113051\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113039\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113049\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113051\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6480\lin6480 }{\listname ;}\listid359746497}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat5 +\levelspace0\levelindent0{\leveltext\leveltemplateid2068850802\'01-;}{\levelnumbers;}\loch\af1\hich\af1\dbch\af31505\fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 +\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113025 +\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 +\fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23 +\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid467475487}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0 +\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698705\'02\'00);}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113029 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;} +\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid577518570} +{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-350474988\'01-;}{\levelnumbers;}\loch\af0\hich\af0\dbch\af31505\fbias0 +\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel +\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 +\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 +\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext +\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113027 +\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 +\fi-360\li6480\lin6480 }{\listname ;}\listid850140092}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698705\'02\'00);}{\levelnumbers +\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'01.;}{\levelnumbers\'01;} +\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1800\lin1800 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 +\ltrch\fcs0 \fi-180\li2520\lin2520 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113039\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li3240\lin3240 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li3960\lin3960 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-180\li4680\lin4680 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113039\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li5400\lin5400 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li6120\lin6120 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-180\li6840\lin6840 }{\listname ;}\listid888996711}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698705\'02\'00);}{\levelnumbers +\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 +\af0 \ltrch\fcs0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113039\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113039\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 +\fi-180\li6480\lin6480 }{\listname ;}\listid1021397858}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid202113039\'02\'00.;}{\levelnumbers +\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 +\fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23 +\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid1239949250}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace360 +\levelindent0{\leveltext\leveltemplateid-350474988\'01-;}{\levelnumbers;}\loch\af0\hich\af0\dbch\af31505\fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113029 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;} +\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23 +\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid1304120256}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid-1773225328\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li360\lin360 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li1800\lin1800 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid202113039\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid202113049\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113051\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li3960\lin3960 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113039\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li4680\lin4680 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113049\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113051\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6120\lin6120 }{\listname ;}\listid1449472665}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\levelspace360\levelindent0{\leveltext\leveltemplateid-1773225328\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid202113049\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1800\lin1800 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid202113051\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2520\lin2520 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113039\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113049\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3960\lin3960 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113051\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li4680\lin4680 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113039\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5400\lin5400 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113049\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li6120\lin6120 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113051\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6840\lin6840 }{\listname ;}\listid1591042043}{\list\listtemplateid-1{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li360\lin360 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'04\'00.\'01.;}{\levelnumbers\'01\'03;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-432\li792\lin792 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'06\'00.\'01.\'02.;}{\levelnumbers +\'01\'03\'05;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-504\li1224\lin1224 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'08\'00.\'01.\'02.\'03.;}{\levelnumbers\'01\'03\'05\'07;} +\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-648\li1728\lin1728 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0a\'00.\'01.\'02.\'03.\'04.;}{\levelnumbers\'01\'03\'05\'07\'09;}\rtlch\fcs1 +\af0 \ltrch\fcs0 \fbias0 \fi-792\li2232\lin2232 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0c\'00.\'01.\'02.\'03.\'04.\'05.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\rtlch\fcs1 +\af0 \ltrch\fcs0 \fbias0 \fi-936\li2736\lin2736 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0e\'00.\'01.\'02.\'03.\'04.\'05.\'06.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;} +\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1080\li3240\lin3240 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'10\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.;}{\levelnumbers +\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1224\li3744\lin3744 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'12\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1440\li4320\lin4320 }{\listname ;}\listid1752046431}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc3 +\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698709\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 +\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 +\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 +\levelindent0{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113029 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113025\'01\u-3913 ?;}{\levelnumbers;} +\f3\fbias0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113027\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5760\lin5760 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113029\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6480\lin6480 }{\listname ;}\listid2057578176} +{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698705\'02\'00);}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li780\lin780 +}{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li1500\lin1500 }{\listlevel +\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li2220\lin2220 }{\listlevel\levelnfc0 +\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113039\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li2940\lin2940 }{\listlevel\levelnfc4\levelnfcn4 +\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li3660\lin3660 }{\listlevel\levelnfc2\levelnfcn2\leveljc2 +\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li4380\lin4380 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113039\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5100\lin5100 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0 +\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113049\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li5820\lin5820 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1 +\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid202113051\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-180\li6540\lin6540 }{\listname ;}\listid2115468991}{\list\listtemplateid-1{\listlevel\levelnfc0\levelnfcn0\leveljc0 +\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-360\li360\lin360 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 +\levelindent0{\leveltext\'04\'00.\'01.;}{\levelnumbers\'01\'03;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-432\li792\lin792 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'06\'00.\'01.\'02.;}{\levelnumbers\'01\'03\'05;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-504\li1224\lin1224 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'08\'00.\'01.\'02.\'03.;}{\levelnumbers\'01\'03\'05\'07;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-648\li1728\lin1728 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'0a\'00.\'01.\'02.\'03.\'04.;}{\levelnumbers\'01\'03\'05\'07\'09;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-792\li2232\lin2232 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'0c\'00.\'01.\'02.\'03.\'04.\'05.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-936\li2736\lin2736 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'0e\'00.\'01.\'02.\'03.\'04.\'05.\'06.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-1080\li3240\lin3240 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext +\'10\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-1224\li3744\lin3744 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0 +{\leveltext\'12\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fi-1440\li4320\lin4320 }{\listname ;}\listid2117752026}}{\*\listoverridetable{\listoverride\listid850140092 +\listoverridecount0\ls1}{\listoverride\listid1304120256\listoverridecount0\ls2}{\listoverride\listid1239949250\listoverridecount0\ls3}{\listoverride\listid101074719\listoverridecount0\ls4}{\listoverride\listid250430617\listoverridecount0\ls5} +{\listoverride\listid2117752026\listoverridecount0\ls6}{\listoverride\listid359746497\listoverridecount0\ls7}{\listoverride\listid1752046431\listoverridecount0\ls8}{\listoverride\listid170997105\listoverridecount0\ls9}{\listoverride\listid888996711 +\listoverridecount0\ls10}{\listoverride\listid577518570\listoverridecount0\ls11}{\listoverride\listid1591042043\listoverridecount0\ls12}{\listoverride\listid467475487\listoverridecount0\ls13}{\listoverride\listid2057578176\listoverridecount0\ls14} +{\listoverride\listid1449472665\listoverridecount0\ls15}{\listoverride\listid2115468991\listoverridecount0\ls16}{\listoverride\listid179979791\listoverridecount0\ls17}{\listoverride\listid1021397858\listoverridecount0\ls18}{\listoverride\listid81998702 +\listoverridecount0\ls19}}{\*\rsidtbl \rsid344191\rsid1977184\rsid2521617\rsid2755127\rsid4001976\rsid5126310\rsid8923921\rsid9770190\rsid12521022\rsid13042760\rsid13183561\rsid15670885\rsid16658947}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0 +\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Administrator}{\creatim\yr2020\mo10\dy5\hr9\min7}{\revtim\yr2023\mo11\dy22\hr16\min16}{\version7}{\edmins336}{\nofpages1}{\nofwords175}{\nofchars998} +{\nofcharsws1171}{\vern81}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect +\deftab420\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120 +\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\ksulang1041\viewkind1\viewscale80\rsidroot12521022 {\*\fchars !"'),.:\'3b>?]`|\'7d~\'a8\'af\'b7\'bb\'92\'94\'85}{\*\lchars (. - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {379E2FAA-67A6-4360-BEE6-37496B7BB89A} - Library - Properties Revit.SDK.Samples.NewOpenings.CS - NewOpenings - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - NewOpeningsForm.cs - - - - - - - - - - - - - - - Designer - NewOpeningsForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/NewOpenings/CS/Properties/AssemblyInfo.cs b/SDK/Samples/NewOpenings/CS/Properties/AssemblyInfo.cs index 5acedc28..7acab7cd 100644 --- a/SDK/Samples/NewOpenings/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/NewOpenings/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/NewPathReinforcement/CS/LineTool.cs b/SDK/Samples/NewPathReinforcement/CS/LineTool.cs index 7cf08ae8..b68a6f24 100644 --- a/SDK/Samples/NewPathReinforcement/CS/LineTool.cs +++ b/SDK/Samples/NewPathReinforcement/CS/LineTool.cs @@ -31,7 +31,7 @@ namespace Revit.SDK.Samples.NewPathReinforcement.CS /// /// tool used to draw line /// - public class LineTool + public class LineTool : IDisposable { # region members private List m_points = new List(); // Field used to store points of a line @@ -140,5 +140,20 @@ namespace Revit.SDK.Samples.NewPathReinforcement.CS graphic.DrawLine(m_foreGroundPen, m_points[i], m_points[i + 1]); } } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + m_backGroundPen?.Dispose(); + m_foreGroundPen?.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcement.csproj b/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcement.csproj index d8c539a6..dc34d568 100644 --- a/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcement.csproj +++ b/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcement.csproj @@ -1,97 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {6EEC8736-C09A-4154-8070-5075CBCE42E2} - Library - Properties - NewPathReinforcement - NewPathReinforcement - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - Form - - - NewPathReinforcementForm.cs - - - - - - - - - Designer - NewPathReinforcementForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcementForm.Designer.cs b/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcementForm.Designer.cs index cbd38931..7bb6fb7e 100644 --- a/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcementForm.Designer.cs +++ b/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcementForm.Designer.cs @@ -19,6 +19,8 @@ // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. // +using System; + namespace Revit.SDK.Samples.NewPathReinforcement.CS { partial class NewPathReinforcementForm @@ -34,9 +36,10 @@ namespace Revit.SDK.Samples.NewPathReinforcement.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + components?.Dispose(); + ((IDisposable)m_tool)?.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcementForm.cs b/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcementForm.cs index dd235446..dfbd949e 100644 --- a/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcementForm.cs +++ b/SDK/Samples/NewPathReinforcement/CS/NewPathReinforcementForm.cs @@ -21,16 +21,14 @@ // using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; -using System.Text; using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; using Point = System.Drawing.Point; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.NewPathReinforcement.CS { diff --git a/SDK/Samples/NewPathReinforcement/CS/Properties/AssemblyInfo.cs b/SDK/Samples/NewPathReinforcement/CS/Properties/AssemblyInfo.cs index e225b1e7..338f2296 100644 --- a/SDK/Samples/NewPathReinforcement/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/NewPathReinforcement/CS/Properties/AssemblyInfo.cs @@ -54,3 +54,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/NewRebar/CS/Forms/AddParameterForm.cs b/SDK/Samples/NewRebar/CS/Forms/AddParameterForm.cs index 4c0cd320..37e282d0 100644 --- a/SDK/Samples/NewRebar/CS/Forms/AddParameterForm.cs +++ b/SDK/Samples/NewRebar/CS/Forms/AddParameterForm.cs @@ -112,7 +112,7 @@ namespace Revit.SDK.Samples.NewRebar.CS { if (string.IsNullOrEmpty(ParamName) || string.IsNullOrEmpty(ParamValue)) { - TaskDialog.Show("Revit", "Parameter Name and Value should not be null."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Parameter Name and Value should not be null."); return; } @@ -124,7 +124,7 @@ namespace Revit.SDK.Samples.NewRebar.CS } catch { - TaskDialog.Show("Revit", "Input value - " + ParamValue + " - should be double."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Input value - " + ParamValue + " - should be double."); return; } } @@ -134,7 +134,7 @@ namespace Revit.SDK.Samples.NewRebar.CS Regex regex = new Regex("^[a-zA-Z]\\w*$"); if (!regex.IsMatch(ParamName)) { - TaskDialog.Show("Revit", "Parameter name should be started with letter \r\n And just contains letters, numbers and underlines."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Parameter name should be started with letter \r\n And just contains letters, numbers and underlines."); paramNameTextBox.Focus(); return; } @@ -144,7 +144,7 @@ namespace Revit.SDK.Samples.NewRebar.CS { if (param.Name.Equals(ParamName)) { - TaskDialog.Show("Revit", "The name is already exist, please input again."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "The name is already exist, please input again."); paramNameTextBox.Focus(); return; } diff --git a/SDK/Samples/NewRebar/CS/Forms/NewRebarForm.Designer.cs b/SDK/Samples/NewRebar/CS/Forms/NewRebarForm.Designer.cs index c49f4588..86e5fb28 100644 --- a/SDK/Samples/NewRebar/CS/Forms/NewRebarForm.Designer.cs +++ b/SDK/Samples/NewRebar/CS/Forms/NewRebarForm.Designer.cs @@ -35,9 +35,14 @@ namespace Revit.SDK.Samples.NewRebar.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (m_barTypesBinding != null) + m_barTypesBinding.Dispose(); + if (m_shapesBinding != null) + m_shapesBinding.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/NewRebar/CS/Forms/NewRebarForm.cs b/SDK/Samples/NewRebar/CS/Forms/NewRebarForm.cs index 358b614b..23079c6f 100644 --- a/SDK/Samples/NewRebar/CS/Forms/NewRebarForm.cs +++ b/SDK/Samples/NewRebar/CS/Forms/NewRebarForm.cs @@ -156,7 +156,7 @@ namespace Revit.SDK.Samples.NewRebar.CS // Make sure the name is not null or empty. if (string.IsNullOrEmpty(nameTextBox.Text.Trim())) { - TaskDialog.Show("Revit", "Please give a name to create a rebar shape."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Please give a name to create a rebar shape."); return; } @@ -165,7 +165,7 @@ namespace Revit.SDK.Samples.NewRebar.CS Regex regex = new Regex("^[a-zA-Z]\\w+$"); if (!regex.IsMatch(nameTextBox.Text.Trim())) { - TaskDialog.Show("Revit", "Please input the name starting with letter and just containing letters, numbers and underlines. String is " + nameTextBox.Text.ToString()); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Please input the name starting with letter and just containing letters, numbers and underlines. String is " + nameTextBox.Text.ToString()); nameTextBox.Focus(); return; } @@ -199,7 +199,7 @@ namespace Revit.SDK.Samples.NewRebar.CS } else { - TaskDialog.Show("Revit", "Please input a valid positive integer as segments count."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Please input a valid positive integer as segments count."); return; } } diff --git a/SDK/Samples/NewRebar/CS/Forms/NewRebarShapeForm.Designer.cs b/SDK/Samples/NewRebar/CS/Forms/NewRebarShapeForm.Designer.cs index 63060e3c..0f54424f 100644 --- a/SDK/Samples/NewRebar/CS/Forms/NewRebarShapeForm.Designer.cs +++ b/SDK/Samples/NewRebar/CS/Forms/NewRebarShapeForm.Designer.cs @@ -35,9 +35,14 @@ namespace Revit.SDK.Samples.NewRebar.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (m_parametersListBoxBinding != null) + m_parametersListBoxBinding.Dispose(); + if (m_constraintsListBoxBinding != null) + m_constraintsListBoxBinding.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/NewRebar/CS/Forms/NewRebarShapeForm.cs b/SDK/Samples/NewRebar/CS/Forms/NewRebarShapeForm.cs index 92642f7a..1ed18696 100644 --- a/SDK/Samples/NewRebar/CS/Forms/NewRebarShapeForm.cs +++ b/SDK/Samples/NewRebar/CS/Forms/NewRebarShapeForm.cs @@ -258,7 +258,7 @@ namespace Revit.SDK.Samples.NewRebar.CS } catch (Exception ex) { - TaskDialog.Show("Revit", "Rebar shape creation failed:" + ex.ToString()); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Rebar shape creation failed:" + ex.ToString()); return; } diff --git a/SDK/Samples/NewRebar/CS/NewRebar.csproj b/SDK/Samples/NewRebar/CS/NewRebar.csproj index 4aae16fa..b6519451 100644 --- a/SDK/Samples/NewRebar/CS/NewRebar.csproj +++ b/SDK/Samples/NewRebar/CS/NewRebar.csproj @@ -1,136 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {3F5F3438-EA42-4340-9DEA-1D82A80BDE94} - Library - Properties Revit.SDK.Samples.NewRebar.CS - NewRebar - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - Form - - - AddConstraintForm.cs - - - Form - - - AddParameterForm.cs - - - - - - - - - - Form - - - NewRebarForm.cs - - - Form - - - NewRebarShapeForm.cs - - - - - - - - - - - - - - Designer - AddConstraintForm.cs - - - Designer - AddParameterForm.cs - - - Designer - NewRebarForm.cs - - - Designer - NewRebarShapeForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/NewRebar/CS/Properties/AssemblyInfo.cs b/SDK/Samples/NewRebar/CS/Properties/AssemblyInfo.cs index c3e0f1ee..24449474 100644 --- a/SDK/Samples/NewRebar/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/NewRebar/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/NewRoof/CS/NewRoof.csproj b/SDK/Samples/NewRoof/CS/NewRoof.csproj index 10f44103..23b2e32b 100644 --- a/SDK/Samples/NewRoof/CS/NewRoof.csproj +++ b/SDK/Samples/NewRoof/CS/NewRoof.csproj @@ -1,119 +1,16 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {1BB53C76-C784-4490-9CB2-CF9AEC00C3A3} - Library - Properties - NewRoof - NewRoof - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - - OnOutputUpdated - - - - - - - 3.5 - - - - - - - - - - Form - - - RoofEditorForm.cs - - - Form - - - RoofForm.cs - - - + UserControl - - GraphicsControl.cs - - - - - - - Designer - RoofEditorForm.cs - - - Designer - RoofForm.cs - - - Designer - GraphicsControl.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/NewRoof/CS/Properties/AssemblyInfo.cs b/SDK/Samples/NewRoof/CS/Properties/AssemblyInfo.cs index 51903187..3b9ac9e2 100644 --- a/SDK/Samples/NewRoof/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/NewRoof/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -32,7 +32,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NewRoof")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -55,3 +55,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/NewRoof/CS/RoofForms/GraphicsControl.Designer.cs b/SDK/Samples/NewRoof/CS/RoofForms/GraphicsControl.Designer.cs index fbf8914b..255d2bdc 100644 --- a/SDK/Samples/NewRoof/CS/RoofForms/GraphicsControl.Designer.cs +++ b/SDK/Samples/NewRoof/CS/RoofForms/GraphicsControl.Designer.cs @@ -34,9 +34,14 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (m_highLightPen != null) + m_highLightPen.Dispose(); + if (m_displayPen != null) + m_displayPen.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/NewRoof/CS/RoofForms/RoofEditorForm.Designer.cs b/SDK/Samples/NewRoof/CS/RoofForms/RoofEditorForm.Designer.cs index 5ba56839..0d8c397b 100644 --- a/SDK/Samples/NewRoof/CS/RoofForms/RoofEditorForm.Designer.cs +++ b/SDK/Samples/NewRoof/CS/RoofForms/RoofEditorForm.Designer.cs @@ -35,9 +35,12 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (m_graphicsControl != null) + m_graphicsControl.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/NewRoof/CS/RoofForms/RoofForm.cs b/SDK/Samples/NewRoof/CS/RoofForms/RoofForm.cs index 41d68d9b..e23d7656 100644 --- a/SDK/Samples/NewRoof/CS/RoofForms/RoofForm.cs +++ b/SDK/Samples/NewRoof/CS/RoofForms/RoofForm.cs @@ -193,7 +193,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS } else { - TaskDialog.Show("Revit", "To edit a roof, you should select a roof or double click a roof in the list first."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "To edit a roof, you should select a roof or double click a roof in the list first."); } } @@ -213,7 +213,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS Autodesk.Revit.DB.FootPrintRoof roof = m_roofsManager.CreateFootPrintRoof(level, roofType); if (roof == null) { - TaskDialog.Show("Revit", "Invalid footprint2"); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Invalid footprint2"); } else { @@ -224,12 +224,12 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS } else { - TaskDialog.Show("Revit", "You should supply footprint to create footprint roof, click select button to select footprint in Revit."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "You should supply footprint to create footprint roof, click select button to select footprint in Revit."); } } catch (Exception ex) { - TaskDialog.Show("Revit", ex.Message + " : Footprint must be in closed loops."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", ex.Message + " : Footprint must be in closed loops."); } } @@ -250,7 +250,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS Autodesk.Revit.DB.ExtrusionRoof roof = m_roofsManager.CreateExtrusionRoof(refPlane, level, roofType, m_start, m_end); if (roof == null) { - TaskDialog.Show("Revit", "Invalid profile"); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Invalid profile"); } else { @@ -261,12 +261,12 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS } else { - TaskDialog.Show("Revit", "You should supply profile to create extrusion roof, click select button to select profile in Revit."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "You should supply profile to create extrusion roof, click select button to select profile in Revit."); } } catch (Exception ex) { - TaskDialog.Show("Revit", ex.Message); + Autodesk.Revit.UI.TaskDialog.Show("Revit", ex.Message); } } @@ -312,7 +312,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS } catch (Exception ex) { - TaskDialog.Show("Revit", ex.Message); + Autodesk.Revit.UI.TaskDialog.Show("Revit", ex.Message); m_roofsManager.AbortTransaction(); } } @@ -356,7 +356,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS } catch { - TaskDialog.Show("Revit", "You should input a decimal value."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "You should input a decimal value."); e.Cancel = true; } } @@ -374,7 +374,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofForms.CS } catch { - TaskDialog.Show("Revit", "You should input a decimal value."); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "You should input a decimal value."); e.Cancel = true; } } diff --git a/SDK/Samples/NewRoof/CS/RoofsManager/ExtrusionRoofManager.cs b/SDK/Samples/NewRoof/CS/RoofsManager/ExtrusionRoofManager.cs index 230ee585..dad3b1c2 100644 --- a/SDK/Samples/NewRoof/CS/RoofsManager/ExtrusionRoofManager.cs +++ b/SDK/Samples/NewRoof/CS/RoofsManager/ExtrusionRoofManager.cs @@ -75,10 +75,10 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS extrusionRoof = m_creationDoc.NewExtrusionRoof(profile, refPlane, level, roofType, extrusionStart, extrusionEnd); createRoofTransaction.Commit(); } - catch (System.Exception e) + catch (System.Exception) { createRoofTransaction.RollBack(); - throw e; + throw; } return extrusionRoof; diff --git a/SDK/Samples/NewRoof/CS/RoofsManager/FootPrintRoofManager.cs b/SDK/Samples/NewRoof/CS/RoofsManager/FootPrintRoofManager.cs index 109d6e4c..5b781519 100644 --- a/SDK/Samples/NewRoof/CS/RoofsManager/FootPrintRoofManager.cs +++ b/SDK/Samples/NewRoof/CS/RoofsManager/FootPrintRoofManager.cs @@ -71,10 +71,10 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS footprintRoof = m_creationDoc.NewFootPrintRoof(footPrint, level, roofType, out footPrintToModelCurveMapping); createRoofTransaction.Commit(); } - catch (System.Exception e) + catch (System.Exception) { createRoofTransaction.RollBack(); - throw e; + throw; } return footprintRoof; diff --git a/SDK/Samples/NewRoof/CS/RoofsManager/RoofsManager.cs b/SDK/Samples/NewRoof/CS/RoofsManager/RoofsManager.cs index 1630712a..a2b86de7 100644 --- a/SDK/Samples/NewRoof/CS/RoofsManager/RoofsManager.cs +++ b/SDK/Samples/NewRoof/CS/RoofsManager/RoofsManager.cs @@ -48,7 +48,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS /// /// The RoofsManager is used to manage the operations between Revit and UI. /// - public class RoofsManager + public class RoofsManager : IDisposable { // To store a reference to the commandData. ExternalCommandData m_commandData; @@ -64,21 +64,11 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS // To store the selected elements in the Revit Selection m_selection; - // roofs list - ElementSet m_footPrintRoofs; - ElementSet m_extrusionRoofs; - - // To store the footprint roof lines. - Autodesk.Revit.DB.CurveArray m_footPrint; - - // To store the profile lines. - Autodesk.Revit.DB.CurveArray m_profile; - // Reference Plane for creating extrusion roof List m_referencePlanes; // Transaction for manual mode - Transaction m_transaction; + private Transaction m_transaction; // Current creating roof kind. public CreateRoofKind RoofKind; @@ -94,8 +84,8 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS m_roofTypes = new List(); m_referencePlanes = new List(); - m_footPrint = new CurveArray(); - m_profile = new CurveArray(); + FootPrint = new CurveArray(); + Profile = new CurveArray(); m_footPrintRoofManager = new FootPrintRoofManager(commandData); m_extrusionRoofManager = new ExtrusionRoofManager(commandData); @@ -125,21 +115,21 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS m_roofTypes = filteredElementCollector.Cast().ToList(); // FootPrint Roofs - m_footPrintRoofs = new ElementSet(); + FootPrintRoofs = new ElementSet(); iter = (new FilteredElementCollector(doc)).OfClass(typeof(FootPrintRoof)).GetElementIterator(); iter.Reset(); while (iter.MoveNext()) { - m_footPrintRoofs.Insert(iter.Current as FootPrintRoof); + FootPrintRoofs.Insert(iter.Current as FootPrintRoof); } // Extrusion Roofs - m_extrusionRoofs = new ElementSet(); + ExtrusionRoofs = new ElementSet(); iter = (new FilteredElementCollector(doc)).OfClass(typeof(ExtrusionRoof)).GetElementIterator(); iter.Reset(); while (iter.MoveNext()) { - m_extrusionRoofs.Insert(iter.Current as ExtrusionRoof); + ExtrusionRoofs.Insert(iter.Current as ExtrusionRoof); } // Reference Planes @@ -197,46 +187,22 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS /// /// Get all the footprint roofs in Revit. /// - public ElementSet FootPrintRoofs - { - get - { - return m_footPrintRoofs; - } - } + public ElementSet FootPrintRoofs { get; private set; } /// /// Get all the extrusion roofs in Revit. /// - public ElementSet ExtrusionRoofs - { - get - { - return m_extrusionRoofs; - } - } + public ElementSet ExtrusionRoofs { get; private set; } /// /// Get the footprint roof lines. /// - public CurveArray FootPrint - { - get - { - return m_footPrint; - } - } + public CurveArray FootPrint { get; private set; } /// /// Get the extrusion profile lines. /// - public CurveArray Profile - { - get - { - return m_profile; - } - } + public CurveArray Profile { get; private set; } /// /// Select elements in Revit to obtain the footprint roof lines or extrusion profile lines. @@ -260,7 +226,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS /// A curve array to hold the footprint roof lines. public CurveArray SelectFootPrint() { - m_footPrint.Clear(); + FootPrint.Clear(); while (true) { ElementSet es = new ElementSet(); @@ -288,21 +254,21 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS if (wall != null) { LocationCurve wallCurve = wall.Location as LocationCurve; - m_footPrint.Append(wallCurve.Curve); + FootPrint.Append(wallCurve.Curve); continue; } ModelCurve modelCurve = element as ModelCurve; if (modelCurve != null) { - m_footPrint.Append(modelCurve.GeometryCurve); + FootPrint.Append(modelCurve.GeometryCurve); } } break; } else { - TaskDialogResult result = TaskDialog.Show("Warning", "You should select a curve loop, or a wall loop, or loops combination \r\nof walls and curves to create a footprint roof.", TaskDialogCommonButtons.Ok | TaskDialogCommonButtons.Cancel); + TaskDialogResult result = Autodesk.Revit.UI.TaskDialog.Show("Warning", "You should select a curve loop, or a wall loop, or loops combination \r\nof walls and curves to create a footprint roof.", TaskDialogCommonButtons.Ok | TaskDialogCommonButtons.Cancel); if (result == TaskDialogResult.Cancel) { break; @@ -312,7 +278,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS } - return m_footPrint; + return FootPrint; } /// @@ -324,10 +290,10 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS public FootPrintRoof CreateFootPrintRoof(Level level, RoofType roofType) { FootPrintRoof roof = null; - roof = m_footPrintRoofManager.CreateFootPrintRoof(m_footPrint, level, roofType); + roof = m_footPrintRoofManager.CreateFootPrintRoof(FootPrint, level, roofType); if (roof != null) { - this.m_footPrintRoofs.Insert(roof); + this.FootPrintRoofs.Insert(roof); } return roof; } @@ -338,7 +304,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS /// A curve array to hold the extrusion profile lines. public CurveArray SelectProfile() { - m_profile.Clear(); + Profile.Clear(); while (true) { m_selection.GetElementIds().Clear(); @@ -359,7 +325,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS ModelCurve modelCurve = element as ModelCurve; if (modelCurve != null) { - m_profile.Append(modelCurve.GeometryCurve); + Profile.Append(modelCurve.GeometryCurve); continue; } } @@ -367,14 +333,14 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS } else { - TaskDialogResult result = TaskDialog.Show("Warning", "You should select a connected lines or arcs, \r\nnot closed in a loop to create extrusion roof.", TaskDialogCommonButtons.Ok | TaskDialogCommonButtons.Cancel); + TaskDialogResult result = Autodesk.Revit.UI.TaskDialog.Show("Warning", "You should select a connected lines or arcs, \r\nnot closed in a loop to create extrusion roof.", TaskDialogCommonButtons.Ok | TaskDialogCommonButtons.Cancel); if (result == TaskDialogResult.Cancel) { break; } } } - return m_profile; + return Profile; } /// @@ -390,10 +356,10 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS Level level, RoofType roofType, double extrusionStart, double extrusionEnd) { ExtrusionRoof roof = null; - roof = m_extrusionRoofManager.CreateExtrusionRoof(m_profile, refPlane, level, roofType, extrusionStart, extrusionEnd); + roof = m_extrusionRoofManager.CreateExtrusionRoof(Profile, refPlane, level, roofType, extrusionStart, extrusionEnd); if (roof != null) { - m_extrusionRoofs.Insert(roof); + ExtrusionRoofs.Insert(roof); } return roof; } @@ -406,7 +372,7 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS { if (m_transaction.GetStatus() == TransactionStatus.Started) { - TaskDialog.Show("Revit", "Transaction started already"); + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Transaction started already"); } return m_transaction.Start(); } @@ -427,5 +393,28 @@ namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS { return m_transaction.RollBack(); } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (FootPrintRoofs != null) + FootPrintRoofs.Dispose(); + if (ExtrusionRoofs != null) + ExtrusionRoofs.Dispose(); + if (FootPrint != null) + FootPrint.Dispose(); + if (Profile != null) + Profile.Dispose(); + if (m_transaction != null) + m_transaction.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } \ No newline at end of file diff --git a/SDK/Samples/ObjectViewer/CS/ObjectViewer.csproj b/SDK/Samples/ObjectViewer/CS/ObjectViewer.csproj index 99a78a4d..ae9839e9 100644 --- a/SDK/Samples/ObjectViewer/CS/ObjectViewer.csproj +++ b/SDK/Samples/ObjectViewer/CS/ObjectViewer.csproj @@ -1,119 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {274E118B-8191-47B8-8E6E-83F65D8A82E4} - Library - Properties Revit.SDK.Samples.ObjectViewer.CS - ObjectViewer - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - - OnOutputUpdated - - - - - - - 3.5 - + - - - - - - - - Code - - - - - Form - - - ObjectViewerForm.cs - - - - - - - - - - - - Designer - ObjectViewerForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ObjectViewer/CS/ParasFactory.cs b/SDK/Samples/ObjectViewer/CS/ParasFactory.cs index 58c7c4b6..dff0ce83 100644 --- a/SDK/Samples/ObjectViewer/CS/ParasFactory.cs +++ b/SDK/Samples/ObjectViewer/CS/ParasFactory.cs @@ -30,6 +30,7 @@ using System.Windows.Forms; using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.ObjectViewer.CS { diff --git a/SDK/Samples/ObjectViewer/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ObjectViewer/CS/Properties/AssemblyInfo.cs index 529d5fc9..013b3f70 100644 --- a/SDK/Samples/ObjectViewer/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ObjectViewer/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/Openings/CS/Openings.csproj b/SDK/Samples/Openings/CS/Openings.csproj index 3409bfac..22654dc4 100644 --- a/SDK/Samples/Openings/CS/Openings.csproj +++ b/SDK/Samples/Openings/CS/Openings.csproj @@ -1,122 +1,12 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C7A272AF-69E5-4E22-9CF7-5E49E67ABDB4} - Library - Properties - Openings - Openings - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900 - prompt - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - CreateModelLineOptionsForm.cs - - - - - - - Form - - - OpeningForm.cs - - - - - - - - - - - Designer - CreateModelLineOptionsForm.cs - - - Designer - OpeningForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Openings/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Openings/CS/Properties/AssemblyInfo.cs index 3ff88a9c..d2c5d48b 100644 --- a/SDK/Samples/Openings/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Openings/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/PanelSchedule/CS/PanelSchedule.csproj b/SDK/Samples/PanelSchedule/CS/PanelSchedule.csproj index bed63a4e..a83af182 100644 --- a/SDK/Samples/PanelSchedule/CS/PanelSchedule.csproj +++ b/SDK/Samples/PanelSchedule/CS/PanelSchedule.csproj @@ -1,104 +1,32 @@ - - + - Debug - AnyCPU - 9.0.21022 - 2.0 - {7049E1C8-65DE-4D14-99EA-68DBC94ECEAB} - Library - Properties Revit.SDK.Samples.PanelSchedule.CS - PanelSchedule - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\PanelSchedule.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\PanelSchedule.XML + + + false + false - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\PanelSchedule.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE bin\Release\PanelSchedule.XML - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - Code - - - - - - - - - - + + + None + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ParameterUtils/CS/ParameterUtils.csproj b/SDK/Samples/ParameterUtils/CS/ParameterUtils.csproj index b08eff5c..dc34d568 100644 --- a/SDK/Samples/ParameterUtils/CS/ParameterUtils.csproj +++ b/SDK/Samples/ParameterUtils/CS/ParameterUtils.csproj @@ -1,97 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {4F033A02-39C3-4E61-9CD4-969EB3056BCD} - Library - Properties - ParameterUtils - ParameterUtils - - - - - 2.0 - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - PropertiesForm.cs - - - - - - Designer - PropertiesForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ParameterUtils/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ParameterUtils/CS/Properties/AssemblyInfo.cs index 51487bbb..e98f9530 100644 --- a/SDK/Samples/ParameterUtils/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ParameterUtils/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/PathOfTravel/CS/Command.cs b/SDK/Samples/PathOfTravel/CS/Command.cs index 4377282b..b9f87ca5 100644 --- a/SDK/Samples/PathOfTravel/CS/Command.cs +++ b/SDK/Samples/PathOfTravel/CS/Command.cs @@ -34,6 +34,7 @@ using Autodesk.Revit.UI; using Autodesk.Revit.UI.Selection; using Autodesk.Revit.DB.Architecture; using Autodesk.Revit.DB.Analysis; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.PathOfTravelCreation.CS { diff --git a/SDK/Samples/PathOfTravel/CS/PathOfTravel.csproj b/SDK/Samples/PathOfTravel/CS/PathOfTravel.csproj index 914334ec..f19892ec 100644 --- a/SDK/Samples/PathOfTravel/CS/PathOfTravel.csproj +++ b/SDK/Samples/PathOfTravel/CS/PathOfTravel.csproj @@ -1,97 +1,19 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {178B68F6-2120-448F-BEAB-84B824604F8D} - Library - Properties Revit.SDK.Samples.PathOfTravel.CS - PathOfTravel - - - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\PathOfTravel.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset true bin\Debug\PathOfTravel.xml - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset bin\Release\PathOfTravel.xml - - - - - - - - - 4.7 - - - - - - Form - - - CreateForm.cs - - - - - - CreateForm.cs - - - - - - OnOutputUpdated - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/PathOfTravel/CS/Properties/AssemblyInfo.cs b/SDK/Samples/PathOfTravel/CS/Properties/AssemblyInfo.cs index 30f5fbe2..49367dd0 100644 --- a/SDK/Samples/PathOfTravel/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/PathOfTravel/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/PathReinforcement/CS/PathReinProperties.cs b/SDK/Samples/PathReinforcement/CS/PathReinProperties.cs index 24621d28..479c8d83 100644 --- a/SDK/Samples/PathReinforcement/CS/PathReinProperties.cs +++ b/SDK/Samples/PathReinforcement/CS/PathReinProperties.cs @@ -106,7 +106,7 @@ namespace Revit.SDK.Samples.PathReinforcement.CS /// private String m_primaryBarLength; - #region EnventHanlder for updating selected object of PropertyGrid + #region EventHandler for updating selected object of PropertyGrid /// /// update selected object of Property grid after enable / disable some properties. /// @@ -184,7 +184,7 @@ namespace Revit.SDK.Samples.PathReinforcement.CS /// Bar numbers of path reinforcement,read only property. /// the property is read-only by default /// - [Category("Layers"), DisplayName("Number of Bars"), ReadOnlyAttribute(true)] + [Category("Layers"), DisplayName("Number of Bars"), ReadOnly(true)] public int NumberOfBars { get @@ -200,7 +200,7 @@ namespace Revit.SDK.Samples.PathReinforcement.CS /// /// Layout rule of path reinforcement,get/set property. /// - [Category("Construction"), DisplayName("Layout Rule"), ReadOnlyAttribute(false)] + [Category("Construction"), DisplayName("Layout Rule"), ReadOnly(false)] public LayoutRule LayoutRule { get @@ -240,7 +240,7 @@ namespace Revit.SDK.Samples.PathReinforcement.CS /// /// Bar spacing of path reinforcement,get/set property. /// - [Category("Layers"), DisplayName("Bar Spacing"), ReadOnlyAttribute(false)] + [Category("Layers"), DisplayName("Bar Spacing"), ReadOnly(false)] public String BarSpacing { get @@ -340,9 +340,11 @@ namespace Revit.SDK.Samples.PathReinforcement.CS Type type = typeof(System.ComponentModel.ReadOnlyAttribute); PropertyDescriptorCollection props = TypeDescriptor.GetProperties(this); AttributeCollection attrs = props[propertyName].Attributes; - FieldInfo fld = type.GetField("isReadOnly", - BindingFlags.Instance | BindingFlags.NonPublic); - fld.SetValue(attrs[type], readOnly); + FieldInfo fld = type.GetField("k__BackingField", BindingFlags.Instance | BindingFlags.NonPublic); + if (fld != null) + { + fld.SetValue(attrs[type], readOnly); + } } catch (System.ArgumentException ex) { diff --git a/SDK/Samples/PathReinforcement/CS/PathReinforcement.csproj b/SDK/Samples/PathReinforcement/CS/PathReinforcement.csproj index ddd6af30..8bc7ab76 100644 --- a/SDK/Samples/PathReinforcement/CS/PathReinforcement.csproj +++ b/SDK/Samples/PathReinforcement/CS/PathReinforcement.csproj @@ -1,96 +1,14 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {32B2FD02-DBD6-47EF-8709-C550F4074E64} - Library - Properties Revit.SDK.Samples.PathReinforcement.CS - PathReinforcement - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - DEBUG;TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - DEBUG;TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - Form - - - PathReinforcementForm.cs - - - - - - - - Designer - PathReinforcementForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/PathReinforcement/CS/PathReinforcementForm.Designer.cs b/SDK/Samples/PathReinforcement/CS/PathReinforcementForm.Designer.cs index 289bc4cf..9158724a 100644 --- a/SDK/Samples/PathReinforcement/CS/PathReinforcementForm.Designer.cs +++ b/SDK/Samples/PathReinforcement/CS/PathReinforcementForm.Designer.cs @@ -36,9 +36,12 @@ namespace Revit.SDK.Samples.PathReinforcement.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (m_profile != null) + m_profile.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/PathReinforcement/CS/Profile.cs b/SDK/Samples/PathReinforcement/CS/Profile.cs index 9037747a..d98dab87 100644 --- a/SDK/Samples/PathReinforcement/CS/Profile.cs +++ b/SDK/Samples/PathReinforcement/CS/Profile.cs @@ -35,7 +35,7 @@ namespace Revit.SDK.Samples.PathReinforcement.CS /// /// This class stores the geometry information of path reinforcement. /// - class Profile + class Profile : IDisposable { /// /// field used to store path reinforcement. @@ -62,7 +62,7 @@ namespace Revit.SDK.Samples.PathReinforcement.CS /// field used to store the bound of the curves of path reinforcement. /// 2d data. /// - private BoundingBoxUV m_box = new BoundingBoxUV(); + private BoundingBoxUV m_box; /// /// field used to store the geometry data of curves of path reinforcement. @@ -82,6 +82,7 @@ namespace Revit.SDK.Samples.PathReinforcement.CS /// External command data public Profile(Autodesk.Revit.DB.Structure.PathReinforcement pathRein, ExternalCommandData commandData) { + m_box = new BoundingBoxUV(); m_pathRein = pathRein; m_commandData = commandData; Tessellate(); @@ -270,5 +271,20 @@ namespace Revit.SDK.Samples.PathReinforcement.CS return new Matrix4(new Vector4(vXAxis), new Vector4(vYAxis), new Vector4(vZAxis)); } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (m_box != null) + m_box.Dispose(); + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/SDK/Samples/PathReinforcement/CS/Properties/AssemblyInfo.cs b/SDK/Samples/PathReinforcement/CS/Properties/AssemblyInfo.cs index 19398e13..018a404b 100644 --- a/SDK/Samples/PathReinforcement/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/PathReinforcement/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("PathReinforcement")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -56,3 +56,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/PerformanceAdviserControl/CS/PerformanceAdviserControl.csproj b/SDK/Samples/PerformanceAdviserControl/CS/PerformanceAdviserControl.csproj index 00b0e56a..dc7e2ce9 100644 --- a/SDK/Samples/PerformanceAdviserControl/CS/PerformanceAdviserControl.csproj +++ b/SDK/Samples/PerformanceAdviserControl/CS/PerformanceAdviserControl.csproj @@ -1,118 +1,23 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {630906E4-D917-416E-80B6-B9F64279AE70} - Library - Properties Revit.SDK.Samples.PerformanceAdviserControl.CS - PerformanceAdviserControl - v4.8 - 512 - + true - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + + true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - 3.0 - - - 3.0 - - - - 3.5 - - - - - - - 3.5 - - - 3.5 - - - - - 3.0 - - - 3.0 - + - - - - - - - Form - - - TestDisplayDialog.cs - - - - - - TestDisplayDialog.cs - - - - - - - + None diff --git a/SDK/Samples/PerformanceAdviserControl/CS/Properties/AssemblyInfo.cs b/SDK/Samples/PerformanceAdviserControl/CS/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..63e1b9f0 --- /dev/null +++ b/SDK/Samples/PerformanceAdviserControl/CS/Properties/AssemblyInfo.cs @@ -0,0 +1 @@ +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/PhaseSample/VB.NET/AssemblyInfo.vb b/SDK/Samples/PhaseSample/VB.NET/AssemblyInfo.vb index f036330e..38f8e077 100644 --- a/SDK/Samples/PhaseSample/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/PhaseSample/VB.NET/AssemblyInfo.vb @@ -50,4 +50,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/PhaseSample/VB.NET/PhaseSample.vbproj b/SDK/Samples/PhaseSample/VB.NET/PhaseSample.vbproj index b7b0d257..94ceab99 100644 --- a/SDK/Samples/PhaseSample/VB.NET/PhaseSample.vbproj +++ b/SDK/Samples/PhaseSample/VB.NET/PhaseSample.vbproj @@ -1,152 +1,22 @@ - - + Local - 9.0.30729 - 2.0 - {115333F0-6B33-4B21-B206-32367A5564C8} - Debug - AnyCPU - - - - - PhaseSample - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.PhaseSample.VB.NET - - - - Windows - - - 2.0 - v4.8 - - - - bin\ - - 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false + true + true - - bin\ - - - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - Form - - - PickPhase.vb - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/PhysicalProp/CS/Command.cs b/SDK/Samples/PhysicalProp/CS/Command.cs index b036456c..bf571732 100644 --- a/SDK/Samples/PhysicalProp/CS/Command.cs +++ b/SDK/Samples/PhysicalProp/CS/Command.cs @@ -27,6 +27,7 @@ using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.UI.Selection; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.PhysicalProp.CS { diff --git a/SDK/Samples/PhysicalProp/CS/PhysicalProp.csproj b/SDK/Samples/PhysicalProp/CS/PhysicalProp.csproj index 53faf364..e5f82b29 100644 --- a/SDK/Samples/PhysicalProp/CS/PhysicalProp.csproj +++ b/SDK/Samples/PhysicalProp/CS/PhysicalProp.csproj @@ -1,147 +1,26 @@ - - + - Local - 9.0.30729 - 2.0 - {40423DF3-F8FE-4BC3-95E8-D4D715313B9B} - Debug - AnyCPU - - - - - PhysicalProp - - JScript Grid IE50 false - Library - PhysicalProp - - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 1.0.0.%2a - false - true - 2.0 - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - false - false - true - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - true - false - false - true - 4 - none - prompt + + False + - true - bin\x64\Debug\ - DEBUG;TRACE 285212672 4096 - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE 285212672 - true true 4096 - x64 - prompt MinimumRecommendedRules.ruleset + - OnOutputUpdated - - - - System - - - System.Data - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - Code - - - - - - False - .NET Framework 2.0 - true - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/PlaceFamilyInstanceByFace/CS/FamilyInstanceCreator.cs b/SDK/Samples/PlaceFamilyInstanceByFace/CS/FamilyInstanceCreator.cs index 6104dcba..025e4346 100644 --- a/SDK/Samples/PlaceFamilyInstanceByFace/CS/FamilyInstanceCreator.cs +++ b/SDK/Samples/PlaceFamilyInstanceByFace/CS/FamilyInstanceCreator.cs @@ -32,6 +32,7 @@ using Autodesk.Revit.UI; using GeoInstance = Autodesk.Revit.DB.GeometryInstance; using GeoElement = Autodesk.Revit.DB.GeometryElement; using RevitElement = Autodesk.Revit.DB.Element; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS { diff --git a/SDK/Samples/PlaceFamilyInstanceByFace/CS/PlaceFamilyInstanceByFace.csproj b/SDK/Samples/PlaceFamilyInstanceByFace/CS/PlaceFamilyInstanceByFace.csproj index a5197c66..c3c6fbba 100644 --- a/SDK/Samples/PlaceFamilyInstanceByFace/CS/PlaceFamilyInstanceByFace.csproj +++ b/SDK/Samples/PlaceFamilyInstanceByFace/CS/PlaceFamilyInstanceByFace.csproj @@ -1,118 +1,21 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {ABD6F3DB-10CA-49B6-869E-843A16F79FF2} - Library - Properties Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS - PlaceFamilyInstanceByFace - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - Form - - - BasedType.cs - - - - - Form - - - PlaceFamilyInstanceForm.cs - - + UserControl - - PointUserControl.cs - - - - - Designer - BasedType.cs - - - Designer - PlaceFamilyInstanceForm.cs - - - PointUserControl.cs - Designer - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/PlaceFamilyInstanceByFace/CS/Properties/AssemblyInfo.cs b/SDK/Samples/PlaceFamilyInstanceByFace/CS/Properties/AssemblyInfo.cs index 0227f9e6..44ddc011 100644 --- a/SDK/Samples/PlaceFamilyInstanceByFace/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/PlaceFamilyInstanceByFace/CS/Properties/AssemblyInfo.cs @@ -33,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/PlacementOptions/CS/Command.cs b/SDK/Samples/PlacementOptions/CS/Command.cs index 6b17d067..565e6300 100644 --- a/SDK/Samples/PlacementOptions/CS/Command.cs +++ b/SDK/Samples/PlacementOptions/CS/Command.cs @@ -29,6 +29,7 @@ using System.Linq; using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.PlacementOptions.CS diff --git a/SDK/Samples/PlacementOptions/CS/PlacementOptions.csproj b/SDK/Samples/PlacementOptions/CS/PlacementOptions.csproj index cda89f5b..0dd397ee 100644 --- a/SDK/Samples/PlacementOptions/CS/PlacementOptions.csproj +++ b/SDK/Samples/PlacementOptions/CS/PlacementOptions.csproj @@ -1,124 +1,18 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {A72A0EF8-5741-4A44-81DA-4F3497C42B74} - Library - Properties Revit.SDK.Samples.PlacementOptions.CS - PlacementOptions - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\PlacementOptions.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\PlacementOptions.XML true - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 4.5.2 - - - - - - Form - - - FacebasedForm.cs - - - Form - - - OptionsForm.cs - - - - Form - - - SketchbasedForm.cs - - - - - FacebasedForm.cs - - - OptionsForm.cs - - - SketchbasedForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/PlacementOptions/CS/Properties/AssemblyInfo.cs b/SDK/Samples/PlacementOptions/CS/Properties/AssemblyInfo.cs index b559a6c1..ccea03f5 100644 --- a/SDK/Samples/PlacementOptions/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/PlacementOptions/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/PointCloudEngine/CS/PointCloudEngine.XML b/SDK/Samples/PointCloudEngine/CS/PointCloudEngine.XML deleted file mode 100644 index eeab9fdd..00000000 --- a/SDK/Samples/PointCloudEngine/CS/PointCloudEngine.XML +++ /dev/null @@ -1,543 +0,0 @@ - - - - PointCloudEngine - - - - - An implementation for a file-based point cloud. - - - The file format is based upon XML. A sample XML looks like: - - - - - - - - - - - - - - - - - - The scale value applies to the entire point cloud. One or more cell values should be supplied, - with the coordinates of the opposing corners, a color, and an option whether or not to randomize - the generated points. - - - - - Constructs a new XML-based point cloud access. - - The full path to the file. - - - - Sets up the file-based point cloud. - - - - - The implementation of IPointCloudAccess.GetName(). - - The name (the file name). - - - - The implementation of IPointCloudAccess.GetColorEncoding() - - The color encoding. - - - - The implementation of IPointCloudAccess.CreatePointSetIterator(). - - The filter. - The view id (unused). - The new iterator. - - - - The implementation of IPointCloudAccess.CreatePointSetIterator(). - - The filter. - The density. - The view id (unused). - The new iterator. - - - - The implementation of IPointCloudAccess.GetExtent(). - - The extents of the point cloud. - - - - The implementation of IPointCloudAccess.GetOffset(). - - This method is not used by Revit and will be removed in a later pre-release build. - Zero. - - - - The implementation of IPointCloudAccess.GetUnitsToFeetConversionFactor(). - - The scale. - - - - The implementation of IPointCloudAccess.ReadPoints(). - - The filter. - The view id (unused). - The point cloud buffer. - The maximum number of points. - The number of points read. - - - - The implementation of IPointCloudAccess.Free(). - - - - - The base class for all IPointCloudAccess implementations in this sample. - - - - - Constructs a new instance of the base class. - - - - - Adds a new cell to the point cloud. - - The lower left point. - The upper right point. - The color. - True to randomize point number and location, false for a regular arrangement of points. - - - - Adds a new cell to the point cloud. - - The lower left point. - The upper right point. - The color. - - - - Adds a cell to the stored outline of the point cloud. If the cell boundaries extend beyond the current outline, the outline - is adjusted. - - - - - - Gets the outline calculated from all cells in the point cloud. - - - - - - Gets the scale stored for this point cloud. - - - - - - Saves the contents of the point cloud into an XML element. - - The XML element in which to save the point cloud properties. - - - - The internal implementation for point cloud read requests from Revit. - - Both IPointCloudAccess.ReadPoints() and IPointSetIterator.ReadPoints() are served by this method. - The point cloud filter. - The point cloud buffer. - The maximum number of points in the buffer. - The start index for points. Pass 0 if called from IPointCloudAccess.ReadPoints() or if this is the first - call to IPointSetIterator.ReadPoints(). Pass the previous cumulative number of read points for second and successive calls to - IPointSetIterator.ReadPoints(). - The number of points read. - - - - Sets up a point cloud from an XML root element. - - The root element. - - - - The implementation for an IPointSetIterator for a file-based or predefined point cloud. - - - - - Constructs a new instance of the point cloud iterator. - - The access. - The filter used for this iteration. - - - - Implementation of IPointSetIterator.ReadPoints() - - The point buffer. - The buffer size. - The number of points read. - - - - Implementation of IPointSetIterator.Free() - - - - - This class is used to calculate and store points for a given cell. - - - - - The number of points in the cell. - - - - - The lower left point of the cell. - - - - - The upper right point of the cell. - - - - - The points in the cell. - - - - - Creates a new instance of a rectangular cell. - - The lower left point of the cell. - The upper right point of the cell. - The color used for points in the cell. - True to apply randomization to the number and location of points, false for a regular arrangement of points. - - - - Invokes the calculation for all points in the cell. - - - - - Serializes the properties of the cell to an XML element. - - The element to which the properties are added as subelements. - - - - Constructs a new instance of a rectangular cell from an XML element. - - The XML element representing the cell. - - - - ExternalApplication used to register the point cloud engines managed by this sample. - - - - - The implementation of IExternalApplication.OnStartup() - - The Revit application. - Result.Succeeded - - - - The implementation of IExternalApplication.OnShutdown() - - The Revit application. - Result.Succeeded. - - - - ExternalCommand to add a predefined point cloud. - - - - - The implementation for IExternalCommand.Execute() - - The Revit command data. - The error message (ignored). - The elements to display in the failure dialog (ignored). - Result.Succeeded - - - - ExternalCommand to a predefined point cloud with randomized points. - - - - - The implementation for IExternalCommand.Execute() - - The Revit command data. - The error message (ignored). - The elements to display in the failure dialog (ignored). - Result.Succeeded - - - - ExternalCommand to add a predefined point cloud at a non-default transform. - - - - - The implementation for IExternalCommand.Execute() - - The Revit command data. - The error message (ignored). - The elements to display in the failure dialog (ignored). - Result.Succeeded - - - - Base class for ExternalCommands used to add point cloud instances programmatically. - - - - - Adds a point cloud instance programmatically. - - The document. - The engine identifier string. - The identifier for the particular point cloud. - The transform to apply to the new point cloud instance. - - - - Utility ExternalCommand to take a predefined point cloud and write the corresponding XML for it to disk. - - - - - The implementation for IExternalCommand.Execute() - - The Revit command data. - The error message (ignored). - The elements to display in the failure dialog (ignored). - Result.Succeeded - - - - An implementation for a non file-based point cloud. In this implementaiton, the location of the cells, including their colors and options, - are hardcoded. - - - - - Constructs a new predefined point cloud access instance. - - The identifier of the point cloud. - - - - Constructs a new predefined point cloud access instance. - - The identifier of the point cloud. - True to use randomization for the point location and number, false otherwise. - - - - Sets up the predefined point cloud. - - True to use randomization for the point location and number, false otherwise. - - - - The implementation of IPointCloudAccess.GetName(). - - The name (the file name). - - - - The implementation of IPointCloudAccess.GetColorEncoding() - - The color encoding. - - - - The implementation of IPointCloudAccess.CreatePointSetIterator(). - - The filter. - The view id (unused). - The new iterator. - - - - The implementation of IPointCloudAccess.CreatePointSetIterator(). - - The filter. - The density. - The view id (unused). - The new iterator. - - - - The implementation of IPointCloudAccess.GetExtent(). - - The extents of the point cloud. - - - - The implementation of IPointCloudAccess.GetOffset(). - - This method is not used by Revit and will be removed in a later pre-release build. - Zero. - - - - The implementation of IPointCloudAccess.GetUnitsToFeetConversionFactor(). - - The scale. - - - - The implementation of IPointCloudAccess.ReadPoints(). - - The filter. - The view id (unused). - The point cloud buffer. - The maximum number of points. - The number of points read. - - - - The implementation of IPointCloudAccess.Free(). - - - - - The type of engine. - - Because the same engine implementation is used for all types of engines in this sample, a member of this enumerated type - is used to determine the logic necessary to create the IPointCloudAccess instance. - - - - A predefined point cloud engine (non-randomized). - - - - - A predefined point cloud engine (randomized). - - - - - A file based point cloud engine. - - - - - An implementation of IPointCloudEngine used by all the custom engines in this sample. - - - - - Constructs a new instance of the engine. - - The type of point cloud served by this engine instance. - - - - Implementation of IPointCloudEngine.CreatePointCloudAccess(). - - The identifier (or file name) for the desired point cloud. - The IPointCloudAccess implementation serving this point cloud. - - - - Implementation of IPointCloudEngine.Free(). - - - - - Utilities used by the sample to process XML entries in file-based point clouds. - - - - - Gets an XYZ point from an XML element. - - The element. - The XYZ. - - - - Gets a boolean value from an XML element. - - The element. - The value. - - - - Gets a double value from an XML element. - - The element. - The value. - - - - Gets an integer value from an XML element. - - The element. - The value. - - - - Gets a color value (in the form needed for inclusion in a CloudPoint) from an XML element. - - The element. - The value. - - - - Gets the XML element representing a point. - - The point. - The name of the XML element. - The element. - - - - Gets the XML element representing a CloudPoint color. - - The color. - The name. - The element. - - - - Gets the XML element representing an object. - - The object. - The name. - The element. - - - diff --git a/SDK/Samples/PointCloudEngine/CS/PointCloudEngine.csproj b/SDK/Samples/PointCloudEngine/CS/PointCloudEngine.csproj index f6100241..6082f47e 100644 --- a/SDK/Samples/PointCloudEngine/CS/PointCloudEngine.csproj +++ b/SDK/Samples/PointCloudEngine/CS/PointCloudEngine.csproj @@ -1,144 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {FD166650-1867-470F-BB1E-DEBC48E45A7C} - Library - Properties Revit.Test.CSTemplate - PointCloudEngine - - - 2.0 - - - false - v4.8 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - PointCloudEngine.XML - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - true + - true - bin\x64\Debug\ - DEBUG;TRACE true PointCloudEngine.XML - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE true - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - 3.5 - - - - - - - 3.5 - - - - - - - - - - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/PostCommandWorkflow/CS/PostCommandWorkflow.csproj b/SDK/Samples/PostCommandWorkflow/CS/PostCommandWorkflow.csproj index 1873929f..2709eb25 100644 --- a/SDK/Samples/PostCommandWorkflow/CS/PostCommandWorkflow.csproj +++ b/SDK/Samples/PostCommandWorkflow/CS/PostCommandWorkflow.csproj @@ -1,105 +1,20 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {2EDE57B7-FA79-479A-922A-C0ED1D1C5625} - Library - Properties Revit.SDK.Samples.PostCommandWorkflow.CS - PostCommandWorkflow - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\PostCommandWorkflow.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\PostCommandWorkflow.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - - 3.5 - - - - - - - - - - True - True - Resources.resx - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/PostCommandWorkflow/CS/Properties/AssemblyInfo.cs b/SDK/Samples/PostCommandWorkflow/CS/Properties/AssemblyInfo.cs index 333065af..5b64e77f 100644 --- a/SDK/Samples/PostCommandWorkflow/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/PostCommandWorkflow/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/PowerCircuit/CS/CircuitOperationData.cs b/SDK/Samples/PowerCircuit/CS/CircuitOperationData.cs index 95afb909..1b0bf050 100644 --- a/SDK/Samples/PowerCircuit/CS/CircuitOperationData.cs +++ b/SDK/Samples/PowerCircuit/CS/CircuitOperationData.cs @@ -33,6 +33,7 @@ using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Electrical; using Autodesk.Revit.UI.Selection; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.PowerCircuit.CS { diff --git a/SDK/Samples/PowerCircuit/CS/PowerCircuit.csproj b/SDK/Samples/PowerCircuit/CS/PowerCircuit.csproj index 38c8b371..e4f68c34 100644 --- a/SDK/Samples/PowerCircuit/CS/PowerCircuit.csproj +++ b/SDK/Samples/PowerCircuit/CS/PowerCircuit.csproj @@ -1,149 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {C6ED7380-B017-4B06-A254-D26A291CBD3F} - Library - Properties Revit.SDK.Samples.PowerCircuit.CS - PowerCircuit - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - EditCircuitForm.cs - - - - - Form - - - CircuitOperationForm.cs - - - - - True - True - Resources.resx - - - Form - - - SelectCircuitForm.cs - - - - - Designer - EditCircuitForm.cs - - - Designer - CircuitOperationForm.cs - - - Designer - ResXFileCodeGenerator - Resources.Designer.cs - - - Designer - SelectCircuitForm.cs - - - - - - - - - - - - - - - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/PowerCircuit/CS/Properties/AssemblyInfo.cs b/SDK/Samples/PowerCircuit/CS/Properties/AssemblyInfo.cs index 37329349..86914566 100644 --- a/SDK/Samples/PowerCircuit/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/PowerCircuit/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ProjectInfo/CS/ProjectInfo.csproj b/SDK/Samples/ProjectInfo/CS/ProjectInfo.csproj index 93c2898b..dc34d568 100644 --- a/SDK/Samples/ProjectInfo/CS/ProjectInfo.csproj +++ b/SDK/Samples/ProjectInfo/CS/ProjectInfo.csproj @@ -1,116 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {E832481F-F7F5-4E40-841C-1A7A6D21F576} - Library - Properties - ProjectInfo - ProjectInfo - - - - - - - 2.0 - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - - - - - - - - - Form - - - ProjectInfoForm.cs - - - - - - - - - - Designer - ProjectInfoForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ProjectInfo/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ProjectInfo/CS/Properties/AssemblyInfo.cs index f391239c..6bf6f8ff 100644 --- a/SDK/Samples/ProjectInfo/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ProjectInfo/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ReadonlySharedParameters/CS/ReadonlySharedParameterApplicaton.cs b/SDK/Samples/ReadonlySharedParameters/CS/ReadonlySharedParameterApplicaton.cs index 66e8a66b..4c89356d 100644 --- a/SDK/Samples/ReadonlySharedParameters/CS/ReadonlySharedParameterApplicaton.cs +++ b/SDK/Samples/ReadonlySharedParameters/CS/ReadonlySharedParameterApplicaton.cs @@ -33,12 +33,12 @@ namespace Revit.SDK.Samples.ReadonlySharedParameters.CS { #region IExternalApplication Members - Result IExternalApplication.OnShutdown(UIControlledApplication application) + public Result OnShutdown(UIControlledApplication application) { return Result.Succeeded; } - Result IExternalApplication.OnStartup(UIControlledApplication application) + public Result OnStartup(UIControlledApplication application) { RibbonPanel panel = application.CreateRibbonPanel("Shared parameters"); diff --git a/SDK/Samples/ReadonlySharedParameters/CS/ReadonlySharedParameters.csproj b/SDK/Samples/ReadonlySharedParameters/CS/ReadonlySharedParameters.csproj index d1e28748..72f69856 100644 --- a/SDK/Samples/ReadonlySharedParameters/CS/ReadonlySharedParameters.csproj +++ b/SDK/Samples/ReadonlySharedParameters/CS/ReadonlySharedParameters.csproj @@ -1,89 +1,21 @@ - - - + + - Debug - AnyCPU - {2B105077-D98A-4A86-8FED-E04985FE3E67} - Library - Properties - ReadonlySharedParameters - ReadonlySharedParameters - - - - - - - 2.0 - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + false - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - + + - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/RebarContainerAnyShapeType/CS/BeamFramReinMakerForm.cs b/SDK/Samples/RebarContainerAnyShapeType/CS/BeamFramReinMakerForm.cs index 39c6c680..1f43640c 100644 --- a/SDK/Samples/RebarContainerAnyShapeType/CS/BeamFramReinMakerForm.cs +++ b/SDK/Samples/RebarContainerAnyShapeType/CS/BeamFramReinMakerForm.cs @@ -32,6 +32,7 @@ using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.RebarContainerAnyShapeType.CS { diff --git a/SDK/Samples/RebarContainerAnyShapeType/CS/ColumnFramReinMakerForm.cs b/SDK/Samples/RebarContainerAnyShapeType/CS/ColumnFramReinMakerForm.cs index a00a3f33..3fa6df9d 100644 --- a/SDK/Samples/RebarContainerAnyShapeType/CS/ColumnFramReinMakerForm.cs +++ b/SDK/Samples/RebarContainerAnyShapeType/CS/ColumnFramReinMakerForm.cs @@ -32,6 +32,7 @@ using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.RebarContainerAnyShapeType.CS { diff --git a/SDK/Samples/RebarContainerAnyShapeType/CS/FramReinMaker.cs b/SDK/Samples/RebarContainerAnyShapeType/CS/FramReinMaker.cs index 33bbf6aa..4279fa9e 100644 --- a/SDK/Samples/RebarContainerAnyShapeType/CS/FramReinMaker.cs +++ b/SDK/Samples/RebarContainerAnyShapeType/CS/FramReinMaker.cs @@ -174,7 +174,7 @@ namespace Revit.SDK.Samples.RebarContainerAnyShapeType.CS /// Give the flew process of the reinforcement creation. /// /// - bool IFrameReinMaker.Run() + public bool Run() { // First, check the data whether is right and enough. if (!AssertData()) diff --git a/SDK/Samples/RebarContainerAnyShapeType/CS/GeomData.cs b/SDK/Samples/RebarContainerAnyShapeType/CS/GeomData.cs index b3bee966..1094101c 100644 --- a/SDK/Samples/RebarContainerAnyShapeType/CS/GeomData.cs +++ b/SDK/Samples/RebarContainerAnyShapeType/CS/GeomData.cs @@ -259,7 +259,7 @@ namespace Revit.SDK.Samples.RebarContainerAnyShapeType.CS /// public class XYZHeightComparer : IComparer { - int IComparer.Compare(Autodesk.Revit.DB.XYZ first, Autodesk.Revit.DB.XYZ second) + public int Compare(Autodesk.Revit.DB.XYZ first, Autodesk.Revit.DB.XYZ second) { // first compare z coordinate, then y coordinate, at last x coordinate if (GeomUtil.IsEqual(first.Z, second.Z)) diff --git a/SDK/Samples/RebarContainerAnyShapeType/CS/Properties/AssemblyInfo.cs b/SDK/Samples/RebarContainerAnyShapeType/CS/Properties/AssemblyInfo.cs index 9482f2a1..13e98c39 100644 --- a/SDK/Samples/RebarContainerAnyShapeType/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/RebarContainerAnyShapeType/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/RebarContainerAnyShapeType/CS/RebarContainerAnyShapeType.csproj b/SDK/Samples/RebarContainerAnyShapeType/CS/RebarContainerAnyShapeType.csproj index 00106f21..dfaa4c1c 100644 --- a/SDK/Samples/RebarContainerAnyShapeType/CS/RebarContainerAnyShapeType.csproj +++ b/SDK/Samples/RebarContainerAnyShapeType/CS/RebarContainerAnyShapeType.csproj @@ -1,123 +1,16 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {BC7C97A7-C5EA-443C-9545-4B845038C09E} - Library - Properties - RebarContainerAnyShapeType - RebarContainerAnyShapeType - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - BeamFramReinMakerForm.cs - - - - - Form - - - ColumnFramReinMakerForm.cs - - - - - - - - - - - - - - Designer - BeamFramReinMakerForm.cs - - - Designer - ColumnFramReinMakerForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/RebarFreeForm/CS/Command.cs b/SDK/Samples/RebarFreeForm/CS/Command.cs index 76a8b294..608357eb 100644 --- a/SDK/Samples/RebarFreeForm/CS/Command.cs +++ b/SDK/Samples/RebarFreeForm/CS/Command.cs @@ -128,7 +128,7 @@ namespace Revit.SDK.Samples.RebarFreeForm.CS List refs = new List(); refs.Add(reference); RebarConstraint constraint = RebarConstraint.Create(handle, refs, true, 0.0); - rManager.SetPreferredConstraintForHandle(handle, constraint); + rManager.SetPreferredConstraint(constraint); } catch (Exception e) { diff --git a/SDK/Samples/RebarFreeForm/CS/Properties/AssemblyInfo.cs b/SDK/Samples/RebarFreeForm/CS/Properties/AssemblyInfo.cs index f1e8f04c..9427cb40 100644 --- a/SDK/Samples/RebarFreeForm/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/RebarFreeForm/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/RebarFreeForm/CS/RebarFreeForm.csproj b/SDK/Samples/RebarFreeForm/CS/RebarFreeForm.csproj index 1892cc47..9f3e07a0 100644 --- a/SDK/Samples/RebarFreeForm/CS/RebarFreeForm.csproj +++ b/SDK/Samples/RebarFreeForm/CS/RebarFreeForm.csproj @@ -1,78 +1,11 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {08C2DFB2-27F1-4A40-BE07-488441934FE7} - Library - Properties Revit.SDK.Samples.RebarFreeForm.CS - RebarFreeForm - - - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\RebarFreeForm.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - OnOutputUpdated - - - - - - - - - - 4.5.2 - - - - - - - - - - - - + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/ReferencePlane/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ReferencePlane/CS/Properties/AssemblyInfo.cs index 1524f078..b6ca6e01 100644 --- a/SDK/Samples/ReferencePlane/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ReferencePlane/CS/Properties/AssemblyInfo.cs @@ -54,3 +54,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ReferencePlane/CS/ReferencePlane.csproj b/SDK/Samples/ReferencePlane/CS/ReferencePlane.csproj index 06346fd5..aabe605b 100644 --- a/SDK/Samples/ReferencePlane/CS/ReferencePlane.csproj +++ b/SDK/Samples/ReferencePlane/CS/ReferencePlane.csproj @@ -1,102 +1,14 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {1B954375-6B21-48A9-B301-38BAE35673AD} - Library - Properties Revit.SDK.Samples.ReferencePlane.CS - ReferencePlane - - - - - - - - - v4.8 - - - - true - full - false - bin\debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - Form - - - ReferencePlaneForm.cs - - - - - - Designer - ReferencePlaneForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Reinforcement/CS/BeamFramReinMakerForm.cs b/SDK/Samples/Reinforcement/CS/BeamFramReinMakerForm.cs index f3e92069..1becd88d 100644 --- a/SDK/Samples/Reinforcement/CS/BeamFramReinMakerForm.cs +++ b/SDK/Samples/Reinforcement/CS/BeamFramReinMakerForm.cs @@ -32,6 +32,7 @@ using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Reinforcement.CS { diff --git a/SDK/Samples/Reinforcement/CS/ColumnFramReinMakerForm.cs b/SDK/Samples/Reinforcement/CS/ColumnFramReinMakerForm.cs index ce422af4..ed7ee4f5 100644 --- a/SDK/Samples/Reinforcement/CS/ColumnFramReinMakerForm.cs +++ b/SDK/Samples/Reinforcement/CS/ColumnFramReinMakerForm.cs @@ -32,6 +32,7 @@ using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Reinforcement.CS { diff --git a/SDK/Samples/Reinforcement/CS/FramReinMaker.cs b/SDK/Samples/Reinforcement/CS/FramReinMaker.cs index 9fb5410f..92751131 100644 --- a/SDK/Samples/Reinforcement/CS/FramReinMaker.cs +++ b/SDK/Samples/Reinforcement/CS/FramReinMaker.cs @@ -96,12 +96,12 @@ namespace Revit.SDK.Samples.Reinforcement.CS } } - /// - /// Implement the Run() method of IFrameReinMaker interface. - /// Give the flew process of the reinforcement creation. - /// - /// - bool IFrameReinMaker.Run() + /// + /// Implement the Run() method of IFrameReinMaker interface. + /// Give the flew process of the reinforcement creation. + /// + /// + public bool Run() { // First, check the data whether is right and enough. if (!AssertData()) diff --git a/SDK/Samples/Reinforcement/CS/GeomData.cs b/SDK/Samples/Reinforcement/CS/GeomData.cs index 636208ce..fb2b20cd 100644 --- a/SDK/Samples/Reinforcement/CS/GeomData.cs +++ b/SDK/Samples/Reinforcement/CS/GeomData.cs @@ -259,7 +259,7 @@ namespace Revit.SDK.Samples.Reinforcement.CS /// public class XYZHeightComparer : IComparer { - int IComparer.Compare(Autodesk.Revit.DB.XYZ first, Autodesk.Revit.DB.XYZ second) + public int Compare(Autodesk.Revit.DB.XYZ first, Autodesk.Revit.DB.XYZ second) { // first compare z coordinate, then y coordinate, at last x coordinate if (GeomUtil.IsEqual(first.Z, second.Z)) diff --git a/SDK/Samples/Reinforcement/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Reinforcement/CS/Properties/AssemblyInfo.cs index 289272a1..76acc3ec 100644 --- a/SDK/Samples/Reinforcement/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Reinforcement/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/Reinforcement/CS/Reinforcement.csproj b/SDK/Samples/Reinforcement/CS/Reinforcement.csproj index ae319ea3..e5380878 100644 --- a/SDK/Samples/Reinforcement/CS/Reinforcement.csproj +++ b/SDK/Samples/Reinforcement/CS/Reinforcement.csproj @@ -1,121 +1,14 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {E1DA0A90-58B2-4032-B443-F8C397CE3B49} - Library - Properties - Reinforcement - Reinforcement - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - BeamFramReinMakerForm.cs - - - - - Form - - - ColumnFramReinMakerForm.cs - - - - - - - - - - - - - - Designer - BeamFramReinMakerForm.cs - - - Designer - ColumnFramReinMakerForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/RevitCommands/VB.NET/LibraryPath.vb b/SDK/Samples/RevitCommands/VB.NET/LibraryPath.vb index 12e861f5..b1356020 100644 --- a/SDK/Samples/RevitCommands/VB.NET/LibraryPath.vb +++ b/SDK/Samples/RevitCommands/VB.NET/LibraryPath.vb @@ -83,8 +83,7 @@ Public Class RvtCmd_LibraryPaths ' Library Paths Loop ' show it. - MsgBox(str) - + Autodesk.Revit.UI.TaskDialog.Show("Revit", str) ' do we have lib path with this key? If (paths.ContainsKey(key)) Then @@ -106,9 +105,9 @@ Public Class RvtCmd_LibraryPaths ' Library Paths Do While (iter.MoveNext()) str += iter.Current.Key + " = " + iter.Current.Value + vbCr Loop - MsgBox(str + vbCr + comment) + Autodesk.Revit.UI.TaskDialog.Show("Revit", str + vbCr + comment) - Return Autodesk.Revit.UI.Result.Succeeded + Return Autodesk.Revit.UI.Result.Succeeded End Function diff --git a/SDK/Samples/RevitCommands/VB.NET/LoadFamily.vb b/SDK/Samples/RevitCommands/VB.NET/LoadFamily.vb index 600c7e4a..cf8467da 100644 --- a/SDK/Samples/RevitCommands/VB.NET/LoadFamily.vb +++ b/SDK/Samples/RevitCommands/VB.NET/LoadFamily.vb @@ -83,14 +83,14 @@ Public Class RvtCmd_LoadFamilySymbol Dim loadSuccess As Boolean = revitDoc.LoadFamilySymbol(fileName, symName) transaction.Commit() If (loadSuccess) Then - MsgBox("Family " & fileName & ", Type " & symName & " successfully loaded!") + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Family " & fileName & ", Type " & symName & " successfully loaded!") Return Autodesk.Revit.UI.Result.Succeeded End If Catch ex As Exception transaction.RollBack() End Try - MsgBox("ERROR in loading Family " & fileName & ", Type " & symName) + Autodesk.Revit.UI.TaskDialog.Show("Revit", "ERROR in loading Family " & fileName & ", Type " & symName) Return Autodesk.Revit.UI.Result.Failed End Function @@ -143,14 +143,14 @@ Public Class RvtCmd_LoadFamily Dim loadSuccess As Boolean = revitDoc.LoadFamily(fullPath) transaction.Commit() If (loadSuccess) Then - MsgBox("Loaded a family ok.") + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Loaded a family ok.") Return Autodesk.Revit.UI.Result.Succeeded End If Catch ex As Exception transaction.RollBack() End Try - MsgBox("Failed to load a family.") + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Failed to load a family.") 'Return Autodesk.Revit.UI.Result.Failed ' bug in Revit 8.0 Return Autodesk.Revit.UI.Result.Succeeded @@ -192,7 +192,7 @@ Public Class RvtCmd_LoadFamily ' search this directory Dim fname As String For Each fname In Directory.GetFiles(path, fileName) - MsgBox("I found the file in: " + fname) + Autodesk.Revit.UI.TaskDialog.Show("Revit", "I found the file in: " + fname) Return path Next diff --git a/SDK/Samples/RevitCommands/VB.NET/RevitCommands.vbproj b/SDK/Samples/RevitCommands/VB.NET/RevitCommands.vbproj index 0f9e0941..7526cb2b 100644 --- a/SDK/Samples/RevitCommands/VB.NET/RevitCommands.vbproj +++ b/SDK/Samples/RevitCommands/VB.NET/RevitCommands.vbproj @@ -1,147 +1,21 @@ - - + Local - 9.0.30729 - 2.0 - {73C4CC97-C4BE-453E-92CA-CA3D3F2F5285} - Debug - AnyCPU - - - - - RevitCommands - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.RevitCommands.VB.NET RevitCommands.%28なし%29 - - Windows - - - 2.0 - v4.8 - - - - bin\ - - 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false - - bin\ - - - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - - - Code - - - Code - - - Code - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/RevitCommands/VB.NET/RvtUtils.vb b/SDK/Samples/RevitCommands/VB.NET/RvtUtils.vb index 8a19470b..9ba7dce8 100644 --- a/SDK/Samples/RevitCommands/VB.NET/RvtUtils.vb +++ b/SDK/Samples/RevitCommands/VB.NET/RvtUtils.vb @@ -55,7 +55,7 @@ Public Class RvtUtils str = str + ParameterSetToString(elem.Document, params) ' show it - MsgBox(str) + Autodesk.Revit.UI.TaskDialog.Show("Revit", str) End Sub @@ -86,7 +86,7 @@ Public Class RvtUtils End If ' show it. - MsgBox(str) + Autodesk.Revit.UI.TaskDialog.Show("Revit", str) End Sub @@ -176,13 +176,13 @@ Public Class RvtUtils ' does the element have geometry data? Dim geomElem As Autodesk.Revit.DB.GeometryElement = elem.Geometry(opt) If geomElem Is Nothing Then - MsgBox(str & "no data") + Autodesk.Revit.UI.TaskDialog.Show("Revit", str & "no data") Return End If str = GeometryElementToString(geomElem) - MsgBox(str) + Autodesk.Revit.UI.TaskDialog.Show("Revit", str) End Sub @@ -343,7 +343,7 @@ Public Class RvtUtils ' do we have a location data? Dim loc As Location = elem.Location If (loc Is Nothing) Then - MsgBox(str & "no data") + Autodesk.Revit.UI.TaskDialog.Show("Revit", str & "no data") Return End If @@ -369,7 +369,7 @@ Public Class RvtUtils End If ' show it. - MsgBox(str) + Autodesk.Revit.UI.TaskDialog.Show("Revit", str) End Sub diff --git a/SDK/Samples/RevitCommands/VB.NET/Selection.vb b/SDK/Samples/RevitCommands/VB.NET/Selection.vb index 5dbc67a2..07682333 100644 --- a/SDK/Samples/RevitCommands/VB.NET/Selection.vb +++ b/SDK/Samples/RevitCommands/VB.NET/Selection.vb @@ -76,10 +76,10 @@ Public Class RvtCmd_Selection ' how many did you get? ' If selSet.IsEmpty Then - MsgBox("Nothing selected - exiting command!") + Autodesk.Revit.UI.TaskDialog.Show("Revit", "Nothing selected - exiting command!") Return Autodesk.Revit.UI.Result.Failed End If - MsgBox("The number of selected elements = " & selSet.Size & vbCrLf) + Autodesk.Revit.UI.TaskDialog.Show("Revit", "The number of selected elements = " & selSet.Size & vbCrLf) ' look at each of them. Dim str As String = "" @@ -98,7 +98,7 @@ Public Class RvtCmd_Selection " Cat=" & catName & " Type=" & elem.Name & vbCrLf Next - MsgBox(str) + Autodesk.Revit.UI.TaskDialog.Show("Revit", str) Return Autodesk.Revit.UI.Result.Succeeded diff --git a/SDK/Samples/RevitCommands/VB.NET/ShowElementData.vb b/SDK/Samples/RevitCommands/VB.NET/ShowElementData.vb index e1e78f4c..bfaa7dc0 100644 --- a/SDK/Samples/RevitCommands/VB.NET/ShowElementData.vb +++ b/SDK/Samples/RevitCommands/VB.NET/ShowElementData.vb @@ -70,14 +70,14 @@ Public Class RvtCmd_ShowElementData Next ' how many did you get? - MsgBox("The number of selected elements:" & selSet.Size) + Autodesk.Revit.UI.TaskDialog.Show("Revit", "The number of selected elements:" & selSet.Size) ' look at each of them. Dim elem As Autodesk.Revit.DB.Element For Each elem In selSet ' show the type. - MsgBox(elem.GetType.ToString) + Autodesk.Revit.UI.TaskDialog.Show("Revit", elem.GetType.ToString) ' location RvtUtils.ListLocation(elem) diff --git a/SDK/Samples/Ribbon/CS/Ribbon.cs b/SDK/Samples/Ribbon/CS/Ribbon.cs index cb58bc8e..af2d1d32 100644 --- a/SDK/Samples/Ribbon/CS/Ribbon.cs +++ b/SDK/Samples/Ribbon/CS/Ribbon.cs @@ -33,6 +33,7 @@ using Autodesk.Revit.UI; using Autodesk.Revit.DB; using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.UI.Events; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Ribbon.CS { diff --git a/SDK/Samples/Ribbon/CS/Ribbon.csproj b/SDK/Samples/Ribbon/CS/Ribbon.csproj index 3b09eee3..c298be63 100644 --- a/SDK/Samples/Ribbon/CS/Ribbon.csproj +++ b/SDK/Samples/Ribbon/CS/Ribbon.csproj @@ -1,97 +1,20 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {4E18C36C-1D14-4DF2-B68E-E7D46D425A8B} - Library - Properties Revit - Ribbon - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - 3.0 - - - - 3.5 - - - - 3.5 - - - - 3.5 - - - 3.5 - - - - - 3.0 - + - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/RoofsRooms/CS/RoofsRooms.csproj b/SDK/Samples/RoofsRooms/CS/RoofsRooms.csproj index 5db38cb9..3987392c 100644 --- a/SDK/Samples/RoofsRooms/CS/RoofsRooms.csproj +++ b/SDK/Samples/RoofsRooms/CS/RoofsRooms.csproj @@ -1,83 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {B43AE59E-2E7B-48B9-B1B3-EE4412BF0198} - Library - Properties Revit.SDK.Samples.RoofsRooms.CS - RoofsRooms - v4.8 - - - - true - full - false - bin\debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/RoomSchedule/CS/Properties/AssemblyInfo.cs b/SDK/Samples/RoomSchedule/CS/Properties/AssemblyInfo.cs index 1ec25b84..8f791665 100644 --- a/SDK/Samples/RoomSchedule/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/RoomSchedule/CS/Properties/AssemblyInfo.cs @@ -31,3 +31,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/RoomSchedule/CS/RoomSchedule.csproj b/SDK/Samples/RoomSchedule/CS/RoomSchedule.csproj index f97c9fa5..843ac61d 100644 --- a/SDK/Samples/RoomSchedule/CS/RoomSchedule.csproj +++ b/SDK/Samples/RoomSchedule/CS/RoomSchedule.csproj @@ -1,97 +1,14 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {CAB59A7F-7317-4E91-B3DE-BA016E38C01A} - Library - Properties Revit.SDK.Samples.RoomSchedule - RoomSchedule - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - Form - - - RoomScheduleForm.cs - - - - - RoomScheduleForm.cs - Designer - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" @@ -99,4 +16,7 @@ if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" " None + + + \ No newline at end of file diff --git a/SDK/Samples/RoomSchedule/CS/RoomScheduleForm.cs b/SDK/Samples/RoomSchedule/CS/RoomScheduleForm.cs index df7eaf32..27cd9243 100644 --- a/SDK/Samples/RoomSchedule/CS/RoomScheduleForm.cs +++ b/SDK/Samples/RoomSchedule/CS/RoomScheduleForm.cs @@ -33,6 +33,7 @@ using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Architecture; using Autodesk.Revit.DB.Events; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.RoomSchedule { diff --git a/SDK/Samples/Rooms/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Rooms/CS/Properties/AssemblyInfo.cs index 5b464ee4..ae8c23b6 100644 --- a/SDK/Samples/Rooms/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Rooms/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/Rooms/CS/Rooms.csproj b/SDK/Samples/Rooms/CS/Rooms.csproj index f058f40f..e7a9ea1e 100644 --- a/SDK/Samples/Rooms/CS/Rooms.csproj +++ b/SDK/Samples/Rooms/CS/Rooms.csproj @@ -1,103 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {F9BA220D-5F61-4AF8-9DB4-4BC08463B1AB} - Library - Properties Revit.SDK.Samples.Rooms.CS - Rooms - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 -Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900 - prompt - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - Form - - - RoomInfoForm.cs - - - - - - - - Designer - RoomInfoForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Rooms/CS/RoomsData.cs b/SDK/Samples/Rooms/CS/RoomsData.cs index 34112e8e..e373d55d 100644 --- a/SDK/Samples/Rooms/CS/RoomsData.cs +++ b/SDK/Samples/Rooms/CS/RoomsData.cs @@ -32,6 +32,7 @@ using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Architecture; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Rooms.CS { diff --git a/SDK/Samples/RotateFramingObjects/CS/AssemblyInfo.cs b/SDK/Samples/RotateFramingObjects/CS/AssemblyInfo.cs index b93a70f6..19927f61 100644 --- a/SDK/Samples/RotateFramingObjects/CS/AssemblyInfo.cs +++ b/SDK/Samples/RotateFramingObjects/CS/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -34,7 +34,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -79,3 +79,4 @@ using System.Runtime.CompilerServices; [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] +[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjects.cs b/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjects.cs index 7c59a22d..20aaf8fc 100644 --- a/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjects.cs +++ b/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjects.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -29,6 +29,8 @@ using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.RotateFramingObjects.CS { diff --git a/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjects.csproj b/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjects.csproj index 1a7615ab..7d9e44f2 100644 --- a/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjects.csproj +++ b/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjects.csproj @@ -1,188 +1,27 @@ - - + Local - 9.0.30729 - 2.0 - {48A33B6D-7E0A-4F17-9E8F-47A85E87B532} - Debug - AnyCPU - - - - - RotateFramingObjects - - JScript Grid IE50 false - Library - RotateFramingObjects - OnBuildSuccess - - - - - - - 2.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - true - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - true - 4 - none - prompt + + false + - true - bin\x64\Debug\ - DEBUG;TRACE 285212672 4096 - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE 285212672 - true true 4096 - x64 - prompt MinimumRecommendedRules.ruleset + - OnOutputUpdated - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - Code - - - Code - - - Form - - - RotateFramingObjectsForm.cs - Designer - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjectsForm.Designer.cs b/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjectsForm.Designer.cs new file mode 100644 index 00000000..afe798e0 --- /dev/null +++ b/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjectsForm.Designer.cs @@ -0,0 +1,124 @@ +namespace Revit.SDK.Samples.RotateFramingObjects.CS +{ + public partial class RotateFramingObjectsForm + { + private System.ComponentModel.Container m_components = null; + + private System.Windows.Forms.Button cancelButton; + private System.Windows.Forms.Button okButton; + public System.Windows.Forms.RadioButton absoluteRadio; + private System.Windows.Forms.RadioButton relativeRadio; + private System.Windows.Forms.Label rotationLabel; + public System.Windows.Forms.TextBox rotationTextBox; + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (m_components != null) + { + m_components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.absoluteRadio = new System.Windows.Forms.RadioButton(); + this.relativeRadio = new System.Windows.Forms.RadioButton(); + this.cancelButton = new System.Windows.Forms.Button(); + this.okButton = new System.Windows.Forms.Button(); + this.rotationLabel = new System.Windows.Forms.Label(); + this.rotationTextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // absoluteRadio + // + this.absoluteRadio.Location = new System.Drawing.Point(85, 35); + this.absoluteRadio.Name = "absoluteRadio"; + this.absoluteRadio.Size = new System.Drawing.Size(72, 24); + this.absoluteRadio.TabIndex = 0; + this.absoluteRadio.Text = "Absolute"; + this.absoluteRadio.CheckedChanged += new System.EventHandler(this.allRadio_CheckedChanged); + // + // relativeRadio + // + this.relativeRadio.Checked = true; + this.relativeRadio.Location = new System.Drawing.Point(15, 35); + this.relativeRadio.Name = "relativeRadio"; + this.relativeRadio.Size = new System.Drawing.Size(64, 24); + this.relativeRadio.TabIndex = 1; + this.relativeRadio.TabStop = true; + this.relativeRadio.Text = "Relative"; + this.relativeRadio.CheckedChanged += new System.EventHandler(this.singleRadio_CheckedChanged); + // + // cancelButton + // + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(93, 65); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(75, 23); + this.cancelButton.TabIndex = 6; + this.cancelButton.Text = "&Cancel"; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // okButton + // + this.okButton.Location = new System.Drawing.Point(15, 65); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 8; + this.okButton.Text = "&OK"; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // rotationLabel + // + this.rotationLabel.Location = new System.Drawing.Point(12, 12); + this.rotationLabel.Name = "rotationLabel"; + this.rotationLabel.Size = new System.Drawing.Size(50, 16); + this.rotationLabel.TabIndex = 10; + this.rotationLabel.Text = "Rotation"; + // + // rotationTextBox + // + this.rotationTextBox.Location = new System.Drawing.Point(68, 9); + this.rotationTextBox.Name = "rotationTextBox"; + this.rotationTextBox.Size = new System.Drawing.Size(100, 20); + this.rotationTextBox.TabIndex = 1; + this.rotationTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.rotationTextBox_KeyPress); + this.rotationTextBox.TextChanged += new System.EventHandler(this.rotationTextBox_TextChanged); + // + // RotateFramingObjectsForm + // + this.AcceptButton = this.okButton; + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.CancelButton = this.cancelButton; + this.ClientSize = new System.Drawing.Size(185, 101); + this.Controls.Add(this.rotationTextBox); + this.Controls.Add(this.relativeRadio); + this.Controls.Add(this.rotationLabel); + this.Controls.Add(this.okButton); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.absoluteRadio); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "RotateFramingObjectsForm"; + this.ShowInTaskbar = false; + this.Text = "Rotate Framing Objects"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + #endregion + } +} diff --git a/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjectsForm.cs b/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjectsForm.cs index 6b763fca..5510c2f6 100644 --- a/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjectsForm.cs +++ b/SDK/Samples/RotateFramingObjects/CS/RotateFramingObjectsForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -22,34 +22,19 @@ using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; using System.Windows.Forms; -using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.RotateFramingObjects.CS { /// /// Summary description for PutDialog. /// - public class RotateFramingObjectsForm : System.Windows.Forms.Form + public partial class RotateFramingObjectsForm : System.Windows.Forms.Form { - private RotateFramingObjects m_instance; - private System.ComponentModel.Container m_components = null; - private System.Windows.Forms.Button cancelButton; - private System.Windows.Forms.Button okButton; - public System.Windows.Forms.RadioButton absoluteRadio; - private System.Windows.Forms.RadioButton relativeRadio; - private System.Windows.Forms.Label rotationLabel; - public System.Windows.Forms.TextBox rotationTextBox; private bool m_isReset; - - /// - /// - /// public bool IsReset { get @@ -78,116 +63,6 @@ namespace Revit.SDK.Samples.RotateFramingObjects.CS //this.rotationTextBox.Text = "Value"; } - /// - /// Clean up any resources being used. - /// - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if(m_components != null) - { - m_components.Dispose(); - } - } - base.Dispose( disposing ); - } - - #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.absoluteRadio = new System.Windows.Forms.RadioButton(); - this.relativeRadio = new System.Windows.Forms.RadioButton(); - this.cancelButton = new System.Windows.Forms.Button(); - this.okButton = new System.Windows.Forms.Button(); - this.rotationLabel = new System.Windows.Forms.Label(); - this.rotationTextBox = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // absoluteRadio - // - this.absoluteRadio.Location = new System.Drawing.Point(85, 35); - this.absoluteRadio.Name = "absoluteRadio"; - this.absoluteRadio.Size = new System.Drawing.Size(72, 24); - this.absoluteRadio.TabIndex = 0; - this.absoluteRadio.Text = "Absolute"; - this.absoluteRadio.CheckedChanged += new System.EventHandler(this.allRadio_CheckedChanged); - // - // relativeRadio - // - this.relativeRadio.Checked = true; - this.relativeRadio.Location = new System.Drawing.Point(15, 35); - this.relativeRadio.Name = "relativeRadio"; - this.relativeRadio.Size = new System.Drawing.Size(64, 24); - this.relativeRadio.TabIndex = 1; - this.relativeRadio.TabStop = true; - this.relativeRadio.Text = "Relative"; - this.relativeRadio.CheckedChanged += new System.EventHandler(this.singleRadio_CheckedChanged); - // - // cancelButton - // - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(93, 65); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(75, 23); - this.cancelButton.TabIndex = 6; - this.cancelButton.Text = "&Cancel"; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // okButton - // - this.okButton.Location = new System.Drawing.Point(15, 65); - this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(75, 23); - this.okButton.TabIndex = 8; - this.okButton.Text = "&OK"; - this.okButton.Click += new System.EventHandler(this.okButton_Click); - // - // rotationLabel - // - this.rotationLabel.Location = new System.Drawing.Point(12, 12); - this.rotationLabel.Name = "rotationLabel"; - this.rotationLabel.Size = new System.Drawing.Size(50, 16); - this.rotationLabel.TabIndex = 10; - this.rotationLabel.Text = "Rotation"; - // - // rotationTextBox - // - this.rotationTextBox.Location = new System.Drawing.Point(68, 9); - this.rotationTextBox.Name = "rotationTextBox"; - this.rotationTextBox.Size = new System.Drawing.Size(100, 20); - this.rotationTextBox.TabIndex = 1; - this.rotationTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.rotationTextBox_KeyPress); - this.rotationTextBox.TextChanged += new System.EventHandler(this.rotationTextBox_TextChanged); - // - // RotateFramingObjectsForm - // - this.AcceptButton = this.okButton; - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.CancelButton = this.cancelButton; - this.ClientSize = new System.Drawing.Size(185, 101); - this.Controls.Add(this.rotationTextBox); - this.Controls.Add(this.relativeRadio); - this.Controls.Add(this.rotationLabel); - this.Controls.Add(this.okButton); - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.absoluteRadio); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "RotateFramingObjectsForm"; - this.ShowInTaskbar = false; - this.Text = "Rotate Framing Objects"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - #endregion - private void okButton_Click(object sender, System.EventArgs e) { if(IsReset) @@ -204,8 +79,8 @@ namespace Revit.SDK.Samples.RotateFramingObjects.CS { this.DialogResult=DialogResult.Cancel; this.Close(); - } + private void singleRadio_CheckedChanged(object sender, System.EventArgs e) { m_isReset = true; @@ -234,11 +109,11 @@ namespace Revit.SDK.Samples.RotateFramingObjects.CS } } - else + else { m_instance.ReceiveRotationTextBox = 0; } - m_isReset = true; + m_isReset = true; } private void rotationTextBox_KeyPress(object sender, KeyPressEventArgs e) diff --git a/SDK/Samples/RotateFramingObjects/VB.NET/AssemblyInfo.vb b/SDK/Samples/RotateFramingObjects/VB.NET/AssemblyInfo.vb index be965ac8..0ee0f250 100644 --- a/SDK/Samples/RotateFramingObjects/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/RotateFramingObjects/VB.NET/AssemblyInfo.vb @@ -52,4 +52,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/RotateFramingObjects/VB.NET/RotateFramingObjects.vb b/SDK/Samples/RotateFramingObjects/VB.NET/RotateFramingObjects.vb index 91c1eac9..09ae7b2d 100644 --- a/SDK/Samples/RotateFramingObjects/VB.NET/RotateFramingObjects.vb +++ b/SDK/Samples/RotateFramingObjects/VB.NET/RotateFramingObjects.vb @@ -241,8 +241,8 @@ Public Class RotateFramingObjects End If Dim rotateResult As Integer = pointLocation.Rotate(rotateAxis, rotateDegree) If 0 = rotateResult Then - TaskDialog.Show("Revit", "Rotate Failed") - End If + UI.TaskDialog.Show("Revit", "Rotate Failed") + End If End If End If Next @@ -250,8 +250,8 @@ Public Class RotateFramingObjects transaction.Commit() Catch ex As Exception - TaskDialog.Show("Revit", ("Rotate failed! " & ex.Message)) - transaction.RollBack() + UI.TaskDialog.Show("Revit", ("Rotate failed! " & ex.Message)) + transaction.RollBack() End Try End Sub diff --git a/SDK/Samples/RotateFramingObjects/VB.NET/RotateFramingObjects.vbproj b/SDK/Samples/RotateFramingObjects/VB.NET/RotateFramingObjects.vbproj index 2f90c87b..e4b8b924 100644 --- a/SDK/Samples/RotateFramingObjects/VB.NET/RotateFramingObjects.vbproj +++ b/SDK/Samples/RotateFramingObjects/VB.NET/RotateFramingObjects.vbproj @@ -1,151 +1,24 @@ - - + Local - 9.0.30729 - 2.0 - {1823B4FE-46DE-4CB1-A310-DED7B854F087} - Debug - AnyCPU - - - - - RotateFramingObjects - - None JScript Grid IE50 false Library - Binary - On - Off Revit.SDK.Samples.RotateFramingObjects.VB.NET Revit.SDK.Samples.RotateFramingObjects.VB.NET.%28None%29 - - Windows - - - 2.0 - v4.8 - - - - bin\Debug\ - RotateFramingObjects.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false + true + true - - bin\ - RotateFramingObjects.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - RotateFramingObjects.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - RotateFramingObjects.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - Form - - - RotateFramingObjectsForm.vb - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/RoutingPreferenceTools/CS/Properties/AssemblyInfo.cs b/SDK/Samples/RoutingPreferenceTools/CS/Properties/AssemblyInfo.cs index 47df9920..de4258cf 100644 --- a/SDK/Samples/RoutingPreferenceTools/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/RoutingPreferenceTools/CS/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("RoutingPreferenceTools")] -[assembly: AssemblyCopyright("Copyright © Autodesk 2011")] +[assembly: AssemblyCopyright("Copyright © Autodesk 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceBuilder/RoutingPreferenceBuilder.cs b/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceBuilder/RoutingPreferenceBuilder.cs index 41815456..93d0e0ac 100644 --- a/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceBuilder/RoutingPreferenceBuilder.cs +++ b/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceBuilder/RoutingPreferenceBuilder.cs @@ -96,10 +96,10 @@ namespace Revit.SDK.Samples.RoutingPreferenceTools.CS { ParseFamilyFromXml(xfamily, findFolderUtility); //Load families. } - catch (Exception ex) + catch (Exception) { loadFamilies.RollBack(); - throw ex; + throw; } loadFamilies.Commit(); @@ -111,10 +111,10 @@ namespace Revit.SDK.Samples.RoutingPreferenceTools.CS { ParsePipeTypeFromXml(xpipeType); //Define new pipe types. } - catch (Exception ex) + catch (Exception) { addPipeTypes.RollBack(); - throw ex; + throw; } addPipeTypes.Commit(); @@ -126,10 +126,10 @@ namespace Revit.SDK.Samples.RoutingPreferenceTools.CS { ParsePipeScheduleTypeFromXml(xpipeScheduleType); //Define new pipe schedule types. } - catch (Exception ex) + catch (Exception) { addPipeSchedules.RollBack(); - throw ex; + throw; } addPipeSchedules.Commit(); @@ -146,10 +146,10 @@ namespace Revit.SDK.Samples.RoutingPreferenceTools.CS { ParsePipeSegmentFromXML(xpipeSegment); } - catch (Exception ex) + catch (Exception) { addPipeSchedules.RollBack(); - throw ex; + throw; } addPipeSchedules.Commit(); @@ -165,10 +165,10 @@ namespace Revit.SDK.Samples.RoutingPreferenceTools.CS { ParseRoutingPreferenceManagerFromXML(xroutingPreferenceManager); } - catch (Exception ex) + catch (Exception) { addRoutingPreferences.RollBack(); - throw ex; + throw; } addRoutingPreferences.Commit(); diff --git a/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceBuilder/RoutingPreferenceBuilderUtility.cs b/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceBuilder/RoutingPreferenceBuilderUtility.cs index 9f523697..79f6573a 100644 --- a/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceBuilder/RoutingPreferenceBuilderUtility.cs +++ b/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceBuilder/RoutingPreferenceBuilderUtility.cs @@ -239,11 +239,11 @@ namespace Revit.SDK.Samples.RoutingPreferenceTools.CS } catch (Exception) { - throw new Exception("Could not find embedded xml RotingPreferenceBuilder schema resource."); + throw new Exception("Could not find embedded xml RoutingPreferenceBuilder schema resource."); } if (schemaStream == null) { - throw new Exception("Could not find embedded xml RotingPreferenceBuilder schema resource."); + throw new Exception("Could not find embedded xml RoutingPreferenceBuilder schema resource."); } System.IO.StreamReader stReader = new StreamReader(schemaStream); return stReader.ReadToEnd(); diff --git a/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceTools.addin b/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceTools.addin index f74f7437..1ca7275e 100644 --- a/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceTools.addin +++ b/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceTools.addin @@ -2,7 +2,7 @@ RoutingPreferenceTools.Analyzer - D:\Revit\dev-0\ThirdParty\InstallerExtra\RevitSDK\Software Development Kit\Samples\RoutingPreferenceTools\CS\bin\Debug\RoutingPreferenceTools.dll + RoutingPreferenceTools.dll E6976BBA-FA1E-4F56-A178-A248B9AA9F81 Revit.SDK.Samples.RoutingPreferenceTools.CS.Command ADSK @@ -11,7 +11,7 @@ RoutingPreferenceTools.Builder.CommandReadPreferences - D:\Revit\dev-0\ThirdParty\InstallerExtra\RevitSDK\Software Development Kit\Samples\RoutingPreferenceTools\CS\bin\Debug\RoutingPreferenceTools.dll + RoutingPreferenceTools.dll E6976BBA-FA1E-4F56-A178-A248B9AA9F82 Revit.SDK.Samples.RoutingPreferenceTools.CS.CommandReadPreferences ADSK @@ -20,7 +20,7 @@ RoutingPreferenceTools.Builder.CommandWritePreferences - D:\Revit\dev-0\ThirdParty\InstallerExtra\RevitSDK\Software Development Kit\Samples\RoutingPreferenceTools\CS\bin\Debug\RoutingPreferenceTools.dll + RoutingPreferenceTools.dll E6976BBA-FA1E-4F56-A178-A248B9AA9F83 Revit.SDK.Samples.RoutingPreferenceTools.CS.CommandWritePreferences ADSK diff --git a/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceTools.csproj b/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceTools.csproj index 5ef6da1b..8eb5455f 100644 --- a/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceTools.csproj +++ b/SDK/Samples/RoutingPreferenceTools/CS/RoutingPreferenceTools.csproj @@ -1,43 +1,13 @@ - - + + - Debug - AnyCPU - 8.0.30703 + true 2.0 - {7C33A55E-6044-48EE-A598-C4580D7C5DD3} - Library - Properties Revit.SDK.Samples.RoutingPreferenceTools.CS - RoutingPreferenceTools - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\RoutingPreferenceTools.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true true bin\x64\Debug\ - DEBUG;TRACE bin\Debug\RoutingPreferenceTools.xml true full @@ -47,7 +17,6 @@ bin\x64\Release\ - TRACE true true pdbonly @@ -55,72 +24,16 @@ prompt MinimumRecommendedRules.ruleset + + + + + + + OnOutputUpdated - - OnOutputUpdated - - - - - - True - - - True - - - - True - - - True - - - True - - - True - - - True - - - - - - - - - MainWindow.xaml - - - - - - - - - - - MSBuild:Compile - Designer - - - - - Designer - - - - None diff --git a/SDK/Samples/RvtSamples/CS/Application.cs b/SDK/Samples/RvtSamples/CS/Application.cs index 9e824722..be24bc95 100644 --- a/SDK/Samples/RvtSamples/CS/Application.cs +++ b/SDK/Samples/RvtSamples/CS/Application.cs @@ -32,6 +32,7 @@ using System.Windows.Media.Imaging; using Autodesk.Revit; using Autodesk.Revit.UI; using Autodesk.Revit.ApplicationServices; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace RvtSamples { diff --git a/SDK/Samples/RvtSamples/CS/RvtSamples.addin b/SDK/Samples/RvtSamples/CS/RvtSamples.addin index d2bbf6db..eaa8579c 100644 --- a/SDK/Samples/RvtSamples/CS/RvtSamples.addin +++ b/SDK/Samples/RvtSamples/CS/RvtSamples.addin @@ -1,11 +1,11 @@  - RvtSamples - Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RvtSamples\CS\bin\Debug\RvtSamples.dll + External Tool + RvtSamples.dll 42cb0a70-2ee7-4e64-a42d-87b9cdcc41c8 RvtSamples.Application ADSK Autodesk, www.autodesk.com - + \ No newline at end of file diff --git a/SDK/Samples/RvtSamples/CS/RvtSamples.csproj b/SDK/Samples/RvtSamples/CS/RvtSamples.csproj index 103e47e8..17e67808 100644 --- a/SDK/Samples/RvtSamples/CS/RvtSamples.csproj +++ b/SDK/Samples/RvtSamples/CS/RvtSamples.csproj @@ -1,91 +1,15 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {61CD7BAA-7E72-4239-B3DC-616123EACE15} - Library - Properties - RvtSamples - RvtSamples - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - True - True - Resource.resx - - - - - - Designer - ResXFileCodeGenerator - Resource.Designer.cs - - - PreserveNewest @@ -136,14 +60,7 @@ PreserveNewest - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/RvtSamples/CS/RvtSamples.txt b/SDK/Samples/RvtSamples/CS/RvtSamples.txt index 76bd2d7d..831df068 100644 --- a/SDK/Samples/RvtSamples/CS/RvtSamples.txt +++ b/SDK/Samples/RvtSamples/CS/RvtSamples.txt @@ -3,7 +3,7 @@ EnergyAnalysis Model Demonstrates how to use EnergyAnalysisModel API. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\GeometryAPI\EnergyAnalysisModel\CS\bin\Debug\EnergyAnalysisModel.dll +C:\Revit SDK 2025\Software Development Kit\Samples\GeometryAPI\EnergyAnalysisModel\CS\bin\Debug\net8.0-windows\EnergyAnalysisModel.dll Revit.SDK.Samples.EnergyAnalysisModel.CS.Command Annotation @@ -11,7 +11,7 @@ Tag Rooms Auto tag all rooms in a specified level. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AutoTagRooms\CS\bin\Debug\AutoTagRooms.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AutoTagRooms\CS\bin\Debug\net8.0-windows\AutoTagRooms.dll Revit.SDK.Samples.AutoTagRooms.CS.Command Annotation @@ -19,7 +19,7 @@ ColorFill Scheme and Legend creation and modification. This sample demonstrates how to create ColorFill scheme, add entries and modify entries for colorFill scheme. It also demonstrates how to create colorFill legend with scheme and modify its appearance. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ColorFill\CS\bin\Debug\ColorFill.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ColorFill\CS\bin\Debug\net8.0-windows\ColorFill.dll Revit.SDK.Samples.ColorFill.CS.Command Annotation @@ -27,7 +27,7 @@ Create Dimensions Add a dimension to a selected structural wall from its start to its end. Name the dimensions 'Dimension N' where N is an increasing number for each dimension. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateDimensions\CS\bin\Debug\CreateDimensions.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateDimensions\CS\bin\Debug\net8.0-windows\CreateDimensions.dll Revit.SDK.Samples.CreateDimensions.CS.Command Annotation @@ -35,7 +35,7 @@ LeaderLineAndDimensionLineSuperposition. Using new dimension api to move leader end point. Make the dimension line and leader line to be superposition. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DimensionLeaderEnd\CS\bin\Debug\DimensionLeaderEnd.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DimensionLeaderEnd\CS\bin\Debug\net8.0-windows\DimensionLeaderEnd.dll Revit.SDK.Samples.DimensionLeaderEnd.CS.MoveHorizontally Annotation @@ -43,7 +43,7 @@ MoveToPickedPoint. Using new dimension api to move leader end point. Move to picked point. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DimensionLeaderEnd\CS\bin\Debug\DimensionLeaderEnd.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DimensionLeaderEnd\CS\bin\Debug\net8.0-windows\DimensionLeaderEnd.dll Revit.SDK.Samples.DimensionLeaderEnd.CS.MoveToPickedPoint Annotation @@ -51,7 +51,7 @@ Spot Dimension Get all spot dimensions in all views and show their properties. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SpotDimension\CS\bin\Debug\SpotDimension.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SpotDimension\CS\bin\Debug\net8.0-windows\SpotDimension.dll Revit.SDK.Samples.SpotDimension.CS.Command Annotation @@ -59,7 +59,7 @@ TagBeam - Tag Beam Tag beam's start and end. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\TagBeam\CS\bin\Debug\TagBeam.dll +C:\Revit SDK 2025\Software Development Kit\Samples\TagBeam\CS\bin\Debug\net8.0-windows\TagBeam.dll Revit.SDK.Samples.TagBeam.CS.Command Annotation @@ -67,7 +67,7 @@ TagBeam - Tag Rebar Tag selected Rebar. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\TagBeam\CS\bin\Debug\TagBeam.dll +C:\Revit SDK 2025\Software Development Kit\Samples\TagBeam\CS\bin\Debug\net8.0-windows\TagBeam.dll Revit.SDK.Samples.TagBeam.CS.TagRebar Annotation @@ -75,7 +75,7 @@ TagBeam - Create Text Create a new TextNote instance for selected Rebar. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\TagBeam\CS\bin\Debug\TagBeam.dll +C:\Revit SDK 2025\Software Development Kit\Samples\TagBeam\CS\bin\Debug\net8.0-windows\TagBeam.dll Revit.SDK.Samples.TagBeam.CS.CreateText Annotation, Basics @@ -83,7 +83,7 @@ Capitalize all TextNote elements This command iterates through the document and applies the 'AllCaps' formatting to them. This will show text in upper case characters. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CapitalizeAllTextNotes\CS\bin\Debug\CapitalizeAllTextNotes.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CapitalizeAllTextNotes\CS\bin\Debug\net8.0-windows\CapitalizeAllTextNotes.dll Revit.SDK.Samples.CapitalizeAllTextNotes.CS.Command Annotation, Basics @@ -91,7 +91,7 @@ Delete Dimensions Delete all unpinned dimensions found in current selection. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DeleteDimensions\CS\bin\Debug\DeleteDimensions.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DeleteDimensions\CS\bin\Debug\net8.0-windows\DeleteDimensions.dll Revit.SDK.Samples.DeleteDimensions.CS.Command Annotation, Basics @@ -99,23 +99,23 @@ In-Canvas controls This sample will demonstrate how to create, keep track of and handle clicks on In-Canvas controls. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\InCanvasControlAPI\CS\bin\Debug\InCanvasControlAPI.dll +C:\Revit SDK 2025\Software Development Kit\Samples\InCanvasControlAPI\CS\bin\Debug\net8.0-windows\InCanvasControlAPI.dll Revit.SDK.Samples.InCanvasControlAPI.CS.Command Annotation, Elements -Infrastructure Alignment Station Label +Infrastructure alignments Demonstrates the use of API for finding and labeling an infrastructure alignment element. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CivilAlignments\CS\bin\Debug\CivilAlignments.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CivilAlignments\CS\bin\Debug\net8.0-windows\CivilAlignments.dll Revit.SDK.Samples.CivilAlignments.CS.CreateAlignmentStationLabelsCmd Annotation, Elements -Infrastructure Alignment Properties +Infrastructure alignments with labels Demonstrates the use of API for listing properties of an infrastructure alignment element and its labels. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CivilAlignments\CS\bin\Debug\CivilAlignments.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CivilAlignments\CS\bin\Debug\net8.0-windows\CivilAlignments.dll Revit.SDK.Samples.CivilAlignments.CS.ShowPropertiesCmd Annotation, Elements, Views @@ -123,7 +123,7 @@ Create PathOfTravel. This sample demonstrated how to create PathOfTravel elements from room(s) to door(s) in a plan view. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PathOfTravel\CS\bin\Debug\PathOfTravel.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PathOfTravel\CS\bin\Debug\net8.0-windows\PathOfTravel.dll Revit.SDK.Samples.PathOfTravelCreation.CS.Command Basics @@ -131,7 +131,7 @@ Delete Objects (CS) Delete selected elements. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DeleteObject\CS\bin\Debug\DeleteObject.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DeleteObject\CS\bin\x64\Debug\net8.0-windows\DeleteObject.dll Revit.SDK.Samples.DeleteObject.CS.Command Basics @@ -139,7 +139,7 @@ ErrorHandling Demonstrates how to use the error handling framework.. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ErrorHandling\CS\bin\Debug\ErrorHandling.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ErrorHandling\CS\bin\Debug\net8.0-windows\ErrorHandling.dll Revit.SDK.Samples.ErrorHandling.CS.Command Basics @@ -147,7 +147,7 @@ ProgressNotifier ProgressNotifier LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Events\ProgressNotifier\CS\bin\Debug\ProgressNotifier.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Events\ProgressNotifier\CS\bin\x64\Debug\net8.0-windows\ProgressNotifier.dll Revit.SDK.Samples.ProgressNotifier.CS.Command Basics @@ -155,7 +155,7 @@ Hello Revit (CS) Shows how a basic ExternalCommand can be added to the Revit user interface. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\HelloRevit\CS\bin\Debug\HelloRevit.dll +C:\Revit SDK 2025\Software Development Kit\Samples\HelloRevit\CS\bin\Debug\net8.0-windows\HelloRevit.dll Revit.SDK.Samples.HelloRevit.CS.Command Basics @@ -163,7 +163,7 @@ Journaling Show how an external application can participate in the journaling mechanism. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Journaling\CS\bin\Debug\Journaling.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Journaling\CS\bin\Debug\net8.0-windows\Journaling.dll Revit.SDK.Samples.Journaling.CS.Command Basics @@ -171,7 +171,7 @@ Show Modeless Form (External Event) This sample shows how to utilize an External Event object in order to communicate with the Revit API from an external modeless dialog. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ModelessDialog\ModelessForm_ExternalEvent\CS\bin\Debug\ModelessForm_ExternalEvent.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ModelessDialog\ModelessForm_ExternalEvent\CS\bin\Debug\net8.0-windows\ModelessForm_ExternalEvent.dll Revit.SDK.Samples.ModelessForm_ExternalEvent.CS.Command Basics @@ -179,7 +179,7 @@ Show Modeless Form (Idling Event) An applicaiton with a modeless dialog using the Idling event to comunicate with Revit API LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ModelessDialog\ModelessForm_IdlingEvent\CS\bin\Debug\ModelessForm_IdlingEvent.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ModelessDialog\ModelessForm_IdlingEvent\CS\bin\Debug\net8.0-windows\ModelessForm_IdlingEvent.dll Revit.SDK.Samples.ModelessForm_IdlingEvent.CS.Command Basics @@ -187,7 +187,7 @@ Analyze Wall Face This sample shows how to utilize the Applicaiton.Idling event in order to communicate with the Revit API from an external work thread. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\MultiThreading\WorkThread\CS\bin\Debug\WorkThread.dll +C:\Revit SDK 2025\Software Development Kit\Samples\MultiThreading\WorkThread\CS\bin\Debug\net8.0-windows\WorkThread.dll Revit.SDK.Samples.WorkThread.CS.Command Basics @@ -195,7 +195,7 @@ Highlight by Phase Highlight by Phase. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PhaseSample\VB.NET\bin\PhaseSample.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PhaseSample\VB.NET\bin\x64\Debug\net8.0-windows\PhaseSample.dll Revit.SDK.Samples.PhaseSample.VB.NET.Command Basics @@ -203,7 +203,7 @@ Project Information Project Information. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ProjectInfo\CS\bin\Debug\ProjectInfo.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ProjectInfo\CS\bin\Debug\net8.0-windows\ProjectInfo.dll Revit.SDK.Samples.ProjectInfo.CS.Command Basics @@ -211,7 +211,7 @@ TransactionControl Demonstrate how to use transaction control. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\TransactionControl\CS\bin\Debug\TransactionControl.dll +C:\Revit SDK 2025\Software Development Kit\Samples\TransactionControl\CS\bin\Debug\net8.0-windows\TransactionControl.dll Revit.SDK.Samples.TransactionControl.CS.Command Basics, Data Exchange @@ -219,7 +219,7 @@ Units API The sample of Revit Units API. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Units\CS\bin\Debug\Units.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Units\CS\bin\Debug\net8.0-windows\Units.dll Revit.SDK.Samples.Units.CS.Command Basics, Elements @@ -227,7 +227,7 @@ Display Options Display Options. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DesignOptionReader\VB.NET\bin\DesignOptionReader.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DesignOptionReader\VB.NET\bin\x64\Debug\net8.0-windows\DesignOptionReader.dll Revit.SDK.Samples.DesignOptionReader.VB.NET.Command Basics, Families @@ -235,7 +235,7 @@ Interactive placement of family instance via options This sample demonstrates how to place the family instance via options LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PlacementOptions\CS\bin\Debug\PlacementOptions.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PlacementOptions\CS\bin\Debug\net8.0-windows\PlacementOptions.dll Revit.SDK.Samples.PlacementOptions.CS.Command Basics, Families @@ -243,7 +243,7 @@ RvtCmd_LibraryPaths List the Revit library paths. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RevitCommands\VB.NET\bin\RevitCommands.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RevitCommands\VB.NET\bin\x64\Debug\net8.0-windows\RevitCommands.dll Revit.SDK.Samples.RevitCommands.VB.NET.RvtCmd_LibraryPaths Basics, Families @@ -251,7 +251,7 @@ RvtCmd_LoadFamilySymbol Load a family symbol/type. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RevitCommands\VB.NET\bin\RevitCommands.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RevitCommands\VB.NET\bin\x64\Debug\net8.0-windows\RevitCommands.dll Revit.SDK.Samples.RevitCommands.VB.NET.RvtCmd_LoadFamilySymbol Basics, Families @@ -259,7 +259,7 @@ RvtCmd_LoadFamily Load a family. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RevitCommands\VB.NET\bin\RevitCommands.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RevitCommands\VB.NET\bin\x64\Debug\net8.0-windows\RevitCommands.dll Revit.SDK.Samples.RevitCommands.VB.NET.RvtCmd_LoadFamily Basics, Families @@ -267,7 +267,7 @@ RvtCmd_Selection show how to use selection set. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RevitCommands\VB.NET\bin\RevitCommands.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RevitCommands\VB.NET\bin\x64\Debug\net8.0-windows\RevitCommands.dll Revit.SDK.Samples.RevitCommands.VB.NET.RvtCmd_Selection Basics, Families @@ -275,39 +275,39 @@ RvtCmd_ShowElementData show parameters in selected entities. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RevitCommands\VB.NET\bin\RevitCommands.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RevitCommands\VB.NET\bin\x64\Debug\net8.0-windows\RevitCommands.dll Revit.SDK.Samples.RevitCommands.VB.NET.RvtCmd_ShowElementData -Basics +Basics, Geometry Display graphics using DirectContext3D Select elements whose graphics should be redrawn using DirectContext3D. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DuplicateGraphics\CS\bin\Debug\DuplicateGraphics.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DuplicateGraphics\CS\bin\Debug\net8.0-windows\DuplicateGraphics.dll Revit.SDK.Samples.DuplicateGraphics.CS.CommandDuplicateGraphics -Basics +Basics, Geometry Clear DirectContext3D graphics Remove external graphics. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DuplicateGraphics\CS\bin\Debug\DuplicateGraphics.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DuplicateGraphics\CS\bin\Debug\net8.0-windows\DuplicateGraphics.dll Revit.SDK.Samples.DuplicateGraphics.CS.CommandClearExternalGraphics -Basics +Basics, Geometry ReferencePlane Allow user to create a reference plane at the left face of the wall or at the bottom of slab which is selected first. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ReferencePlane\CS\bin\Debug\ReferencePlane.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ReferencePlane\CS\bin\Debug\net8.0-windows\ReferencePlane.dll Revit.SDK.Samples.ReferencePlane.CS.Command -Basics, Views +Basics, Geometry, Views Export 2D views with CustomExporter Export 2D views with CustomExporter, using varying options of the exporter. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CustomExporter\Custom2DExporter\CS\bin\Debug\Custom2DExporter.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CustomExporter\Custom2DExporter\CS\bin\Debug\net8.0-windows\Custom2DExporter.dll Revit.SDK.Samples.Custom2DExporter.CS.Command Basics, Parameters @@ -315,7 +315,7 @@ About Revit Show the Revit product name, version and build number. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\VersionChecking\CS\bin\Debug\VersionChecking.dll +C:\Revit SDK 2025\Software Development Kit\Samples\VersionChecking\CS\bin\Debug\net8.0-windows\VersionChecking.dll Revit.SDK.Samples.VersionChecking.CS.Command Basics, Structure @@ -323,7 +323,7 @@ Rotate Framing Objects (CS) Rotate selected objects, such as beams, braces and columns. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RotateFramingObjects\CS\bin\Debug\RotateFramingObjects.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RotateFramingObjects\CS\bin\Debug\net8.0-windows\RotateFramingObjects.dll Revit.SDK.Samples.RotateFramingObjects.CS.RotateFramingObjects Data Exchange @@ -331,7 +331,7 @@ Arch Sample - Export to Excel Export data to Excel, sorted by categories LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ArchSample\VB.NET\bin\ArchSample.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ArchSample\VB.NET\bin\x64\Debug\net8.0-windows\ArchSample.dll Revit.SDK.Samples.ArchSample.VB.NET.Command Data Exchange @@ -339,7 +339,7 @@ Import and Export Export current project to dwg, dwf(x), gbxml or fbx files and import a dwg or image file into Revit. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ImportExport\CS\bin\Debug\ImportExport.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ImportExport\CS\bin\Debug\net8.0-windows\ImportExport.dll Revit.SDK.Samples.ImportExport.CS.Command Data Exchange @@ -347,7 +347,7 @@ Panel Schedule Sample - Export Data Exoport Revit Panle Schedule(s) to CSV file(s) or HTML page(s). LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PanelSchedule\CS\bin\Debug\PanelSchedule.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PanelSchedule\CS\bin\Debug\net8.0-windows\PanelSchedule.dll Revit.SDK.Samples.PanelSchedule.CS.PanelScheduleExport Data Exchange @@ -355,7 +355,7 @@ Panel Schedule Sample - View Instance Creation Create Panel Schedule View instance for a panel. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PanelSchedule\CS\bin\Debug\PanelSchedule.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PanelSchedule\CS\bin\Debug\net8.0-windows\PanelSchedule.dll Revit.SDK.Samples.PanelSchedule.CS.InstanceViewCreation Data Exchange @@ -363,7 +363,7 @@ Panel Schedule Sample - Sheet Instance Creation Place Panel Schedule View instance on a sheet view. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PanelSchedule\CS\bin\Debug\PanelSchedule.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PanelSchedule\CS\bin\Debug\net8.0-windows\PanelSchedule.dll Revit.SDK.Samples.PanelSchedule.CS.SheetImport Data Exchange @@ -371,7 +371,7 @@ View Printer Print user selected printable views. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ViewPrinter\CS\bin\Debug\ViewPrinter.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ViewPrinter\CS\bin\Debug\net8.0-windows\ViewPrinter.dll Revit.SDK.Samples.ViewPrinter.CS.Command Data Exchange, Families @@ -379,7 +379,7 @@ DWGFamilyCreation Import dwg file into family document. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\DWGFamilyCreation\CS\bin\Debug\DWGFamilyCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\DWGFamilyCreation\CS\bin\Debug\net8.0-windows\DWGFamilyCreation.dll Revit.SDK.Samples.DWGFamilyCreation.CS.Command Elements @@ -387,7 +387,7 @@ Create CompoundStructure for wall This command is to create CompoundStructure for wall. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CompoundStructure\CS\bin\Debug\CompoundStructure.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CompoundStructure\CS\bin\Debug\net8.0-windows\CompoundStructure.dll Revit.SDK.Samples.CompoundStructureCreation.CS.WallCompoundStructure Elements @@ -395,7 +395,7 @@ Create and set FillPattern Create and set FillPattern or LinePattern to face and grid LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateFillPattern\CS\bin\Debug\CreateFillPattern.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateFillPattern\CS\bin\Debug\net8.0-windows\CreateFillPattern.dll Revit.SDK.Samples.CreateFillPattern.CS.Command Elements @@ -403,7 +403,7 @@ Curtain System Create curtain systems and edit their curtain grids LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CurtainSystem\CS\bin\Debug\CurtainSystem.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CurtainSystem\CS\bin\Debug\net8.0-windows\CurtainSystem.dll Revit.SDK.Samples.CurtainSystem.CS.Command Elements @@ -411,39 +411,23 @@ Curtain Wall and Grid Create a curtain wall and edit its grid LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CurtainWallGrid\CS\bin\Debug\CurtainWallGrid.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CurtainWallGrid\CS\bin\Debug\net8.0-windows\CurtainWallGrid.dll Revit.SDK.Samples.CurtainWallGrid.CS.Command Elements -Datum Alignment +Datumplane modification Datumplane modification LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DatumsModification\CS\bin\Debug\DatumsModification.dll -Revit.SDK.Samples.DatumsModification.CS.DatumAlignment - -Elements -Datum Propagation -Datumplane modification -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DatumsModification\CS\bin\Debug\DatumsModification.dll -Revit.SDK.Samples.DatumsModification.CS.DatumPropagation - -Elements -Datum Style Modification -Datumplane modification -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DatumsModification\CS\bin\Debug\DatumsModification.dll -Revit.SDK.Samples.DatumsModification.CS.DatumStyleModification +C:\Revit SDK 2025\Software Development Kit\Samples\DatumsModification\CS\bin\Debug\net8.0-windows\DatumsModification.dll +Revit.SDK.Samples.DatumsModification.CS.Command Elements Create and modify view filters. Create and modify view filters. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ElementFilter\ViewFilters\CS\bin\Debug\ViewFilters.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ElementFilter\ViewFilters\CS\bin\Debug\net8.0-windows\ViewFilters.dll Revit.SDK.Samples.ViewFilters.CS.Command Elements @@ -451,7 +435,7 @@ Extensible Storage Manager Extensible Storage Manager LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ExtensibleStorageManager\ExtensibleStorageManager\CS\bin\Debug\ExtensibleStorageManager.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ExtensibleStorageManager\ExtensibleStorageManager\CS\bin\x64\Debug\net8.0-windows\ExtensibleStorageManager.dll ExtensibleStorageManager.Command Elements @@ -459,7 +443,7 @@ ExtensibleStorageUtility-DeleteStorage ExtensibleStorageUtility-DeleteStorage LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ExtensibleStorageUtility\CS\bin\Debug\ExtensibleStorageUtility.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ExtensibleStorageUtility\CS\bin\Debug\net8.0-windows\ExtensibleStorageUtility.dll Revit.SDK.Samples.ExtensibleStorageUtility.CS.DeleteStorage Elements @@ -467,7 +451,7 @@ ExtensibleStorageUtility-QueryStorage ExtensibleStorageUtility-QueryStorage LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ExtensibleStorageUtility\CS\bin\Debug\ExtensibleStorageUtility.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ExtensibleStorageUtility\CS\bin\Debug\net8.0-windows\ExtensibleStorageUtility.dll Revit.SDK.Samples.ExtensibleStorageUtility.CS.QueryStorage Elements @@ -475,7 +459,7 @@ Foundation Slab Convert regular floors at the base of the building to octagonal slabs. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FoundationSlab\CS\bin\Debug\FoundationSlab.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FoundationSlab\CS\bin\Debug\net8.0-windows\FoundationSlab.dll Revit.SDK.Samples.FoundationSlab.CS.Command Elements @@ -483,7 +467,7 @@ GenerateFloor Generate a floor using a selection of walls that make a closed outline. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\GenerateFloor\CS\bin\Debug\GenerateFloor.dll +C:\Revit SDK 2025\Software Development Kit\Samples\GenerateFloor\CS\bin\Debug\net8.0-windows\GenerateFloor.dll Revit.SDK.Samples.GenerateFloor.CS.Command Elements @@ -491,7 +475,7 @@ Grid Creation Show how to create grids. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\GridCreation\CS\bin\Debug\GridCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\GridCreation\CS\bin\Debug\net8.0-windows\GridCreation.dll Revit.SDK.Samples.GridCreation.CS.Command Elements @@ -499,7 +483,7 @@ Create levels Show how to get all the levels in a document and how to create and delete a level and set its properties. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\LevelsProperty\CS\bin\Debug\LevelsProperty.dll +C:\Revit SDK 2025\Software Development Kit\Samples\LevelsProperty\CS\bin\Debug\net8.0-windows\LevelsProperty.dll Revit.SDK.Samples.LevelsProperty.CS.Command Elements @@ -507,7 +491,7 @@ Model Lines Report the number of each model line type and allow the user to specify the shape and sketch plane to create some new model lines. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ModelLines\CS\bin\Debug\ModelLines.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ModelLines\CS\bin\Debug\net8.0-windows\ModelLines.dll Revit.SDK.Samples.ModelLines.CS.Command Elements @@ -515,7 +499,7 @@ New hosted sweep Create hosted sweep and modify created hosted sweep LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\NewHostedSweep\CS\bin\Debug\NewHostedSweep.dll +C:\Revit SDK 2025\Software Development Kit\Samples\NewHostedSweep\CS\bin\Debug\net8.0-windows\NewHostedSweep.dll Revit.SDK.Samples.NewHostedSweep.CS.Command Elements @@ -523,7 +507,7 @@ New Openings Create openings on the selected floor or wall. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\NewOpenings\CS\bin\Debug\NewOpenings.dll +C:\Revit SDK 2025\Software Development Kit\Samples\NewOpenings\CS\bin\Debug\net8.0-windows\NewOpenings.dll Revit.SDK.Samples.NewOpenings.CS.Command Elements @@ -531,7 +515,7 @@ NewRoof Create or edit footprint roof and extrusion roof. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\NewRoof\CS\bin\Debug\NewRoof.dll +C:\Revit SDK 2025\Software Development Kit\Samples\NewRoof\CS\bin\Debug\net8.0-windows\NewRoof.dll Revit.SDK.Samples.NewRoof.CS.Command Elements @@ -539,7 +523,7 @@ Openings Display openings in project, and create model lines along its edges. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Openings\CS\bin\Debug\Openings.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Openings\CS\bin\Debug\net8.0-windows\Openings.dll Revit.SDK.Samples.Openings.CS.Command Elements @@ -547,7 +531,7 @@ PerformanceAdviserControl PerformanceAdviserControl LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PerformanceAdviserControl\CS\bin\Debug\PerformanceAdviserControl.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PerformanceAdviserControl\CS\bin\Debug\net8.0-windows\PerformanceAdviserControl.dll Revit.SDK.Samples.PerformanceAdviserControl.CS.UICommand Elements @@ -555,7 +539,7 @@ Shared Coordinate System Display the locations and site information of the project. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SharedCoordinateSystem\CS\bin\Debug\SharedCoordinateSystem.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SharedCoordinateSystem\CS\bin\Debug\net8.0-windows\SharedCoordinateSystem.dll Revit.SDK.Samples.SharedCoordinateSystem.CS.Command Elements @@ -563,308 +547,191 @@ Stairs automation A utility sample that creates a series of stairs, stairs runs and stairs landings configurations based upon predefined rules and parameters. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\StairsAutomation\CS\bin\Debug\StairsAutomation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\StairsAutomation\CS\bin\Debug\net8.0-windows\StairsAutomation.dll Revit.SDK.Samples.StairsAutomation.CS.Command -Toposolid -Toposolid ContourSettingCreation +Elements +Toposolid API Samples API samples for toposolid related features. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Toposolid\CS\bin\Debug\Toposolid.dll -Revit.SDK.Samples.Toposolid.CS.ContourSettingCreation - - -Toposolid -Toposolid ContourSettingModification -API samples for toposolid related features. -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Toposolid\CS\bin\Debug\Toposolid.dll -Revit.SDK.Samples.Toposolid.CS.ContourSettingModification - - -Toposolid -Toposolid SSEPointVisibility -API samples for toposolid related features. -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Toposolid\CS\bin\Debug\Toposolid.dll -Revit.SDK.Samples.Toposolid.CS.SSEPointVisibility - - -Toposolid -Toposolid SimplifyToposolid -API samples for toposolid related features. -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Toposolid\CS\bin\Debug\Toposolid.dll -Revit.SDK.Samples.Toposolid.CS.SimplifyToposolid - - -Toposolid -Toposolid SplitToposolid -API samples for toposolid related features. -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Toposolid\CS\bin\Debug\Toposolid.dll -Revit.SDK.Samples.Toposolid.CS.SplitToposolid - - -Toposolid -Toposolid ToposolidCreation -API samples for toposolid related features. -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Toposolid\CS\bin\Debug\Toposolid.dll -Revit.SDK.Samples.Toposolid.CS.ToposolidCreation - - -Toposolid -Toposolid ToposolidFromDWG -API samples for toposolid related features. -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Toposolid\CS\bin\Debug\Toposolid.dll -Revit.SDK.Samples.Toposolid.CS.ToposolidFromDWG - - -Toposolid -Toposolid ToposolidFromSurface -API samples for toposolid related features. -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Toposolid\CS\bin\Debug\Toposolid.dll -Revit.SDK.Samples.Toposolid.CS.ToposolidFromSurface - - +C:\Revit SDK 2025\Software Development Kit\Samples\Toposolid\CS\bin\Debug\net8.0-windows\Toposolid.dll +Revit.SDK.Samples.Toposolid.CS.Command Elements Winder Stairs API Sketched Winder Stairs LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\WinderStairs\CS\bin\Debug\WinderStairs.dll +C:\Revit SDK 2025\Software Development Kit\Samples\WinderStairs\CS\bin\Debug\net8.0-windows\WinderStairs.dll Revit.SDK.Samples.WinderStairs.CS.Command -Elements +Elements, Geometry Shaft Hole Puncher Create shaft opening or create opening on wall, floor or beam. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ShaftHolePuncher\CS\bin\Debug\ShaftHolePuncher.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ShaftHolePuncher\CS\bin\Debug\net8.0-windows\ShaftHolePuncher.dll Revit.SDK.Samples.ShaftHolePuncher.CS.Command -Elements +Elements, Geometry SlabShapeEditing Create vertex and crease on slab to edit it's shape. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SlabShapeEditing\CS\bin\Debug\SlabShapeEditing.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SlabShapeEditing\CS\bin\Debug\net8.0-windows\SlabShapeEditing.dll Revit.SDK.Samples.SlabShapeEditing.CS.Command - -Analytical Model -Analytical Model: AddAssociation -ContextualAnalyticalModel.AddAssociation +Elements, Geometry, Structure, UI +Create Analytical Member +Create Analytical Member LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.AddAssociation - - -Analytical Model -Analytical Model: AddCustomAssociation -ContextualAnalyticalModel.AddCustomAssociation -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.AddCustomAssociation - - -Analytical Model -Analytical Model: AnalyticalNodeConnStatus -ContextualAnalyticalModel.AnalyticalNodeConnStatus -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.AnalyticalNodeConnStatus - - -Analytical Model -Analytical Model: CreateAnalyticalPanel -ContextualAnalyticalModel.CreateAnalyticalPanel -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.CreateAnalyticalPanel - - -Analytical Model -Analytical Model: CreateAnalyticalCurvedPanel -ContextualAnalyticalModel.CreateAnalyticalCurvedPanel -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.CreateAnalyticalCurvedPanel - - -Analytical Model -Analytical Model: CreateAnalyticalMember -ContextualAnalyticalModel.CreateAnalyticalMember -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll ContextualAnalyticalModel.CreateAnalyticalMember - -Analytical Model -Analytical Model: CreateAreaLoadWithRefPoint -ContextualAnalyticalModel.CreateAreaLoadWithRefPoint +Elements, Geometry, Structure, UI +Create Analytical Panel +Create Analytical Panel LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.CreateAreaLoadWithRefPoint +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.CreateAnalyticalPanel - -Analytical Model -Analytical Model: CreateCustomAreaLoad -ContextualAnalyticalModel.CreateCustomAreaLoad +Elements, Geometry, Structure, UI +Add relation +Add relation LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.CreateCustomAreaLoad +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.AddRelation - -Analytical Model -Analytical Model: CreateCustomLineLoad -ContextualAnalyticalModel.CreateCustomLineLoad +Elements, Geometry, Structure, UI +Update relation +Update relation LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.CreateCustomLineLoad +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.UpdateRelation - -Analytical Model -Analytical Model: CreateCustomPointLoad -ContextualAnalyticalModel.CreateCustomPointLoad +Elements, Geometry, Structure, UI +Break relation +Break relation LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.CreateCustomPointLoad +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.BreakRelation - -Analytical Model -Analytical Model: FlipAnalyticalMember -ContextualAnalyticalModel.FlipAnalyticalMember +Elements, Geometry, Structure, UI +Modify Panel Contour +Modify Panel Contour LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.FlipAnalyticalMember - - -Analytical Model -Analytical Model: MemberForcesAnalyticalMember -ContextualAnalyticalModel.MemberForcesAnalyticalMember -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.MemberForcesAnalyticalMember - - -Analytical Model -Analytical Model: ModifyPanelContour -ContextualAnalyticalModel.ModifyPanelContour -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll ContextualAnalyticalModel.ModifyPanelContour - -Analytical Model -Analytical Model: MoveAnalyticalMemberUsingElementTransformUtils -ContextualAnalyticalModel.MoveAnalyticalMemberUsingElementTransformUtils +Elements, Geometry, Structure, UI +Move an Analytical Panel using ElementTransformUtils +Move an Analytical Panel using ElementTransformUtils while keeping connectivity LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.MoveAnalyticalMemberUsingElementTransformUtils - - -Analytical Model -Analytical Model: MoveAnalyticalMemberUsingSetCurve -ContextualAnalyticalModel.MoveAnalyticalMemberUsingSetCurve -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.MoveAnalyticalMemberUsingSetCurve - - -Analytical Model -Analytical Model: MoveAnalyticalNodeUsingElementTransformUtils -ContextualAnalyticalModel.MoveAnalyticalNodeUsingElementTransformUtils -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.MoveAnalyticalNodeUsingElementTransformUtils - - -Analytical Model -Analytical Model: MoveAnalyticalPanelUsingElementTransformUtils -ContextualAnalyticalModel.MoveAnalyticalPanelUsingElementTransformUtils -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll ContextualAnalyticalModel.MoveAnalyticalPanelUsingElementTransformUtils - -Analytical Model -Analytical Model: MoveAnalyticalPanelUsingSketchEditScope -ContextualAnalyticalModel.MoveAnalyticalPanelUsingSketchEditScope +Elements, Geometry, Structure, UI +Move an Analytical Panel using SketchEditScope +Move an Analytical Panel using SketchEditScope loosing connectivity LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll ContextualAnalyticalModel.MoveAnalyticalPanelUsingSketchEditScope - -Analytical Model -Analytical Model: ReleaseConditionsAnalyticalMember -ContextualAnalyticalModel.ReleaseConditionsAnalyticalMember +Elements, Geometry, Structure, UI +Move an Analytical Member using UsingElementTransformUtils +Move an Analytical Member using UsingElementTransformUtils keeping connectivity LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.MoveAnalyticalMemberUsingElementTransformUtils + +Elements, Geometry, Structure, UI +Move an Analytical Member using SketchEditScope +Move an Analytical Member using SetCurve loosing connectivity +LargeImage: +Image: +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.MoveAnalyticalMemberUsingSetCurve + +Elements, Geometry, Structure, UI +Move an Analytical Node using ElementTransformUtils +Move an Analytical Node using ElementTransformUtils keeping connectivity +LargeImage: +Image: +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.MoveAnalyticalNodeUsingElementTransformUtils + +Elements, Geometry, Structure, UI +Flip Analytical Member +Flips an Analytical Member +LargeImage: +Image: +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.FlipAnalyticalMember + +Elements, Geometry, Structure, UI +Align Analytical Element Local Coordinate System +Align Analytical Element Local Coordinate System +LargeImage: +Image: +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.AnalyticalElementLocalCoordinateSystem + +Elements, Geometry, Structure, UI +Check Connection Status +Check Connection Status +LargeImage: +Image: +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.AnalyticalNodeConnStatus + +Elements, Geometry, Structure, UI +Member Forces Analytical Member +Member Forces Analytical Member +LargeImage: +Image: +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.MemberForcesAnalyticalMember + +Elements, Geometry, Structure, UI +Release Conditions Analytical Member +Release Conditions Analytical Member +LargeImage: +Image: +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll ContextualAnalyticalModel.ReleaseConditionsAnalyticalMember - -Analytical Model -Analytical Model: RemoveAssociation -ContextualAnalyticalModel.RemoveAssociation +Elements, Geometry, Structure, UI +Sets OuterContour for Analytical Panels +Sets OuterContour for Analytical Panels LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.RemoveAssociation - - -Analytical Model -Analytical Model: SetOuterContourForPanels +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll ContextualAnalyticalModel.SetOuterContourForPanels + +Elements, Geometry, Structure, UI +Create Analytical Curved Panel +Create Analytical Curved Panel LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ContextualAnalyticalModel\CS\bin\Debug\ContextualAnalyticalModel.dll -ContextualAnalyticalModel.SetOuterContourForPanels - - - - - - - +C:\Revit SDK 2025\Software Development Kit\Samples\ContextualAnalyticalModel\CS\bin\Debug\net8.0-windows\ContextualAnalyticalModel.dll +ContextualAnalyticalModel.CreateAnalyticalCurvedPanel Elements, Parameters Move Linear Move a linear element, such as a structural beam. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\MoveLinear\CS\bin\Debug\MoveLinear.dll +C:\Revit SDK 2025\Software Development Kit\Samples\MoveLinear\CS\bin\Debug\net8.0-windows\MoveLinear.dll Revit.SDK.Samples.MoveLinear.CS.Command Elements, Parameters @@ -872,7 +739,7 @@ Slab Properties (CS) Display slab properties. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SlabProperties\CS\bin\Debug\SlabProperties.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SlabProperties\CS\bin\x64\Debug\net8.0-windows\SlabProperties.dll Revit.SDK.Samples.SlabProperties.CS.Command Elements, Parameters @@ -880,7 +747,7 @@ Span Direction Display slab properties (span direction and span direction symbols). LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SpanDirection\CS\bin\Debug\SpanDirection.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SpanDirection\CS\bin\Debug\net8.0-windows\SpanDirection.dll Revit.SDK.Samples.SpanDirection.CS.Command Families @@ -888,7 +755,7 @@ Create Air Handler Create one air handler and add connectors. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\CreateAirHandler\CS\bin\Debug\CreateAirHandler.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\CreateAirHandler\CS\bin\Debug\net8.0-windows\CreateAirHandler.dll Revit.SDK.Samples.CreateAirHandler.CS.Command Families @@ -896,7 +763,7 @@ Create Truss Create truss in truss family document. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\CreateTruss\CS\bin\Debug\CreateTruss.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\CreateTruss\CS\bin\Debug\net8.0-windows\CreateTruss.dll Revit.SDK.Samples.CreateTruss.CS.Command Families @@ -904,7 +771,7 @@ GenericModelCreation The sample show how to create Generic Model family at family document. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\GenericModelCreation\CS\bin\Debug\GenericModelCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\GenericModelCreation\CS\bin\Debug\net8.0-windows\GenericModelCreation.dll Revit.SDK.Samples.GenericModelCreation.CS.Command Families @@ -912,7 +779,7 @@ TypeRegeneration The command check every type regeneration without any error LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\TypeRegeneration\CS\bin\Debug\TypeRegeneration.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\TypeRegeneration\CS\bin\Debug\net8.0-windows\TypeRegeneration.dll Revit.SDK.Samples.TypeRegeneration.CS.Command Families @@ -920,7 +787,7 @@ ValidateParameters This command will validate if every type has valid values for certain parameter LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\ValidateParameters\CS\bin\Debug\ValidateParameters.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\ValidateParameters\CS\bin\Debug\net8.0-windows\ValidateParameters.dll Revit.SDK.Samples.ValidateParameters.CS.Command Families @@ -928,7 +795,7 @@ WindowWizard This command is to create window family via wizard LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\WindowWizard\CS\bin\Debug\WindowWizard.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\WindowWizard\CS\bin\Debug\net8.0-windows\WindowWizard.dll Revit.SDK.Samples.WindowWizard.CS.Command Families @@ -936,7 +803,7 @@ In-Place Members Display In-Place Member's Properties and AnalyticalModel. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\InPlaceMembers\CS\bin\Debug\InPlaceMembers.dll +C:\Revit SDK 2025\Software Development Kit\Samples\InPlaceMembers\CS\bin\Debug\net8.0-windows\InPlaceMembers.dll Revit.SDK.Samples.InPlaceMembers.CS.Command Families @@ -944,7 +811,7 @@ DividedSurface by intersects Customize DividedSurface with intersection elements LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\DividedSurfaceByIntersects\CS\bin\Debug\DividedSurfaceByIntersects.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\DividedSurfaceByIntersects\CS\bin\Debug\net8.0-windows\DividedSurfaceByIntersects.dll Revit.SDK.Samples.DividedSurfaceByIntersects.CS.Command Families @@ -952,7 +819,7 @@ New Extrusion Form The sample show how to create extrusion form at family document. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\NewForm\CS\bin\Debug\NewForm.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\NewForm\CS\bin\Debug\net8.0-windows\NewForm.dll Revit.SDK.Samples.NewForm.CS.MakeExtrusionForm Families @@ -960,7 +827,7 @@ New Revolve Form The sample show how to create revolve form at family document. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\NewForm\CS\bin\Debug\NewForm.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\NewForm\CS\bin\Debug\net8.0-windows\NewForm.dll Revit.SDK.Samples.NewForm.CS.MakeRevolveForm Families @@ -968,7 +835,7 @@ New Loft Form The sample show how to create loft form at family document. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\NewForm\CS\bin\Debug\NewForm.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\NewForm\CS\bin\Debug\net8.0-windows\NewForm.dll Revit.SDK.Samples.NewForm.CS.MakeLoftForm Families @@ -976,7 +843,7 @@ New Swept Blend Form The sample show how to create swept blend form at family document. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\NewForm\CS\bin\Debug\NewForm.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\NewForm\CS\bin\Debug\net8.0-windows\NewForm.dll Revit.SDK.Samples.NewForm.CS.MakeSweptBlendForm Families @@ -984,7 +851,7 @@ New Cap Form The sample show how to create cap form at family document. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\NewForm\CS\bin\Debug\NewForm.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\NewForm\CS\bin\Debug\net8.0-windows\NewForm.dll Revit.SDK.Samples.NewForm.CS.MakeCapForm Families @@ -992,7 +859,7 @@ Place FamilyInstance by face Create family instance on face. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PlaceFamilyInstanceByFace\CS\bin\Debug\PlaceFamilyInstanceByFace.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PlaceFamilyInstanceByFace\CS\bin\Debug\net8.0-windows\PlaceFamilyInstanceByFace.dll Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS.Command Families @@ -1000,7 +867,7 @@ Type Selector Retrieve all the types of the selected element, such as a wall and allow the selected element's type to be changed. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\TypeSelector\VB.NET\bin\TypeSelector.dll +C:\Revit SDK 2025\Software Development Kit\Samples\TypeSelector\VB.NET\bin\x64\Debug\net8.0-windows\TypeSelector.dll Revit.SDK.Samples.TypeSelector.VB.NET.Command Families, MEP @@ -1008,7 +875,7 @@ Create Ductwork Stiffener Create Ductwork Stiffener LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateDuctworkStiffener\CS\bin\Debug\CreateDuctworkStiffener.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateDuctworkStiffener\CS\bin\Debug\net8.0-windows\CreateDuctworkStiffener.dll Revit.SDK.Samples.CreateDuctworkStiffener.CS.Command Families, Parameters @@ -1016,7 +883,7 @@ AddParameterToFamily Sample to show how to automatically add a large set of parameters to a family. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\AutoParameter\CS\bin\Debug\AutoParameter.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\AutoParameter\CS\bin\Debug\net8.0-windows\AutoParameter.dll Revit.SDK.Samples.AutoParameter.CS.AddParameterToFamily Families, Parameters @@ -1024,7 +891,7 @@ AddParameterToFamilies Sample to show how to automatically add a large set of parameters to multiple family files. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\AutoParameter\CS\bin\Debug\AutoParameter.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\AutoParameter\CS\bin\Debug\net8.0-windows\AutoParameter.dll Revit.SDK.Samples.AutoParameter.CS.AddParameterToFamilies Families, Parameters @@ -1032,7 +899,7 @@ Command Command LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyParametersOrder\CS\bin\Debug\FamilyParametersOrder.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyParametersOrder\CS\bin\Debug\net8.0-windows\FamilyParametersOrder.dll Revit.SDK.Samples.FamilyParametersOrder.CS.Command Geometry @@ -1040,7 +907,7 @@ Multithreaded Calculation Multithreaded Calculation LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AnalysisVisualizationFramework\MultithreadedCalculation\CS\bin\Debug\MultithreadedCalculation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AnalysisVisualizationFramework\MultithreadedCalculation\CS\bin\Debug\net8.0-windows\MultithreadedCalculation.dll Revit.SDK.Samples.MultithreadedCalculation.CS.MultithreadedCalculation Geometry @@ -1048,7 +915,7 @@ Gradient Results On Surface Gradient Results On Surface LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AnalysisVisualizationFramework\SpatialFieldGradient\CS\bin\Debug\SpatialFieldGradient.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AnalysisVisualizationFramework\SpatialFieldGradient\CS\bin\Debug\net8.0-windows\SpatialFieldGradient.dll Revit.SDK.Samples.AnalysisVisualizationFramework.CS.SpatialFieldGradient Geometry @@ -1056,7 +923,7 @@ South Facing Walls Without ProjectLocation "" LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DirectionCalculation\CS\bin\Debug\DirectionCalculation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DirectionCalculation\CS\bin\Debug\net8.0-windows\DirectionCalculation.dll Revit.Samples.DirectionCalculation.FindSouthFacingWallsWithoutProjectLocation Geometry @@ -1064,7 +931,7 @@ South Facing Walls With ProjectLocation "" LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DirectionCalculation\CS\bin\Debug\DirectionCalculation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DirectionCalculation\CS\bin\Debug\net8.0-windows\DirectionCalculation.dll Revit.Samples.DirectionCalculation.FindSouthFacingWallsWithProjectLocation Geometry @@ -1072,7 +939,7 @@ South Facing Windows Without ProjectLocation "" LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DirectionCalculation\CS\bin\Debug\DirectionCalculation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DirectionCalculation\CS\bin\Debug\net8.0-windows\DirectionCalculation.dll Revit.Samples.DirectionCalculation.FindSouthFacingWindowsWithoutProjectLocation Geometry @@ -1080,7 +947,7 @@ South Facing Windows With ProjectLocation "" LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DirectionCalculation\CS\bin\Debug\DirectionCalculation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DirectionCalculation\CS\bin\Debug\net8.0-windows\DirectionCalculation.dll Revit.Samples.DirectionCalculation.FindSouthFacingWindowsWithProjectLocation Geometry @@ -1088,7 +955,7 @@ Auto Join Automatically join geometry of combinable elements. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FamilyCreation\AutoJoin\CS\bin\Debug\AutoJoin.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FamilyCreation\AutoJoin\CS\bin\Debug\net8.0-windows\AutoJoin.dll Revit.SDK.Samples.AutoJoin.CS.Command Geometry @@ -1096,7 +963,7 @@ Find Columns Embedded In Walls Find Columns Embedded In Walls LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FindReferencesByDirection\FindColumns\CS\bin\Debug\FindColumns.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FindReferencesByDirection\FindColumns\CS\bin\Debug\net8.0-windows\FindColumns.dll Revit.SDK.Samples.FindColumns.CS.Command Geometry @@ -1104,7 +971,7 @@ Measure Height of Skylight Measure Height of Skylight LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FindReferencesByDirection\MeasureHeight\CS\bin\Debug\MeasureHeight.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FindReferencesByDirection\MeasureHeight\CS\bin\Debug\net8.0-windows\MeasureHeight.dll Revit.SDK.Samples.MeasureHeight.CS.Command Geometry @@ -1112,7 +979,7 @@ RayTraceBounce Find intersection between ray and face and create connecting lines. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FindReferencesByDirection\RaytraceBounce\CS\bin\Debug\RayTraceBounce.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FindReferencesByDirection\RaytraceBounce\CS\bin\Debug\net8.0-windows\RayTraceBounce.dll Revit.SDK.Samples.RayTraceBounce.CS.Command Geometry @@ -1120,7 +987,7 @@ ComputedSymbolGeometry Demonstrates how to get the computed symbol geometry. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\GeometryAPI\ComputedSymbolGeometry\CS\bin\Debug\ComputedSymbolGeometry.dll +C:\Revit SDK 2025\Software Development Kit\Samples\GeometryAPI\ComputedSymbolGeometry\CS\bin\Debug\net8.0-windows\ComputedSymbolGeometry.dll Revit.SDK.Samples.ComputedSymbolGeometry.CS.Command Geometry @@ -1128,7 +995,7 @@ GeometryCreation_BooleanOperation GeometryCreation and BooleanOperation LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\GeometryAPI\GeometryCreation_BooleanOperation\CS\bin\Debug\GeometryCreation_BooleanOperation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\GeometryAPI\GeometryCreation_BooleanOperation\CS\bin\Debug\net8.0-windows\GeometryCreation_BooleanOperation.dll Revit.SDK.Samples.GeometryCreation_BooleanOperation.CS.Command Geometry @@ -1136,7 +1003,7 @@ Proximity Detection and Wall Join Control The usage of ElementIntersectsSolidFilter,ElementIntersectsElementFilter and WallUtils LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\GeometryAPI\ProximityDetection_WallJoinControl\CS\bin\Debug\ProximityDetection_WallJoinControl.dll +C:\Revit SDK 2025\Software Development Kit\Samples\GeometryAPI\ProximityDetection_WallJoinControl\CS\bin\Debug\net8.0-windows\ProximityDetection_WallJoinControl.dll Revit.SDK.Samples.ProximityDetection_WallJoinControl.CS.Command Geometry @@ -1144,7 +1011,7 @@ Compute distance to panels Compute the distance from a selected object to all panels and store in a panel instance parameter LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\DistanceToPanels\CS\bin\Debug\DistanceToPanels.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\DistanceToPanels\CS\bin\Debug\net8.0-windows\DistanceToPanels.dll Revit.SDK.Samples.DistanceToPanels.CS.SetDistanceParam Geometry @@ -1152,7 +1019,7 @@ Manipulate form Show how to manipulate edges and profiles of form LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\ManipulateForm\CS\bin\Debug\ManipulateForm.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\ManipulateForm\CS\bin\Debug\net8.0-windows\ManipulateForm.dll Revit.SDK.Samples.ManipulateForm.CS.Command Geometry @@ -1160,7 +1027,7 @@ Measure Panel Area Measure curtain panels on divided surfaces and identify panels beyond a user-specified range LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\MeasurePanelArea\CS\bin\Debug\MeasurePanelArea.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\MeasurePanelArea\CS\bin\Debug\net8.0-windows\MeasurePanelArea.dll Revit.SDK.Samples.MeasurePanelArea.CS.MeasurePanelArea Geometry @@ -1168,7 +1035,7 @@ Compute the length and angle of edges Measure curtain panels on divided surfaces, store the length and angle data to parameters LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\PanelEdgeLengthAngle\CS\bin\Debug\PanelEdgeLengthAngle.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\PanelEdgeLengthAngle\CS\bin\Debug\net8.0-windows\PanelEdgeLengthAngle.dll Revit.SDK.Samples.PanelEdgeLengthAngle.CS.SetLengthAngleParams Geometry @@ -1176,7 +1043,7 @@ Points Along Parabola Points Along Parabola LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\PointCurveCreation\CS\bin\Debug\PointCurveCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\PointCurveCreation\CS\bin\Debug\net8.0-windows\PointCurveCreation.dll Revit.SDK.Samples.PointCurveCreation.CS.PointsParabola Geometry @@ -1184,7 +1051,7 @@ Points On Curve Points On Curve LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\PointCurveCreation\CS\bin\Debug\PointCurveCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\PointCurveCreation\CS\bin\Debug\net8.0-windows\PointCurveCreation.dll Revit.SDK.Samples.PointCurveCreation.CS.PointsOnCurve Geometry @@ -1192,7 +1059,7 @@ Points From Text File Points From Text File LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\PointCurveCreation\CS\bin\Debug\PointCurveCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\PointCurveCreation\CS\bin\Debug\net8.0-windows\PointCurveCreation.dll Revit.SDK.Samples.PointCurveCreation.CS.PointsFromTextFile Geometry @@ -1200,7 +1067,7 @@ Curve - Sine Curve - Sine LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\PointCurveCreation\CS\bin\Debug\PointCurveCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\PointCurveCreation\CS\bin\Debug\net8.0-windows\PointCurveCreation.dll Revit.SDK.Samples.PointCurveCreation.CS.SineCurve Geometry @@ -1208,7 +1075,7 @@ Curve - Catenary Curve - Catenary LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\PointCurveCreation\CS\bin\Debug\PointCurveCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\PointCurveCreation\CS\bin\Debug\net8.0-windows\PointCurveCreation.dll Revit.SDK.Samples.PointCurveCreation.CS.CatenaryCurve Geometry @@ -1216,7 +1083,7 @@ Surface - Cyclic Surface - Cyclic LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\PointCurveCreation\CS\bin\Debug\PointCurveCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\PointCurveCreation\CS\bin\Debug\net8.0-windows\PointCurveCreation.dll Revit.SDK.Samples.PointCurveCreation.CS.CyclicSurface Geometry @@ -1224,7 +1091,7 @@ Material Quantities Material Quantities LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\MaterialQuantities\CS\bin\Debug\MaterialQuantities.dll +C:\Revit SDK 2025\Software Development Kit\Samples\MaterialQuantities\CS\bin\Debug\net8.0-windows\MaterialQuantities.dll Revit.Samples.MaterialQuantities.Command Geometry @@ -1232,7 +1099,7 @@ AddPredefinedInstance - Point Cloud Engine Add predefined instance LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PointCloudEngine\CS\bin\Debug\PointCloudEngine.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PointCloudEngine\CS\bin\Debug\net8.0-windows\PointCloudEngine.dll Revit.SDK.Samples.CS.PointCloudEngine.AddPredefinedInstanceCommand Geometry @@ -1240,7 +1107,7 @@ Add randomized instance - Point Cloud Engine Add randomized instance LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PointCloudEngine\CS\bin\Debug\PointCloudEngine.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PointCloudEngine\CS\bin\Debug\net8.0-windows\PointCloudEngine.dll Revit.SDK.Samples.CS.PointCloudEngine.AddRandomizedInstanceCommand Geometry @@ -1248,7 +1115,7 @@ Add randomized instance at transform - Point Cloud Engine Add randomized instance at transform LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PointCloudEngine\CS\bin\Debug\PointCloudEngine.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PointCloudEngine\CS\bin\Debug\net8.0-windows\PointCloudEngine.dll Revit.SDK.Samples.CS.PointCloudEngine.AddTransformedInstanceCommand Geometry @@ -1256,7 +1123,7 @@ Serialize point cloud (utility) - Point Cloud Engine Serialize point cloud (utility) LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PointCloudEngine\CS\bin\Debug\PointCloudEngine.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PointCloudEngine\CS\bin\Debug\net8.0-windows\PointCloudEngine.dll Revit.SDK.Samples.CS.PointCloudEngine.SerializePredefinedPointCloud Geometry @@ -1264,7 +1131,7 @@ SolidSolidCut-Cut "Let the sphere cut the cube" LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SolidSolidCut\CS\bin\Debug\SolidSolidCut.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SolidSolidCut\CS\bin\Debug\net8.0-windows\SolidSolidCut.dll Revit.SDK.Samples.SolidSolidCut.CS.Cut Geometry @@ -1272,7 +1139,7 @@ SolidSolidCut-Uncut "Remove the cutting relationship between the sphere and the cube" LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SolidSolidCut\CS\bin\Debug\SolidSolidCut.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SolidSolidCut\CS\bin\Debug\net8.0-windows\SolidSolidCut.dll Revit.SDK.Samples.SolidSolidCut.CS.Uncut Geometry @@ -1280,7 +1147,7 @@ Analytical Viewer Display analytical model of one or more selected elements. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Viewers\AnalyticalViewer\VB.NET\bin\AnalyticalViewer.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Viewers\AnalyticalViewer\VB.NET\bin\x64\Debug\net8.0-windows\AnalyticalViewer.dll Revit.SDK.Samples.AnalyticalViewer.VB.NET.AnalyticalViewer Geometry @@ -1288,7 +1155,7 @@ Element Viewer Display wireframe model of one or more selected elements. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Viewers\ElementViewer\VB.NET\bin\Debug\ElementViewer.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Viewers\ElementViewer\VB.NET\bin\x64\Debug\net8.0-windows\ElementViewer.dll Revit.SDK.Samples.ElementViewer.VB.NET.ElementViewer Geometry @@ -1296,7 +1163,7 @@ Revit Viewer View geometry information. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Viewers\RevitViewer\VB.NET\bin\RevitViewer.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Viewers\RevitViewer\VB.NET\bin\x64\Debug\net8.0-windows\RevitViewer.dll Revit.SDK.Samples.RevitViewer.VB.NET.RevitViewer Geometry @@ -1304,7 +1171,7 @@ Room Viewer Wireframe viewer for the selected room. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Viewers\RoomViewer\VB.NET\bin\RoomViewer.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Viewers\RoomViewer\VB.NET\bin\x64\Debug\net8.0-windows\RoomViewer.dll Revit.SDK.Samples.RoomViewer.VB.NET.RoomViewer Geometry, Structure @@ -1312,7 +1179,7 @@ NewPathReinforcement Create PathReinforcement on wall or slab. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\NewPathReinforcement\CS\bin\Debug\NewPathReinforcement.dll +C:\Revit SDK 2025\Software Development Kit\Samples\NewPathReinforcement\CS\bin\Debug\net8.0-windows\NewPathReinforcement.dll Revit.SDK.Samples.NewPathReinforcement.CS.Command Geometry, Structure @@ -1320,7 +1187,7 @@ Truss Create truss, edit profile and truss member of new created truss. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Truss\CS\bin\Debug\Truss.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Truss\CS\bin\Debug\net8.0-windows\Truss.dll Revit.SDK.Samples.Truss.CS.Command Massing @@ -1328,7 +1195,7 @@ Set Parameter Values From Image Data Set Parameter Values From Image Data LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Massing\ParameterValuesFromImage\CS\bin\Debug\ParameterValuesFromImage.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Massing\ParameterValuesFromImage\CS\bin\Debug\net8.0-windows\ParameterValuesFromImage.dll Revit.SDK.Samples.ParameterValuesFromImage.CS.SetParameterValueWithImageData Materials @@ -1336,7 +1203,7 @@ Edit appearance asset properties via a small control dialog This sample demonstrates basic usage of the AppearanceAssetEditScope and AssetProperty classes to change the value of an asset property in a given material. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AppearanceAssetEditing\CS\bin\Debug\AppearanceAssetEditing.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AppearanceAssetEditing\CS\bin\Debug\net8.0-windows\AppearanceAssetEditing.dll Revit.SDK.Samples.AppearanceAssetEditing.CS.Command Materials @@ -1344,7 +1211,7 @@ Material Properties (CS) Get the material physical properties of the selected beam, column or brace. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\MaterialProperties\CS\bin\Debug\MaterialProperties.dll +C:\Revit SDK 2025\Software Development Kit\Samples\MaterialProperties\CS\bin\Debug\net8.0-windows\MaterialProperties.dll Revit.SDK.Samples.MaterialProperties.CS.MaterialProperties Materials, Parameters @@ -1352,7 +1219,7 @@ Physical Properties Dump Material Physical Parameters. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PhysicalProp\CS\bin\Debug\PhysicalProp.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PhysicalProp\CS\bin\Debug\net8.0-windows\PhysicalProp.dll Revit.SDK.Samples.PhysicalProp.CS.DumpMaterialPhysicalParameters MEP @@ -1360,7 +1227,7 @@ AutoRoute Route ducts and fittings. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AutoRoute\CS\bin\Debug\AutoRoute.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AutoRoute\CS\bin\Debug\net8.0-windows\AutoRoute.dll Revit.SDK.Samples.AutoRoute.CS.Command MEP @@ -1368,7 +1235,7 @@ AvoidObstruction Resolve the obstructions of pipe with pipe, pipe with beam and pipe with duct. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AvoidObstruction\CS\bin\Debug\AvoidObstruction.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AvoidObstruction\CS\bin\Debug\net8.0-windows\AvoidObstruction.dll Revit.SDK.Samples.AvoidObstruction.CS.Command MEP @@ -1376,7 +1243,7 @@ Fabrication Part Layout Fabrication Part Layout Sample LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.FabricationPartLayout MEP @@ -1384,7 +1251,7 @@ Optimize Straights Optimize Straights LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.OptimizeStraights MEP @@ -1392,7 +1259,7 @@ Stretch and Fit Stretch and fit LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.StretchAndFit MEP @@ -1400,7 +1267,7 @@ Convert To Fabrication Convert Design Elements To Fabrication Parts LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.ConvertToFabrication MEP @@ -1408,7 +1275,7 @@ Buttons and Palette Exclusions Exclude Fabrication Service Buttons and Palettes for Routing Operations LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.ButtonPaletteExclusions MEP @@ -1416,7 +1283,7 @@ Ancillaries Discover the Ancillaries Associated with a Fabrication Part LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.Ancillaries MEP @@ -1424,7 +1291,7 @@ Get Custom Data Discover the Custom data Associated with a Fabrication Config and Part LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.GetCustomData MEP @@ -1432,7 +1299,7 @@ Set Custom Data Set Custom data Associated with a Fabrication Config to a Selected Part LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.SetCustomData MEP @@ -1440,7 +1307,7 @@ Export to PCF Exports fabrication parts to a PCF file LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.ExportToPCF MEP @@ -1448,7 +1315,7 @@ Export Part Geometry Exports fabrication part geometry to a CSV file LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.FabPartGeometry MEP @@ -1456,7 +1323,7 @@ Display Part Info Displays fabrication part information LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.PartInfo MEP @@ -1464,7 +1331,7 @@ Detach Hanger Rods Detaches hanger rods from their structural host LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.DetachRods MEP @@ -1472,7 +1339,7 @@ Double Rod Lengths Doubles the length of the picked hanger rods LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.DoubleRodLength MEP @@ -1480,7 +1347,7 @@ Halve Rod Lengths Halves the length of the picked hanger rods LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.HalveRodLength MEP @@ -1488,7 +1355,7 @@ Increase Rod Structure Extension Increase the length of the rod as an extension from its hosted structure (by 1ft) LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.IncreaseRodStructureExtension MEP @@ -1496,7 +1363,7 @@ Decrease Rod Structure Extension Decrease the length of the rod as an extension from its hosted structure (by 1ft) LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.DecreaseRodStructureExtension MEP @@ -1504,7 +1371,7 @@ Part Renumber Renumbers a selection of fabrication parts LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.PartRenumber MEP @@ -1512,7 +1379,7 @@ Split Straight Splits a fabrication part straight into two equal pieces LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.SplitStraight MEP @@ -1520,7 +1387,7 @@ Load and Place Next Item File Reloads the fabrication configuration and then iterates the item folders and finds the next unloaded item file and lets a user place it in the model LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.LoadAndPlaceNextItemFile MEP @@ -1528,7 +1395,7 @@ Unload Unused Item Files Unloads item files that are loaded but are not used in the model LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.UnloadUnusedItemFiles MEP @@ -1536,7 +1403,7 @@ Export to MAJ Export Fabrication Parts to a fabrication job (MAJ) file LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.ExportToMAJ MEP @@ -1544,7 +1411,7 @@ Change Service Change the service of a selection of Fabrication Parts LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.ChangeService MEP @@ -1552,7 +1419,7 @@ Change Size Change the size of a selection of Fabrication Parts LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.ChangeSize MEP @@ -1560,7 +1427,7 @@ Apply Change Apply change to the service and the size of a selection of Fabrication Parts LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.ApplyChange MEP @@ -1568,7 +1435,7 @@ Flip Part Flips a Fabrication Part to the opposite direction LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FabricationPartLayout\CS\bin\Debug\FabricationPartLayout.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FabricationPartLayout\CS\bin\Debug\net8.0-windows\FabricationPartLayout.dll Revit.SDK.Samples.FabricationPartLayout.CS.FlipPart MEP @@ -1576,7 +1443,7 @@ Pressure Loss Report Report the pressure loss for the network flow calculation. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\NetworkPressureLossReport\CS\bin\Debug\NetworkPressureLossReport.dll +C:\Revit SDK 2025\Software Development Kit\Samples\NetworkPressureLossReport\CS\bin\x64\Debug\net8.0-windows\NetworkPressureLossReport.dll Revit.SDK.Samples.NetworkPressureLossReport.Command MEP @@ -1584,7 +1451,7 @@ Power Circuit Operate power circuits. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PowerCircuit\CS\bin\Debug\PowerCircuit.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PowerCircuit\CS\bin\Debug\net8.0-windows\PowerCircuit.dll Revit.SDK.Samples.PowerCircuit.CS.Command MEP @@ -1592,7 +1459,7 @@ RoutingPreferenceTools.Analyzer RoutingPreferenceTools.Analyzer LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RoutingPreferenceTools\CS\bin\Debug\RoutingPreferenceTools.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RoutingPreferenceTools\CS\bin\x64\Debug\net8.0-windows\RoutingPreferenceTools.dll Revit.SDK.Samples.RoutingPreferenceTools.CS.Command MEP @@ -1600,7 +1467,7 @@ RoutingPreferenceTools.Builder.CommandReadPreferences RoutingPreferenceTools.Builder.CommandReadPreferences LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RoutingPreferenceTools\CS\bin\Debug\RoutingPreferenceTools.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RoutingPreferenceTools\CS\bin\x64\Debug\net8.0-windows\RoutingPreferenceTools.dll Revit.SDK.Samples.RoutingPreferenceTools.CS.CommandReadPreferences MEP @@ -1608,7 +1475,7 @@ RoutingPreferenceTools.Builder.CommandWritePreferences RoutingPreferenceTools.Builder.CommandWritePreferences LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RoutingPreferenceTools\CS\bin\Debug\RoutingPreferenceTools.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RoutingPreferenceTools\CS\bin\x64\Debug\net8.0-windows\RoutingPreferenceTools.dll Revit.SDK.Samples.RoutingPreferenceTools.CS.CommandWritePreferences MEP @@ -1616,7 +1483,7 @@ TraverseSystem Traverse a mechanical or piping system in the direction of flow LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\TraverseSystem\CS\bin\Debug\TraverseSystem.dll +C:\Revit SDK 2025\Software Development Kit\Samples\TraverseSystem\CS\bin\Debug\net8.0-windows\TraverseSystem.dll Revit.SDK.Samples.TraverseSystem.CS.Command Parameters @@ -1624,7 +1491,7 @@ Beam and slab parameter Add a new GUID parameter to beam and slab, and use the GUID value to find the right element. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\BeamAndSlabNewParameter\CS\bin\Debug\BeamAndSlabNewParameter.dll +C:\Revit SDK 2025\Software Development Kit\Samples\BeamAndSlabNewParameter\CS\bin\Debug\net8.0-windows\BeamAndSlabNewParameter.dll Revit.SDK.Samples.BeamAndSlabNewParameter.CS.Command Parameters @@ -1632,7 +1499,7 @@ Browse Parameter Bindings Browse all the shared parameters bindings used in this project. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\BrowseBindings\VB.NET\bin\BrowseBindings.dll +C:\Revit SDK 2025\Software Development Kit\Samples\BrowseBindings\VB.NET\bin\x64\Debug\net8.0-windows\BrowseBindings.dll Revit.SDK.Samples.BrowseBindings.VB.NET.Command Parameters @@ -1640,7 +1507,7 @@ CreateShared - Create Shared Parameter Create a new shared parameter and assign it to wall categories. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateShared\VB.NET\bin\Debug\CreateShared.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateShared\VB.NET\bin\x64\Debug\net8.0-windows\CreateShared.dll Revit.SDK.Samples.CreateShared.VB.NET.Command1 Parameters @@ -1648,7 +1515,7 @@ CreateShared - Set Shared Parameter Set the shared parameter. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateShared\VB.NET\bin\Debug\CreateShared.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateShared\VB.NET\bin\x64\Debug\net8.0-windows\CreateShared.dll Revit.SDK.Samples.CreateShared.VB.NET.Command2 Parameters @@ -1656,7 +1523,7 @@ Get Deck Properties Get deck layer properties. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DeckProperties\CS\bin\Debug\DeckProperties.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DeckProperties\CS\bin\Debug\net8.0-windows\DeckProperties.dll Revit.SDK.Samples.DeckProperties.CS.Command Parameters @@ -1664,7 +1531,7 @@ FireRating - Apply Parameter Add a new shared parameter to Revit and apply it to all doors. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FireRating\VB.NET\bin\FireRating.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FireRating\VB.NET\bin\x64\Debug\net8.0-windows\FireRating.dll Revit.SDK.Samples.FireRating.VB.NET.ApplyParameter Parameters @@ -1672,7 +1539,7 @@ FireRating - Export to Excel Export fire rating values to an Excel file. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FireRating\VB.NET\bin\FireRating.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FireRating\VB.NET\bin\x64\Debug\net8.0-windows\FireRating.dll Revit.SDK.Samples.FireRating.VB.NET.ExportFireRating Parameters @@ -1680,7 +1547,7 @@ FireRating - Import from Excel Import fire rating values from the Excel file and apply them to doors. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FireRating\VB.NET\bin\FireRating.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FireRating\VB.NET\bin\x64\Debug\net8.0-windows\FireRating.dll Revit.SDK.Samples.FireRating.VB.NET.ImportFireRating Parameters @@ -1688,7 +1555,7 @@ Create shared parameters Create a visible and an invisible parameter. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\InvisibleParam\CS\bin\Debug\InvisibleParam.dll +C:\Revit SDK 2025\Software Development Kit\Samples\InvisibleParam\CS\bin\Debug\net8.0-windows\InvisibleParam.dll Revit.SDK.Samples.InvisibleParam.CS.Command Parameters @@ -1696,7 +1563,7 @@ Element Parameters Show the property information of selected element. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ParameterUtils\CS\bin\Debug\ParameterUtils.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ParameterUtils\CS\bin\Debug\net8.0-windows\ParameterUtils.dll Revit.SDK.Samples.ParameterUtils.CS.Command Parameters @@ -1704,7 +1571,7 @@ ReadonlySharedParameters1 ReadonlySharedParameters1 LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ReadonlySharedParameters\CS\bin\Debug\ReadonlySharedParameters.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ReadonlySharedParameters\CS\bin\Debug\net8.0-windows\ReadonlySharedParameters.dll Revit.SDK.Samples.ReadonlySharedParameters.CS.SetReadonlyCost1 Parameters @@ -1712,7 +1579,7 @@ ReadonlySharedParameters2 ReadonlySharedParameters2 LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ReadonlySharedParameters\CS\bin\Debug\ReadonlySharedParameters.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ReadonlySharedParameters\CS\bin\Debug\net8.0-windows\ReadonlySharedParameters.dll Revit.SDK.Samples.ReadonlySharedParameters.CS.SetReadonlyCost2 Parameters @@ -1720,7 +1587,7 @@ Test Floor Thickness Show how to retrieve and modify floor thickness. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\TestFloorThickness\VB.NET\bin\Debug\TestFloorThickness.dll +C:\Revit SDK 2025\Software Development Kit\Samples\TestFloorThickness\VB.NET\bin\x64\Debug\net8.0-windows\TestFloorThickness.dll Revit.SDK.Samples.TestFloorThickness.VB.NET.Command Parameters @@ -1728,7 +1595,7 @@ Test Wall Thickness Show how to retrieve and modify wall thickness. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\TestWallThickness\VB.NET\bin\Debug\TestWallThickness.dll +C:\Revit SDK 2025\Software Development Kit\Samples\TestWallThickness\VB.NET\bin\x64\Debug\net8.0-windows\TestWallThickness.dll Revit.SDK.Samples.TestWallThickness.VB.NET.Command Parameters, Structure @@ -1736,7 +1603,7 @@ Create beams, columns and braces (CS) Create beams, columns and braces. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateBeamsColumnsBraces\CS\bin\Debug\CreateBeamsColumnsBraces.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateBeamsColumnsBraces\CS\bin\Debug\net8.0-windows\CreateBeamsColumnsBraces.dll Revit.SDK.Samples.CreateBeamsColumnsBraces.CS.Command Parameters, Views @@ -1744,7 +1611,7 @@ Create and configure new view template Demonstrates the process of creating a new view template from a regular view. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ViewTemplateCreation\CS\bin\Debug\ViewTemplateCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ViewTemplateCreation\CS\bin\Debug\net8.0-windows\ViewTemplateCreation.dll Revit.SDK.Samples.ViewTemplateCreation.CS.Command Rooms/Spaces @@ -1752,7 +1619,7 @@ Create zone and space Create space/zone elements and edit zone in Revit MEP. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AddSpaceAndZone\CS\bin\Debug\AddSpaceAndZone.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AddSpaceAndZone\CS\bin\Debug\net8.0-windows\AddSpaceAndZone.dll Revit.SDK.Samples.AddSpaceAndZone.CS.Command Rooms/Spaces @@ -1760,7 +1627,7 @@ Customize door opening expression Customize door opening expression based on geometry and your country standard. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DoorSwing\CS\bin\Debug\DoorSwing.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DoorSwing\CS\bin\Debug\net8.0-windows\DoorSwing.dll Revit.SDK.Samples.DoorSwing.CS.InitializeCommand Rooms/Spaces @@ -1768,7 +1635,7 @@ Update Door Properties Update Door Properties according to geometries. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DoorSwing\CS\bin\Debug\DoorSwing.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DoorSwing\CS\bin\Debug\net8.0-windows\DoorSwing.dll Revit.SDK.Samples.DoorSwing.CS.UpdateParamsCommand Rooms/Spaces @@ -1776,7 +1643,7 @@ Update Door Geometries Update door geometry according to From/To room property. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\DoorSwing\CS\bin\Debug\DoorSwing.dll +C:\Revit SDK 2025\Software Development Kit\Samples\DoorSwing\CS\bin\Debug\net8.0-windows\DoorSwing.dll Revit.SDK.Samples.DoorSwing.CS.UpdateGeometryCommand Rooms/Spaces @@ -1784,7 +1651,7 @@ Roofs Rooms (CS) Demonstrates how to check whether Room(Space) has bounding Roof. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RoofsRooms\CS\bin\Debug\RoofsRooms.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RoofsRooms\CS\bin\Debug\net8.0-windows\RoofsRooms.dll Revit.SDK.Samples.RoofsRooms.CS.Command Rooms/Spaces @@ -1792,7 +1659,7 @@ Rooms Get and set room information (Number, Tag, Area). LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Rooms\CS\bin\Debug\Rooms.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Rooms\CS\bin\Debug\net8.0-windows\Rooms.dll Revit.SDK.Samples.Rooms.CS.Command Rooms/Spaces @@ -1800,7 +1667,7 @@ Room Schedule Room Schedule. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RoomSchedule\CS\bin\Debug\RoomSchedule.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RoomSchedule\CS\bin\Debug\net8.0-windows\RoomSchedule.dll Revit.SDK.Samples.RoomSchedule.Command Selection @@ -1808,7 +1675,7 @@ Pick for Deletion This command is to pick element and delete. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Selections\CS\bin\Debug\Selections.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Selections\CS\bin\Debug\net8.0-windows\Selections.dll Revit.SDK.Samples.Selections.CS.PickforDeletion Selection @@ -1816,7 +1683,7 @@ Place At Point On Wall Face This command is to pick a point on wall face and place a window. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Selections\CS\bin\Debug\Selections.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Selections\CS\bin\Debug\net8.0-windows\Selections.dll Revit.SDK.Samples.Selections.CS.PlaceAtPointOnWallFace Selection @@ -1824,7 +1691,7 @@ Place At Picked Face Work plane This command is to pick a face, set work plane, then pick a point to create a circle. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Selections\CS\bin\Debug\Selections.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Selections\CS\bin\Debug\net8.0-windows\Selections.dll Revit.SDK.Samples.Selections.CS.PlaceAtPickedFaceWorkplane Selection @@ -1832,23 +1699,15 @@ Selection Dialog This command is to pick a element and a point from dialog. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Selections\CS\bin\Debug\Selections.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Selections\CS\bin\Debug\net8.0-windows\Selections.dll Revit.SDK.Samples.Selections.CS.SelectionDialog -Structure -Analytical SupportData Information -Displays the element's support information -LargeImage: -Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AnalyticalSupportData_Info\CS\bin\Debug\AnalyticalSupportData_Info.dll -Revit.SDK.Samples.AnalyticalSupportData_Info.CS.Command - Structure AreaReinCurve Turn off all layers but one. You get some parallel bars. Remove the hooks from one boundary curve so that the bars have hooks only at the other end. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AreaReinCurve\CS\bin\Debug\AreaReinCurve.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AreaReinCurve\CS\bin\Debug\net8.0-windows\AreaReinCurve.dll Revit.SDK.Samples.AreaReinCurve.CS.Command Structure @@ -1856,15 +1715,15 @@ AreaReinParameters Show parameters of selected AreaReinforcement and allow user to modify LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AreaReinParameters\CS\bin\Debug\AreaReinParameters.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AreaReinParameters\CS\bin\Debug\net8.0-windows\AreaReinParameters.dll Revit.SDK.Samples.AreaReinParameters.CS.Command -Rebar +Structure RebarParameters Show all parameters of selected Rebar LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AreaReinParameters\CS\bin\Debug\AreaReinParameters.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AreaReinParameters\CS\bin\Debug\net8.0-windows\AreaReinParameters.dll Revit.SDK.Samples.AreaReinParameters.CS.RebarParas Structure @@ -1872,7 +1731,7 @@ Boundary Conditions Display the BoundaryConditions' parameters or create a new BoundaryConditions instance. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\BoundaryConditions\CS\bin\Debug\BoundaryConditions.dll +C:\Revit SDK 2025\Software Development Kit\Samples\BoundaryConditions\CS\bin\Debug\net8.0-windows\BoundaryConditions.dll Revit.SDK.Samples.BoundaryConditions.CS.Command Structure @@ -1880,7 +1739,7 @@ Create Beam System Create beam system according to the profile made of selected beams. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateBeamSystem\CS\bin\Debug\CreateBeamSystem.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateBeamSystem\CS\bin\Debug\net8.0-windows\CreateBeamSystem.dll Revit.SDK.Samples.CreateBeamSystem.CS.Command Structure @@ -1888,7 +1747,7 @@ Create Complex Area Reinforcement Create complex AreaReinforcement on selected slab. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateComplexAreaRein\CS\bin\Debug\CreateComplexAreaRein.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateComplexAreaRein\CS\bin\Debug\net8.0-windows\CreateComplexAreaRein.dll Revit.SDK.Samples.CreateComplexAreaRein.CS.Command Structure @@ -1896,7 +1755,7 @@ Create simple area reinforcement Create simple AreaReinforcement on selected wall or floor. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateSimpleAreaRein\CS\bin\Debug\CreateSimpleAreaRein.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateSimpleAreaRein\CS\bin\Debug\net8.0-windows\CreateSimpleAreaRein.dll Revit.SDK.Samples.CreateSimpleAreaRein.CS.Command Structure @@ -1904,7 +1763,7 @@ Create wall in beam profile Create a profiled wall using the outline generated by a selection of beams defining a vertical profile. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateWallinBeamProfile\CS\bin\Debug\CreateWallinBeamProfile.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateWallinBeamProfile\CS\bin\Debug\net8.0-windows\CreateWallinBeamProfile.dll Revit.SDK.Samples.CreateWallinBeamProfile.CS.CreateWallinBeamProfile Structure @@ -1912,7 +1771,7 @@ Create walls under beams Create simple rectangular walls along and under the path of selected beams. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateWallsUnderBeams\CS\bin\Debug\CreateWallsUnderBeams.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateWallsUnderBeams\CS\bin\Debug\net8.0-windows\CreateWallsUnderBeams.dll Revit.SDK.Samples.CreateWallsUnderBeams.CS.CreateWallsUnderBeams Structure @@ -1920,7 +1779,7 @@ Create Curved Beam Create Curved Beam. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CurvedBeam\CS\bin\Debug\CurvedBeam.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CurvedBeam\CS\bin\Debug\net8.0-windows\CurvedBeam.dll Revit.SDK.Samples.CurvedBeam.CS.Command Structure @@ -1928,7 +1787,7 @@ Frame Builder Add a new concrete column and beam size. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\FrameBuilder\CS\bin\Debug\FrameBuilder.dll +C:\Revit SDK 2025\Software Development Kit\Samples\FrameBuilder\CS\bin\Debug\net8.0-windows\FrameBuilder.dll Revit.SDK.Samples.FrameBuilder.CS.Command Structure @@ -1936,7 +1795,7 @@ Structural connection basic operations Shows how to perform basic operations on a structural connection. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\GenericStructuralConnection\CS\bin\Debug\GenericStructuralConnection.dll +C:\Revit SDK 2025\Software Development Kit\Samples\GenericStructuralConnection\CS\bin\Debug\net8.0-windows\GenericStructuralConnection.dll Revit.SDK.Samples.GenericStructuralConnection.CS.Command Structure @@ -1944,55 +1803,55 @@ Loads Show how to use load case, nature, usage and combination. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Loads\CS\bin\Debug\Loads.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Loads\CS\bin\Debug\net8.0-windows\Loads.dll Revit.SDK.Samples.Loads.CS.Loads -Rebar +Structure Multiplanar Rebar Demonstrates how to create multiplanar rebar. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\MultiplanarRebar\CS\bin\Debug\MultiplanarRebar.dll +C:\Revit SDK 2025\Software Development Kit\Samples\MultiplanarRebar\CS\bin\Debug\net8.0-windows\MultiplanarRebar.dll Revit.SDK.Samples.MultiplanarRebar.CS.Command -Rebar +Structure NewRebar Create a rebar on the selected concrete rectangular column or beam. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\NewRebar\CS\bin\Debug\NewRebar.dll +C:\Revit SDK 2025\Software Development Kit\Samples\NewRebar\CS\bin\Debug\net8.0-windows\NewRebar.dll Revit.SDK.Samples.NewRebar.CS.Command -Rebar +Structure PathReinforcement Display path reinforcement properties. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\PathReinforcement\CS\bin\Debug\PathReinforcement.dll +C:\Revit SDK 2025\Software Development Kit\Samples\PathReinforcement\CS\bin\Debug\net8.0-windows\PathReinforcement.dll Revit.SDK.Samples.PathReinforcement.CS.Command -Rebar +Structure RebarContainerAnyShapeType Create Rebar Container in a selected concrete element (beam or column) that does not have any reinforcement. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RebarContainerAnyShapeType\CS\bin\Debug\RebarContainerAnyShapeType.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RebarContainerAnyShapeType\CS\bin\Debug\net8.0-windows\RebarContainerAnyShapeType.dll Revit.SDK.Samples.RebarContainerAnyShapeType.CS.Command -Rebar +Structure Add Parameters External command to add shared parameters to Rebar LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RebarFreeForm\CS\bin\Debug\RebarFreeForm.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RebarFreeForm\CS\bin\Debug\net8.0-windows\RebarFreeForm.dll Revit.SDK.Samples.RebarFreeForm.CS.AddSharedParams -Rebar +Structure Create Rebar Free Form External command to create a Rebar FreeForm element and external application to implement the custom server used to regenerate the rebar geometry based on constraints LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\RebarFreeForm\CS\bin\Debug\RebarFreeForm.dll +C:\Revit SDK 2025\Software Development Kit\Samples\RebarFreeForm\CS\bin\Debug\net8.0-windows\RebarFreeForm.dll Revit.SDK.Samples.RebarFreeForm.CS.Command Structure @@ -2000,7 +1859,7 @@ Reinforcement Create bar set in a selected concrete element (beam or column) that does not have any reinforcement. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\Reinforcement\CS\bin\Debug\Reinforcement.dll +C:\Revit SDK 2025\Software Development Kit\Samples\Reinforcement\CS\bin\Debug\net8.0-windows\Reinforcement.dll Revit.SDK.Samples.Reinforcement.CS.Command Structure @@ -2008,7 +1867,7 @@ Add elements to connection Add elements to existing structural connection LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.AddElementsToConnection.CS.Command Structure @@ -2016,7 +1875,7 @@ Add elements to custom connection Add elements to existing custom connection LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.AddElementsToCustomConnection.CS.Command Structure @@ -2024,7 +1883,7 @@ Add ranges of applicability to a connection type Add ranges of applicability to a connection type LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.AddRangesToConnectionType.CS.Command Structure @@ -2032,7 +1891,7 @@ Create anchor pattern Create anchor pattern LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreateAnchorPattern.CS.Command Structure @@ -2040,7 +1899,7 @@ Create bolt pattern Create bolt pattern LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreateBoltPattern.CS.Command Structure @@ -2048,7 +1907,7 @@ Create contour cut Create contour cut LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreateContourCut.CS.Command Structure @@ -2056,7 +1915,7 @@ Create cope skewed Create cope skewed LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreateCopeSkewed.CS.Command Structure @@ -2064,7 +1923,7 @@ Create corner cut Create corner cut LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreateCornerCut.CS.Command Structure @@ -2072,7 +1931,7 @@ Create plate Create plate LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreatePlate.CS.Command Structure @@ -2080,7 +1939,7 @@ Create plate hole Create plate hole LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreatePlateHole.CS.Command Structure @@ -2088,7 +1947,7 @@ Create shear stud pattern Create shear stud pattern LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreateShearStudPattern.CS.Command Structure @@ -2096,7 +1955,7 @@ Create shortening Create shortening LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreateShortening.CS.Command Structure @@ -2104,7 +1963,7 @@ Create weld point Create weld point LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.CreateWeldPoint.CS.Command Structure @@ -2112,7 +1971,7 @@ Delete connection Delete connection LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.DeleteConnection.CS.Command Structure @@ -2120,7 +1979,7 @@ Remove elements from structural connection Remove elements from structural connection LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.RemoveElementsFromConnection.CS.Command Structure @@ -2128,7 +1987,7 @@ Remove subelements from custom connection Remove subelements from custom connection LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.RemoveSubelementsFromCustomConnection.CS.Command Structure @@ -2136,7 +1995,7 @@ Print connection detailed parameters Print connection detailed parameters LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.UpdateConnectionDetailedParameters.CS.Command Structure @@ -2144,7 +2003,7 @@ Fabrication transaction and background calculation Shows how to handle "Background calculation in progress" exception when trying to start fabrication transaction LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SampleCommandsSteelElements\CS\bin\Debug\SampleCommandsSteelElements.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SampleCommandsSteelElements\CS\bin\Debug\net8.0-windows\SampleCommandsSteelElements.dll Revit.SDK.Samples.SampleCommandsSteelElements.BackgroundCalculation.CS.Command Structure @@ -2152,7 +2011,7 @@ StructSample - Frame Wall Add columns to the selected walls. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\StructSample\CS\bin\Debug\StructSample.dll +C:\Revit SDK 2025\Software Development Kit\Samples\StructSample\CS\bin\Debug\net8.0-windows\StructSample.dll Revit.SDK.Samples.StructSample.CS.Command Structure @@ -2160,7 +2019,7 @@ Structural Layer Function (CS) For the selected floor, display the function of each structural layer from outside to inside in a dialog box. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\StructuralLayerFunction\CS\bin\Debug\StructuralLayerFunction.dll +C:\Revit SDK 2025\Software Development Kit\Samples\StructuralLayerFunction\CS\bin\Debug\net8.0-windows\StructuralLayerFunction.dll Revit.SDK.Samples.StructuralLayerFunction.CS.Command View Transforms @@ -2168,7 +2027,7 @@ Sheet To 3D View Generate a perspective View3D with its camera at a click on a viewport on a sheet LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\SheetToView3D\CS\bin\Debug\SheetToView3D.dll +C:\Revit SDK 2025\Software Development Kit\Samples\SheetToView3D\CS\bin\Debug\net8.0-windows\SheetToView3D.dll Revit.SDK.Samples.SheetToView3D.CS.Command Views @@ -2176,7 +2035,7 @@ All Views Generate a new sheet for user selected views LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\AllViews\CS\bin\Debug\AllViews.dll +C:\Revit SDK 2025\Software Development Kit\Samples\AllViews\CS\bin\Debug\net8.0-windows\AllViews.dll Revit.SDK.Samples.AllViews.CS.Command Views @@ -2184,7 +2043,7 @@ Create view section Create a section view across the mid point of the selected wall, floor or beam LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateViewSection\CS\bin\Debug\CreateViewSection.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateViewSection\CS\bin\Debug\net8.0-windows\CreateViewSection.dll Revit.SDK.Samples.CreateViewSection.CS.Command Views @@ -2192,7 +2051,7 @@ Create drafting view Create a new empty drafting view LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\CreateViewSection\CS\bin\Debug\CreateViewSection.dll +C:\Revit SDK 2025\Software Development Kit\Samples\CreateViewSection\CS\bin\Debug\net8.0-windows\CreateViewSection.dll Revit.SDK.Samples.CreateViewSection.CS.CreateDraftingView Views @@ -2200,7 +2059,7 @@ Object Viewer Display the selected element in a preview window and generic properties in a grid. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ObjectViewer\CS\bin\Debug\ObjectViewer.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ObjectViewer\CS\bin\Debug\net8.0-windows\ObjectViewer.dll Revit.SDK.Samples.ObjectViewer.CS.Command Views @@ -2208,7 +2067,7 @@ ScheduleAPI This sample introduces how to create a view schedule and how to show its data on a sheet. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\ScheduleCreation\CS\bin\Debug\ScheduleCreation.dll +C:\Revit SDK 2025\Software Development Kit\Samples\ScheduleCreation\CS\bin\Debug\net8.0-windows\ScheduleCreation.dll Revit.SDK.Samples.ScheduleCreation.CS.Command Views @@ -2216,6 +2075,6 @@ Visibility Controller Control element visibility by category. LargeImage: Image: -Y:\a\src\rvt\RevitSdkSamples\SDK\Samples\VisibilityControl\CS\bin\Debug\VisibilityControl.dll +C:\Revit SDK 2025\Software Development Kit\Samples\VisibilityControl\CS\bin\Debug\net8.0-windows\VisibilityControl.dll Revit.SDK.Samples.VisibilityControl.CS.Command diff --git a/SDK/Samples/SDKSamples.sln b/SDK/Samples/SDKSamples.sln index 6165b789..c3bb4df5 100644 --- a/SDK/Samples/SDKSamples.sln +++ b/SDK/Samples/SDKSamples.sln @@ -1,10 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.1.32328.378 +VisualStudioVersion = 17.6.33829.357 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnalyticalSupportData_Info", "AnalyticalSupportData_Info\CS\AnalyticalSupportData_Info.csproj", "{F2A2735F-CE2A-4F76-89E2-A358122F5B02}" -EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ArchSample", "ArchSample\VB.NET\ArchSample.vbproj", "{CD614892-66AC-4F28-8ACD-CC8A48209ED2}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AreaReinCurve", "AreaReinCurve\CS\AreaReinCurve.csproj", "{01E38E1B-982E-48FC-89F9-75BA333A8A52}" @@ -458,6 +456,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateDuctworkStiffener", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Toposolid", "Toposolid\CS\Toposolid.csproj", "{C1F1D064-9582-4DD9-9D41-1197DF1EB5B2}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditSketch", "EditSketch\CS\EditSketch.csproj", "{E7ADDF22-C0E1-4F1A-B114-FD94E3D40FBC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContextMenu", "ContextMenu\CS\ContextMenu.csproj", "{3D972638-1AD1-47F4-A64E-5730E60BFD62}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisallowEndWrapping", "DisallowEndWrapping\CS\DisallowEndWrapping.csproj", "{0EA62C54-FDB2-4C6C-BD17-6C942D82929D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NewMacro", "NewMacro\CS\NewMacro.csproj", "{36ED4212-D811-46E7-A88C-933722310275}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -466,14 +472,6 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F2A2735F-CE2A-4F76-89E2-A358122F5B02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F2A2735F-CE2A-4F76-89E2-A358122F5B02}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F2A2735F-CE2A-4F76-89E2-A358122F5B02}.Debug|x64.ActiveCfg = Debug|x64 - {F2A2735F-CE2A-4F76-89E2-A358122F5B02}.Debug|x64.Build.0 = Debug|x64 - {F2A2735F-CE2A-4F76-89E2-A358122F5B02}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F2A2735F-CE2A-4F76-89E2-A358122F5B02}.Release|Any CPU.Build.0 = Release|Any CPU - {F2A2735F-CE2A-4F76-89E2-A358122F5B02}.Release|x64.ActiveCfg = Release|x64 - {F2A2735F-CE2A-4F76-89E2-A358122F5B02}.Release|x64.Build.0 = Release|x64 {CD614892-66AC-4F28-8ACD-CC8A48209ED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CD614892-66AC-4F28-8ACD-CC8A48209ED2}.Debug|Any CPU.Build.0 = Debug|Any CPU {CD614892-66AC-4F28-8ACD-CC8A48209ED2}.Debug|x64.ActiveCfg = Debug|x64 @@ -2066,6 +2064,38 @@ Global {C1F1D064-9582-4DD9-9D41-1197DF1EB5B2}.Release|Any CPU.Build.0 = Release|Any CPU {C1F1D064-9582-4DD9-9D41-1197DF1EB5B2}.Release|x64.ActiveCfg = Release|x64 {C1F1D064-9582-4DD9-9D41-1197DF1EB5B2}.Release|x64.Build.0 = Release|x64 + {E7ADDF22-C0E1-4F1A-B114-FD94E3D40FBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7ADDF22-C0E1-4F1A-B114-FD94E3D40FBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7ADDF22-C0E1-4F1A-B114-FD94E3D40FBC}.Debug|x64.ActiveCfg = Debug|x64 + {E7ADDF22-C0E1-4F1A-B114-FD94E3D40FBC}.Debug|x64.Build.0 = Debug|x64 + {E7ADDF22-C0E1-4F1A-B114-FD94E3D40FBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7ADDF22-C0E1-4F1A-B114-FD94E3D40FBC}.Release|Any CPU.Build.0 = Release|Any CPU + {E7ADDF22-C0E1-4F1A-B114-FD94E3D40FBC}.Release|x64.ActiveCfg = Release|x64 + {E7ADDF22-C0E1-4F1A-B114-FD94E3D40FBC}.Release|x64.Build.0 = Release|x64 + {3D972638-1AD1-47F4-A64E-5730E60BFD62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D972638-1AD1-47F4-A64E-5730E60BFD62}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D972638-1AD1-47F4-A64E-5730E60BFD62}.Debug|x64.ActiveCfg = Debug|x64 + {3D972638-1AD1-47F4-A64E-5730E60BFD62}.Debug|x64.Build.0 = Debug|x64 + {3D972638-1AD1-47F4-A64E-5730E60BFD62}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D972638-1AD1-47F4-A64E-5730E60BFD62}.Release|Any CPU.Build.0 = Release|Any CPU + {3D972638-1AD1-47F4-A64E-5730E60BFD62}.Release|x64.ActiveCfg = Release|x64 + {3D972638-1AD1-47F4-A64E-5730E60BFD62}.Release|x64.Build.0 = Release|x64 + {0EA62C54-FDB2-4C6C-BD17-6C942D82929D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0EA62C54-FDB2-4C6C-BD17-6C942D82929D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0EA62C54-FDB2-4C6C-BD17-6C942D82929D}.Debug|x64.ActiveCfg = Debug|x64 + {0EA62C54-FDB2-4C6C-BD17-6C942D82929D}.Debug|x64.Build.0 = Debug|x64 + {0EA62C54-FDB2-4C6C-BD17-6C942D82929D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0EA62C54-FDB2-4C6C-BD17-6C942D82929D}.Release|Any CPU.Build.0 = Release|Any CPU + {0EA62C54-FDB2-4C6C-BD17-6C942D82929D}.Release|x64.ActiveCfg = Release|x64 + {0EA62C54-FDB2-4C6C-BD17-6C942D82929D}.Release|x64.Build.0 = Release|x64 + {36ED4212-D811-46E7-A88C-933722310275}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36ED4212-D811-46E7-A88C-933722310275}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36ED4212-D811-46E7-A88C-933722310275}.Debug|x64.ActiveCfg = Debug|x64 + {36ED4212-D811-46E7-A88C-933722310275}.Debug|x64.Build.0 = Debug|x64 + {36ED4212-D811-46E7-A88C-933722310275}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36ED4212-D811-46E7-A88C-933722310275}.Release|Any CPU.Build.0 = Release|Any CPU + {36ED4212-D811-46E7-A88C-933722310275}.Release|x64.ActiveCfg = Release|x64 + {36ED4212-D811-46E7-A88C-933722310275}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SDK/Samples/SampleCommandsSteelElements/CS/Properties/AssemblyInfo.cs b/SDK/Samples/SampleCommandsSteelElements/CS/Properties/AssemblyInfo.cs index f59fa12e..6bdd0759 100644 --- a/SDK/Samples/SampleCommandsSteelElements/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/SampleCommandsSteelElements/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/SampleCommandsSteelElements/CS/SampleCommandsSteelElements.csproj b/SDK/Samples/SampleCommandsSteelElements/CS/SampleCommandsSteelElements.csproj index 8a6207dd..9424967d 100644 --- a/SDK/Samples/SampleCommandsSteelElements/CS/SampleCommandsSteelElements.csproj +++ b/SDK/Samples/SampleCommandsSteelElements/CS/SampleCommandsSteelElements.csproj @@ -1,96 +1,12 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D0222DA2-F296-4644-A26E-F9EB3B2BBAF4} - Library - Properties Revit.SDK.Samples.SampleCommandsSteelElements.CS - SampleCommandsSteelElements - - - v4.8 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\SampleCommandsSteelElements.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - OnOutputUpdated - - - x64 - - - x64 - - - - - - - - - - 4.7 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/SamplesContent.htm b/SDK/Samples/SamplesContent.htm index 6a9cadfb..b37940d7 100644 --- a/SDK/Samples/SamplesContent.htm +++ b/SDK/Samples/SamplesContent.htm @@ -106,11 +106,11 @@

By Category

-

Analysis

EnergyAnalysisModel

Annotation

AutoTagRooms
CapitalizeAllTextNotes
CivilAlignments
ColorFill
CreateDimensions
DeleteDimensions
DimensionLeaderEnd
InCanvasControlAPI
PathOfTravel
SpotDimension
TagBeam

Basics

APIAppStartup
AutoStamp
AutoUpdate
CancelSave
CapitalizeAllTextNotes
ChangesMonitor
CloudAPISample
Custom2DExporter
DeleteDimensions
DeleteObject
DesignOptionReader
DisableCommand
DuplicateGraphics
ErrorHandling
EventsMonitor
HelloRevit
InCanvasControlAPI
Journaling
ModelessForm_ExternalEvent
ModelessForm_IdlingEvent
PhaseSample
PlacementOptions
PostCommandWorkflow
PrintLog
ProgressNotifier
ProjectInfo
ReferencePlane
RevitCommands
Ribbon
RotateFramingObjects
RvtSamples
SelectionChanged
TransactionControl
UIAPI
Units
VersionChecking
WorkThread

Data Exchange

ArchSample
DWGFamilyCreation
ExportPDFSettingsSample
ExternalResourceDBServer
ExternalResourceUIServer
ImportExport
PanelSchedule
Units
ViewPrinter

Elements

AttachedDetailGroup
CivilAlignments
CompoundStructure
ContextualAnalyticalModel
CreateFillPattern
CurtainSystem
CurtainWallGrid
DatumsModification
DesignOptionReader
DisplacementElementAnimation
DuplicateViews
ExportPDFSettingsSample
ExtensibleStorageManager
ExtensibleStorageUtility
FoundationSlab
GenerateFloor
GetSetDefaultTypes
GridCreation
LevelsProperty
ModelLines
MoveLinear
MultistoryStairs
NewHostedSweep
NewOpenings
NewRoof
Openings
PathOfTravel
PerformanceAdviserControl
ShaftHolePuncher
SharedCoordinateSystem
SlabProperties
SlabShapeEditing
SpanDirection
StairsAutomation
Toposolid
ViewFilters
WinderStairs

Families

AutoParameter
CreateAirHandler
CreateDuctworkStiffener
CreateTruss
DividedSurfaceByIntersects
DWGFamilyCreation
FamilyParametersOrder
GenericModelCreation
GetSetDefaultTypes
InPlaceMembers
NewForm
PlaceFamilyInstanceByFace
PlacementOptions
RevitCommands
SinePlotter
TypeRegeneration
TypeSelector
ValidateParameters
WindowWizard

Geometry

AnalyticalViewer
AutoJoin
BRepBuilderExample
ComputedSymbolGeometry
ContextualAnalyticalModel
Custom2DExporter
DirectionCalculation
DistanceToPanels
DistanceToSurfaces
DuplicateGraphics
DynamicModelUpdate
ElementViewer
FindColumns
FreeFormElement
GeometryCreation_BooleanOperation
ManipulateForm
MaterialQuantities
MeasureHeight
MeasurePanelArea
MultithreadedCalculation
NewPathReinforcement
PanelEdgeLengthAngle
PointCloudEngine
PointCurveCreation
ProximityDetection_WallJoinControl
RayTraceBounce
ReferencePlane
RevitViewer
RoomViewer
ShaftHolePuncher
SinePlotter
SlabShapeEditing
SolidSolidCut
SpatialFieldGradient
Truss
UpdateExternallyTaggedBRep

Massing

ParameterValuesFromImage

Materials

AppearanceAssetEditing
MaterialProperties
PhysicalProp

MEP

AutoRoute
AvoidObstruction
CreateDuctworkStiffener
FabricationPartLayout
NetworkPressureLossReport
PowerCircuit
RoutingPreferenceTools
TraverseSystem

Parameters

AutoParameter
BeamAndSlabNewParameter
BrowseBindings
CreateBeamsColumnsBraces
CreateShared
DeckProperties
FamilyParametersOrder
FireRating
InvisibleParam
MoveLinear
ParameterUtils
PhysicalProp
ReadonlySharedParameters
SlabProperties
SpanDirection
TestFloorThickness
TestWallThickness
VersionChecking
ViewTemplateCreation

Rooms/Spaces

AddSpaceAndZone
DoorSwing
RoofsRooms
Rooms
RoomSchedule

Selection

Selections

Structure

AnalyticalSupportData_Info
AreaReinCurve
AreaReinParameters
BoundaryConditions
ContextualAnalyticalModel
CreateBeamsColumnsBraces
CreateBeamSystem
CreateComplexAreaRein
CreateSimpleAreaRein
CreateWallinBeamProfile
CreateWallsUnderBeams
CurvedBeam
FrameBuilder
GenericStructuralConnection
Loads
MultiplanarRebar
NewPathReinforcement
NewRebar
PathReinforcement
RebarContainerAnyShapeType
RebarFreeForm
Reinforcement
RotateFramingObjects
SampleCommandsSteelElements
StructSample
StructuralLayerFunction
Truss

UI

ContextualAnalyticalModel
DockableDialogs

View Transforms

SheetToView3D

Views

AllViews
CreateViewSection
Custom2DExporter
DisplacementElementAnimation
DuplicateViews
ObjectViewer
PathOfTravel
ScheduleAutomaticFormatter
ScheduleCreation
ScheduleToHTML
ViewTemplateCreation
VisibilityControl
+

Analysis

EnergyAnalysisModel

Annotation

AutoTagRooms
CapitalizeAllTextNotes
CivilAlignments
ColorFill
CreateDimensions
DeleteDimensions
DimensionLeaderEnd
InCanvasControlAPI
PathOfTravel
SpotDimension
TagBeam

Basics

APIAppStartup
AutoStamp
AutoUpdate
CancelSave
CapitalizeAllTextNotes
ChangesMonitor
CloudAPISample
Custom2DExporter
DeleteDimensions
DeleteObject
DesignOptionReader
DisableCommand
DuplicateGraphics
ErrorHandling
EventsMonitor
HelloRevit
InCanvasControlAPI
Journaling
ModelessForm_ExternalEvent
ModelessForm_IdlingEvent
NewMacro
PhaseSample
PlacementOptions
PostCommandWorkflow
PrintLog
ProgressNotifier
ProjectInfo
ReferencePlane
RevitCommands
Ribbon
RotateFramingObjects
RvtSamples
SelectionChanged
TransactionControl
UIAPI
Units
VersionChecking
WorkThread

Data Exchange

ArchSample
DWGFamilyCreation
ExportPDFSettingsSample
ExternalResourceDBServer
ExternalResourceUIServer
ImportExport
PanelSchedule
Units
ViewPrinter

Elements

AttachedDetailGroup
CivilAlignments
CompoundStructure
ContextualAnalyticalModel
CreateFillPattern
CurtainSystem
CurtainWallGrid
DatumsModification
DesignOptionReader
DisallowEndWrapping
DisplacementElementAnimation
DuplicateViews
ExportPDFSettingsSample
ExtensibleStorageManager
ExtensibleStorageUtility
FoundationSlab
GenerateFloor
GetSetDefaultTypes
GridCreation
LevelsProperty
ModelLines
MoveLinear
MultistoryStairs
NewHostedSweep
NewOpenings
NewRoof
Openings
PathOfTravel
PerformanceAdviserControl
ShaftHolePuncher
SharedCoordinateSystem
SlabProperties
SlabShapeEditing
SpanDirection
StairsAutomation
Toposolid
ViewFilters
WinderStairs

Families

AutoParameter
CreateAirHandler
CreateDuctworkStiffener
CreateTruss
DividedSurfaceByIntersects
DWGFamilyCreation
FamilyParametersOrder
GenericModelCreation
GetSetDefaultTypes
InPlaceMembers
NewForm
PlaceFamilyInstanceByFace
PlacementOptions
RevitCommands
SinePlotter
TypeRegeneration
TypeSelector
ValidateParameters
WindowWizard

Geometry

AnalyticalViewer
AutoJoin
BRepBuilderExample
ComputedSymbolGeometry
ContextualAnalyticalModel
Custom2DExporter
DirectionCalculation
DistanceToPanels
DistanceToSurfaces
DuplicateGraphics
DynamicModelUpdate
ElementViewer
FindColumns
FreeFormElement
GeometryCreation_BooleanOperation
ManipulateForm
MaterialQuantities
MeasureHeight
MeasurePanelArea
MultithreadedCalculation
NewPathReinforcement
PanelEdgeLengthAngle
PointCloudEngine
PointCurveCreation
ProximityDetection_WallJoinControl
RayTraceBounce
ReferencePlane
RevitViewer
RoomViewer
ShaftHolePuncher
SinePlotter
SlabShapeEditing
SolidSolidCut
SpatialFieldGradient
Truss
UpdateExternallyTaggedBRep

Massing

ParameterValuesFromImage

Materials

AppearanceAssetEditing
MaterialProperties
PhysicalProp

MEP

AutoRoute
AvoidObstruction
CreateDuctworkStiffener
FabricationPartLayout
NetworkPressureLossReport
PowerCircuit
RoutingPreferenceTools
TraverseSystem

Parameters

AutoParameter
BeamAndSlabNewParameter
BrowseBindings
CreateBeamsColumnsBraces
CreateShared
DeckProperties
FamilyParametersOrder
FireRating
InvisibleParam
MoveLinear
ParameterUtils
PhysicalProp
ReadonlySharedParameters
SlabProperties
SpanDirection
TestFloorThickness
TestWallThickness
VersionChecking
ViewTemplateCreation

Rooms/Spaces

AddSpaceAndZone
DoorSwing
RoofsRooms
Rooms
RoomSchedule

Selection

Selections

Structure

AreaReinCurve
AreaReinParameters
BoundaryConditions
ContextualAnalyticalModel
CreateBeamsColumnsBraces
CreateBeamSystem
CreateComplexAreaRein
CreateSimpleAreaRein
CreateWallinBeamProfile
CreateWallsUnderBeams
CurvedBeam
FrameBuilder
GenericStructuralConnection
Loads
MultiplanarRebar
NewPathReinforcement
NewRebar
PathReinforcement
RebarContainerAnyShapeType
RebarFreeForm
Reinforcement
RotateFramingObjects
SampleCommandsSteelElements
StructSample
StructuralLayerFunction
Truss

UI

ContextMenu
ContextualAnalyticalModel
DockableDialogs

View Transforms

SheetToView3D

Views

AllViews
CreateViewSection
Custom2DExporter
DisplacementElementAnimation
DuplicateViews
ObjectViewer
PathOfTravel
ScheduleAutomaticFormatter
ScheduleCreation
ScheduleToHTML
ViewTemplateCreation
VisibilityControl

By Skill Level

-

Advanced

DirectionCalculation
DistanceToSurfaces
DynamicModelUpdate
ExtensibleStorageManager
FindColumns
MaterialQuantities
MultithreadedCalculation
NetworkPressureLossReport
ObjectViewer
ParameterValuesFromImage
PointCloudEngine
PostCommandWorkflow
RebarFreeForm
SheetToView3D
SpatialFieldGradient
WinderStairs

Beginning

APIAppStartup
AreaReinCurve
AutoRoute
BrowseBindings
CancelSave
CapitalizeAllTextNotes
ComputedSymbolGeometry
CreateDuctworkStiffener
CreateFillPattern
CreateShared
CurvedBeam
DatumsModification
DeckProperties
DeleteDimensions
DeleteObject
DesignOptionReader
DimensionLeaderEnd
DisableCommand
DistanceToPanels
DWGFamilyCreation
FireRating
GenericStructuralConnection
HelloRevit
InCanvasControlAPI
LevelsProperty
MeasurePanelArea
ModelLines
MoveLinear
PanelEdgeLengthAngle
PanelSchedule
ParameterUtils
PerformanceAdviserControl
PhaseSample
PhysicalProp
PointCurveCreation
PowerCircuit
ProjectInfo
RevitCommands
Ribbon
Rooms
RvtSamples
ScheduleCreation
SelectionChanged
Selections
SlabProperties
SolidSolidCut
SpanDirection
SpotDimension
StructSample
StructuralLayerFunction
TagBeam
TestFloorThickness
TestWallThickness
Toposolid
TypeRegeneration
TypeSelector
Units
ValidateParameters
VersionChecking
WindowWizard

High

BoundaryConditions
CloudAPISample
CreateBeamSystem
DisplacementElementAnimation
DuplicateGraphics
GridCreation
ImportExport
MultiplanarRebar
NewHostedSweep
NewOpenings
NewRebar
NewRoof
Openings
RebarContainerAnyShapeType
Reinforcement
RoomSchedule
SampleCommandsSteelElements
ScheduleAutomaticFormatter
ShaftHolePuncher

Medium

AddSpaceAndZone
AllViews
AnalyticalSupportData_Info
AnalyticalViewer
AppearanceAssetEditing
ArchSample
AreaReinParameters
AttachedDetailGroup
AutoJoin
AutoParameter
AutoStamp
AutoTagRooms
AutoUpdate
AvoidObstruction
BeamAndSlabNewParameter
BRepBuilderExample
ChangesMonitor
CivilAlignments
ColorFill
CompoundStructure
ContextualAnalyticalModel
CreateAirHandler
CreateBeamsColumnsBraces
CreateComplexAreaRein
CreateDimensions
CreateSimpleAreaRein
CreateTruss
CreateViewSection
CreateWallinBeamProfile
CreateWallsUnderBeams
CurtainSystem
CurtainWallGrid
Custom2DExporter
DividedSurfaceByIntersects
DockableDialogs
DoorSwing
DuplicateViews
ElementViewer
EnergyAnalysisModel
ErrorHandling
EventsMonitor
ExportPDFSettingsSample
ExtensibleStorageUtility
ExternalResourceDBServer
ExternalResourceUIServer
FabricationPartLayout
FamilyParametersOrder
FoundationSlab
FrameBuilder
FreeFormElement
GenerateFloor
GenericModelCreation
GeometryCreation_BooleanOperation
GetSetDefaultTypes
InPlaceMembers
InvisibleParam
Journaling
Loads
ManipulateForm
MaterialProperties
MeasureHeight
ModelessForm_ExternalEvent
ModelessForm_IdlingEvent
MultistoryStairs
NewForm
NewPathReinforcement
PathOfTravel
PathReinforcement
PlaceFamilyInstanceByFace
PlacementOptions
PrintLog
ProgressNotifier
ProximityDetection_WallJoinControl
RayTraceBounce
ReadonlySharedParameters
ReferencePlane
RevitViewer
RoofsRooms
RoomViewer
RotateFramingObjects
RoutingPreferenceTools
ScheduleToHTML
SharedCoordinateSystem
SinePlotter
SlabShapeEditing
StairsAutomation
TransactionControl
TraverseSystem
Truss
UIAPI
UpdateExternallyTaggedBRep
ViewFilters
ViewPrinter
ViewTemplateCreation
VisibilityControl
WorkThread
+

Advanced

DirectionCalculation
DistanceToSurfaces
DynamicModelUpdate
ExtensibleStorageManager
FindColumns
MaterialQuantities
MultithreadedCalculation
NetworkPressureLossReport
ObjectViewer
ParameterValuesFromImage
PointCloudEngine
PostCommandWorkflow
RebarFreeForm
SheetToView3D
SpatialFieldGradient
WinderStairs

Beginning

APIAppStartup
AreaReinCurve
AutoRoute
BrowseBindings
CancelSave
CapitalizeAllTextNotes
ComputedSymbolGeometry
ContextMenu
CreateDuctworkStiffener
CreateFillPattern
CreateShared
CurvedBeam
DatumsModification
DeckProperties
DeleteDimensions
DeleteObject
DesignOptionReader
DimensionLeaderEnd
DisableCommand
DisallowEndWrapping
DistanceToPanels
DWGFamilyCreation
FireRating
GenericStructuralConnection
HelloRevit
InCanvasControlAPI
LevelsProperty
MeasurePanelArea
ModelLines
MoveLinear
NewMacro
PanelEdgeLengthAngle
PanelSchedule
ParameterUtils
PerformanceAdviserControl
PhaseSample
PhysicalProp
PointCurveCreation
PowerCircuit
ProjectInfo
RevitCommands
Ribbon
Rooms
RvtSamples
ScheduleCreation
SelectionChanged
Selections
SlabProperties
SolidSolidCut
SpanDirection
SpotDimension
StructSample
StructuralLayerFunction
TagBeam
TestFloorThickness
TestWallThickness
Toposolid
TypeRegeneration
TypeSelector
Units
ValidateParameters
VersionChecking
WindowWizard

High

BoundaryConditions
CloudAPISample
CreateBeamSystem
DisplacementElementAnimation
DuplicateGraphics
GridCreation
ImportExport
MultiplanarRebar
NewHostedSweep
NewOpenings
NewRebar
NewRoof
Openings
RebarContainerAnyShapeType
Reinforcement
RoomSchedule
SampleCommandsSteelElements
ScheduleAutomaticFormatter
ShaftHolePuncher

Medium

AddSpaceAndZone
AllViews
AnalyticalViewer
AppearanceAssetEditing
ArchSample
AreaReinParameters
AttachedDetailGroup
AutoJoin
AutoParameter
AutoStamp
AutoTagRooms
AutoUpdate
AvoidObstruction
BeamAndSlabNewParameter
BRepBuilderExample
ChangesMonitor
CivilAlignments
ColorFill
CompoundStructure
ContextualAnalyticalModel
CreateAirHandler
CreateBeamsColumnsBraces
CreateComplexAreaRein
CreateDimensions
CreateSimpleAreaRein
CreateTruss
CreateViewSection
CreateWallinBeamProfile
CreateWallsUnderBeams
CurtainSystem
CurtainWallGrid
Custom2DExporter
DividedSurfaceByIntersects
DockableDialogs
DoorSwing
DuplicateViews
ElementViewer
EnergyAnalysisModel
ErrorHandling
EventsMonitor
ExportPDFSettingsSample
ExtensibleStorageUtility
ExternalResourceDBServer
ExternalResourceUIServer
FabricationPartLayout
FamilyParametersOrder
FoundationSlab
FrameBuilder
FreeFormElement
GenerateFloor
GenericModelCreation
GeometryCreation_BooleanOperation
GetSetDefaultTypes
InPlaceMembers
InvisibleParam
Journaling
Loads
ManipulateForm
MaterialProperties
MeasureHeight
ModelessForm_ExternalEvent
ModelessForm_IdlingEvent
MultistoryStairs
NewForm
NewPathReinforcement
PathOfTravel
PathReinforcement
PlaceFamilyInstanceByFace
PlacementOptions
PrintLog
ProgressNotifier
ProximityDetection_WallJoinControl
RayTraceBounce
ReadonlySharedParameters
ReferencePlane
RevitViewer
RoofsRooms
RoomViewer
RotateFramingObjects
RoutingPreferenceTools
ScheduleToHTML
SharedCoordinateSystem
SinePlotter
SlabShapeEditing
StairsAutomation
TransactionControl
TraverseSystem
Truss
UIAPI
UpdateExternallyTaggedBRep
ViewFilters
ViewPrinter
ViewTemplateCreation
VisibilityControl
WorkThread

By Version

-

8.0

AnalyticalViewer
APIAppStartup
ArchSample
AutoTagRooms
BrowseBindings
CreateShared
CurvedBeam
DuplicateGraphics
ElementViewer
FireRating
ImportExport
MoveLinear
MultistoryStairs
NewOpenings
NewPathReinforcement
PathReinforcement
PhysicalProp
ProjectInfo
RebarFreeForm
RevitCommands
RevitViewer
RoomViewer
ShaftHolePuncher
SpotDimension
StructSample
TagBeam
TestFloorThickness
TestWallThickness
TransactionControl
TypeSelector
ViewPrinter
VisibilityControl

8.1

AppearanceAssetEditing
DeckProperties
HelloRevit
InvisibleParam
NetworkPressureLossReport
ParameterUtils
SpanDirection

9.0

AddSpaceAndZone
AllViews
AnalyticalSupportData_Info
AreaReinCurve
AreaReinParameters
BeamAndSlabNewParameter
CreateBeamsColumnsBraces
CreateComplexAreaRein
CreateDimensions
CreateSimpleAreaRein
CreateViewSection
CreateWallinBeamProfile
CreateWallsUnderBeams
CurtainSystem
CurtainWallGrid
Custom2DExporter
DeleteDimensions
DeleteObject
DesignOptionReader
DoorSwing
GenerateFloor
GridCreation
InPlaceMembers
LevelsProperty
Loads
MaterialProperties
NewHostedSweep
NewRebar
NewRoof
ObjectViewer
PhaseSample
PlaceFamilyInstanceByFace
PowerCircuit
RotateFramingObjects
RvtSamples
SampleCommandsSteelElements
SlabProperties
SlabShapeEditing
StructuralLayerFunction
Truss
VersionChecking

9.1

AttachedDetailGroup
BoundaryConditions
CreateBeamSystem
FoundationSlab
FrameBuilder
Journaling
Openings
ReferencePlane
Reinforcement
RoofsRooms
Rooms
SharedCoordinateSystem

2008.0

APIAppStartup
AutoTagRooms
CurvedBeam
ImportExport
NewOpenings
NewPathReinforcement
PathReinforcement
ProjectInfo
ShaftHolePuncher
SpotDimension
TagBeam
TestFloorThickness
TestWallThickness
TransactionControl
ViewPrinter
VisibilityControl

2008.2

ModelLines
RoomSchedule

2009.0

AddSpaceAndZone
CurtainSystem
CurtainWallGrid
DoorSwing
GridCreation
NewHostedSweep
NewRebar
NewRoof
PlaceFamilyInstanceByFace
PowerCircuit
RvtSamples
SlabShapeEditing
Truss

2009.1

RoofsRooms

2010.0

AutoJoin
AutoParameter
AutoRoute
AutoStamp
AutoUpdate
AvoidObstruction
CancelSave
CreateAirHandler
CreateTruss
DistanceToPanels
DWGFamilyCreation
EventsMonitor
GenericModelCreation
ManipulateForm
MeasurePanelArea
NewForm
PanelEdgeLengthAngle
PrintLog
RayTraceBounce
Ribbon
TraverseSystem
TypeRegeneration
ValidateParameters
WindowWizard

2011.0

ChangesMonitor
DirectionCalculation
DistanceToSurfaces
DividedSurfaceByIntersects
DynamicModelUpdate
ErrorHandling
FindColumns
MaterialQuantities
MeasureHeight
PanelSchedule
ParameterValuesFromImage
PointCurveCreation
ProximityDetection_WallJoinControl
Selections
SolidSolidCut
SpatialFieldGradient
ViewFilters

2012.0

CompoundStructure
ComputedSymbolGeometry
CreateFillPattern
EnergyAnalysisModel
ExtensibleStorageManager
GeometryCreation_BooleanOperation
MultiplanarRebar
MultithreadedCalculation
PerformanceAdviserControl
PointCloudEngine

2013.0

DisableCommand
ModelessForm_ExternalEvent
ModelessForm_IdlingEvent
ProgressNotifier
RoutingPreferenceTools
ScheduleCreation
SinePlotter
StairsAutomation
UIAPI
WinderStairs
WorkThread

2014.0

DisplacementElementAnimation
DockableDialogs
DuplicateViews
ExtensibleStorageUtility
FreeFormElement
PostCommandWorkflow
ScheduleAutomaticFormatter
ScheduleToHTML
Units

2015.0

DatumsModification
DimensionLeaderEnd
ExternalResourceDBServer
ExternalResourceUIServer
FamilyParametersOrder
GetSetDefaultTypes
ReadonlySharedParameters

2016.0

FabricationPartLayout
RebarContainerAnyShapeType

2017.0

BRepBuilderExample
CapitalizeAllTextNotes
GenericStructuralConnection
PlacementOptions

2018.0

DuplicateGraphics
MultistoryStairs
RebarFreeForm

2018.1

AppearanceAssetEditing

2019.0

Custom2DExporter
SampleCommandsSteelElements

2019.1

AttachedDetailGroup

2020.0

CloudAPISample
ExportPDFSettingsSample
InCanvasControlAPI
PathOfTravel
Toposolid
ViewTemplateCreation

2021.1

CivilAlignments

2022.0

ColorFill
UpdateExternallyTaggedBRep

2023.0

ContextualAnalyticalModel
SelectionChanged
SheetToView3D

2024.0

CreateDuctworkStiffener
+

8.0

AnalyticalViewer
APIAppStartup
ArchSample
AutoTagRooms
BrowseBindings
CreateShared
CurvedBeam
DuplicateGraphics
ElementViewer
FireRating
ImportExport
MoveLinear
MultistoryStairs
NewOpenings
NewPathReinforcement
PathReinforcement
PhysicalProp
ProjectInfo
RebarFreeForm
RevitCommands
RevitViewer
RoomViewer
ShaftHolePuncher
SpotDimension
StructSample
TagBeam
TestFloorThickness
TestWallThickness
TransactionControl
TypeSelector
ViewPrinter
VisibilityControl

8.1

AppearanceAssetEditing
DeckProperties
HelloRevit
InvisibleParam
NetworkPressureLossReport
ParameterUtils
SpanDirection

9.0

AddSpaceAndZone
AllViews
AreaReinCurve
AreaReinParameters
BeamAndSlabNewParameter
CreateBeamsColumnsBraces
CreateComplexAreaRein
CreateDimensions
CreateSimpleAreaRein
CreateViewSection
CreateWallinBeamProfile
CreateWallsUnderBeams
CurtainSystem
CurtainWallGrid
Custom2DExporter
DeleteDimensions
DeleteObject
DesignOptionReader
DoorSwing
GenerateFloor
GridCreation
InPlaceMembers
LevelsProperty
Loads
MaterialProperties
NewHostedSweep
NewRebar
NewRoof
ObjectViewer
PhaseSample
PlaceFamilyInstanceByFace
PowerCircuit
RotateFramingObjects
RvtSamples
SampleCommandsSteelElements
SlabProperties
SlabShapeEditing
StructuralLayerFunction
Truss
VersionChecking

9.1

AttachedDetailGroup
BoundaryConditions
CreateBeamSystem
FoundationSlab
FrameBuilder
Journaling
Openings
ReferencePlane
Reinforcement
RoofsRooms
Rooms
SharedCoordinateSystem

2008.0

APIAppStartup
AutoTagRooms
CurvedBeam
ImportExport
NewOpenings
NewPathReinforcement
PathReinforcement
ProjectInfo
ShaftHolePuncher
SpotDimension
TagBeam
TestFloorThickness
TestWallThickness
TransactionControl
ViewPrinter
VisibilityControl

2008.2

ModelLines
RoomSchedule

2009.0

AddSpaceAndZone
CurtainSystem
CurtainWallGrid
DoorSwing
GridCreation
NewHostedSweep
NewRebar
NewRoof
PlaceFamilyInstanceByFace
PowerCircuit
RvtSamples
SlabShapeEditing
Truss

2009.1

RoofsRooms

2010.0

AutoJoin
AutoParameter
AutoRoute
AutoStamp
AutoUpdate
AvoidObstruction
CancelSave
CreateAirHandler
CreateTruss
DistanceToPanels
DWGFamilyCreation
EventsMonitor
GenericModelCreation
ManipulateForm
MeasurePanelArea
NewForm
PanelEdgeLengthAngle
PrintLog
RayTraceBounce
Ribbon
TraverseSystem
TypeRegeneration
ValidateParameters
WindowWizard

2011.0

ChangesMonitor
DirectionCalculation
DistanceToSurfaces
DividedSurfaceByIntersects
DynamicModelUpdate
ErrorHandling
FindColumns
MaterialQuantities
MeasureHeight
PanelSchedule
ParameterValuesFromImage
PointCurveCreation
ProximityDetection_WallJoinControl
Selections
SolidSolidCut
SpatialFieldGradient
ViewFilters

2012.0

CompoundStructure
ComputedSymbolGeometry
CreateFillPattern
EnergyAnalysisModel
ExtensibleStorageManager
GeometryCreation_BooleanOperation
MultiplanarRebar
MultithreadedCalculation
PerformanceAdviserControl
PointCloudEngine

2013.0

DisableCommand
ModelessForm_ExternalEvent
ModelessForm_IdlingEvent
ProgressNotifier
RoutingPreferenceTools
ScheduleCreation
SinePlotter
StairsAutomation
UIAPI
WinderStairs
WorkThread

2014.0

DisplacementElementAnimation
DockableDialogs
DuplicateViews
ExtensibleStorageUtility
FreeFormElement
PostCommandWorkflow
ScheduleAutomaticFormatter
ScheduleToHTML
Units

2015.0

DatumsModification
DimensionLeaderEnd
ExternalResourceDBServer
ExternalResourceUIServer
FamilyParametersOrder
GetSetDefaultTypes
ReadonlySharedParameters

2016.0

FabricationPartLayout
RebarContainerAnyShapeType

2017.0

BRepBuilderExample
CapitalizeAllTextNotes
GenericStructuralConnection
PlacementOptions

2018.0

DuplicateGraphics
MultistoryStairs
RebarFreeForm

2018.1

AppearanceAssetEditing

2019.0

Custom2DExporter
SampleCommandsSteelElements

2019.1

AttachedDetailGroup

2020.0

CloudAPISample
ExportPDFSettingsSample
InCanvasControlAPI
PathOfTravel
Toposolid
ViewTemplateCreation

2021.1

CivilAlignments

2022.0

ColorFill
UpdateExternallyTaggedBRep

2023.0

ContextualAnalyticalModel
SelectionChanged
SheetToView3D

2024.0

CreateDuctworkStiffener

2025.0

ContextMenu
DisallowEndWrapping

By Name alphabetically

This section lists the sample applications in alphabetical order and briefly discusses what each application does.
A | @@ -135,4 +135,4 @@ W | X | Y | Z -

AddSpaceAndZone

Subject:Create spaces and zones.
Skill Level:Medium
Category:Rooms/Spaces
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Mechanical.Space
Autodesk.Revit.DB.Mechanical.Zone
Autodesk.Revit.DB.Phase
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates three main features:1. How to get all Space elements in a specified level.2. How to get all Zone elements in a specified level.3. How to create Space elements for each closed wall loop or closed space separation.4. How to create a new Zone element in a specified level and phase.5. How to add/remove spaces in a Zone element.

AllViews

Subject:Generate a new sheet that includes all the selected views and edit properties of a selected viewport in a sheet.
Skill Level:Medium
Category:Views
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document.NewViewSheet
Autodesk.Revit.DB.View
Autodesk.Revit.DB.ViewSet
Summary:This sample demonstrates how to generate a new sheet that includes all the selected views. It also demonstrates how to access the properties of a viewport such as LabelLineOffset, LabelLength and Orientation.

DistanceToSurfaces

Subject:Display analysis results in a Revit model using Dynamic Model Update
Skill Level:Advanced
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.Analysis.FieldDomainPointsByUV
Autodesk.Revit.DB.Analysis.FieldValues
Autodesk.Revit.DB.Analysis.SpatialFieldManager
Autodesk.Revit.DB.BoundingBoxUV
Autodesk.Revit.DB.Events.DocumentOpenedEventArgs
Autodesk.Revit.DB.FaceArray
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.LocationPoint
Autodesk.Revit.DB.UpdaterRegistry
Summary:On startup, the external application creates a trigger that will execute when walls, masses, and family instances in the project change. When this occurs, Revit calculates the distance from a family instance (sphere.rfa) to several points on each face. These distances are used as values for the analysis visualization display.

MultithreadedCalculation

Subject:Analysis Visualization Framework
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Analysis.FieldDomainPointsByUV
Autodesk.Revit.DB.Analysis.FieldValues
Autodesk.Revit.DB.Analysis.SpatialFieldManager
Autodesk.Revit.DB.UpdaterRegistry
System.Threading.Thread
Summary:A combination of Analysis Visualization Framework, multi-threading, Revit’s Idling event, and Dynamic Model Update to simulate how analysis results can be periodically updated during computation and re-started when the Revit model changes.

SpatialFieldGradient

Subject:Display analysis results in a Revit model
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.Analysis.AnalysisDisplayColoredSurfaceSettings
Autodesk.Revit.DB.Analysis.AnalysisDisplayColorSettings
Autodesk.Revit.DB.Analysis.AnalysisDisplayLegendSettings
Autodesk.Revit.DB.Analysis.AnalysisDisplayStyle
Autodesk.Revit.DB.Analysis.FieldDomainPointsByUV
Autodesk.Revit.DB.Analysis.FieldValues
Autodesk.Revit.DB.Analysis.SpatialFieldManager
Autodesk.Revit.DB.BoundingBoxUV
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.TextNoteType
Autodesk.Revit.UI.Selection.Selection
Summary:Select a face and display numeric data on that face

AnalyticalSupportData_Info

Subject:Display elements' analytical support informations.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.DB.Structure.AnalyticalModelSupport
Autodesk.Revit.DB.Structure.AnalyticalSupportType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample displays the supported information of the element (includes the element id, element type and supported type of the element).

APIAppStartup

Subject:Launch an external application.
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.UI.IExternalApplication
Summary:This sample demonstrates how to launch an external application when Revit starts and closes.

AppearanceAssetEditing

Subject:Edit appearance asset properties via a small control dialog
Skill Level:Medium
Category:Materials
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2018.1
Classes:Autodesk.Revit.DB.AppearanceAssetElement
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.Visual.AppearanceAssetEditScope
Autodesk.Revit.DB.Visual.AssetPropertyBoolean
Autodesk.Revit.DB.Visual.AssetPropertyDoubleArray4d
Summary:This sample demonstrates basic usage of the AppearanceAssetEditScope and AssetProperty classes to change the value of an asset property in a given material.

ArchSample

Subject:Export data to Excel.
Skill Level:Medium
Category:Data Exchange
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.Collections.Map
Autodesk.Revit.Collections.MapIterator
Autodesk.Revit.Collections.Set
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.UI.IExternalCommand
Summary:This sample exports the contents of an entire project to Microsoft Excel 2003.

AreaReinCurve

Subject:Parameters of AreaReinCurve.
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Structure.AreaReinforcementCurve
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows user how to get AreaReinforcementCurve and change its parameters.

AreaReinParameters

Subject:Parameters of AreaReinforcement and Rebar.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.ElementIterator
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Structure.AreaReinforcementCurve
Autodesk.Revit.DB.Structure.RebarBarType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to use API displays and modifies parameters of AreaReinforcement. And teach user how to get all parameters of Rebar.

AttachedDetailGroup

Subject:Attached Detail Group
Skill Level:Medium
Category:Elements
Type:ExternalApplication,
Revit Platform:All
First Released For:2019.1
Classes:Autodesk.Revit.DB.Group
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to show and hide the attached detail groups of a model group.

AutoRoute

Subject:Route ducts and fittings.
Skill Level:Beginning
Category:MEP
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Connector
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Mechanical.Duct
Autodesk.Revit.DB.Mechanical.MechanicalSystem
Summary:This sample demonstrates how to route a set of ducts and fittings between a base air supply equipment and 2 terminals.

AutoTagRooms

Subject:Auto Tag Rooms.
Skill Level:Medium
Category:Annotation
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2008.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Architecture.RoomTag
Autodesk.Revit.DB.Architecture.RoomTagType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates three main features:1. How to get all rooms in a specified level.2. How to get all room tags in current document.3. How to create new room tags with specified room tag type to auto tag all rooms in a specified level.

AvoidObstruction

Subject:Obstruction detects and resolve.
Skill Level:Medium
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2010.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Mechanical.Duct
Autodesk.Revit.DB.Plumbing.Pipe
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to detect and resolve the obstructions of Pipe with Pipe, Pipe with Beam, or Pipe with Duct.

BeamAndSlabNewParameter

Subject:Shared parameter.
Skill Level:Medium
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.CategorySet
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.DefinitionGroups
Autodesk.Revit.DB.Definitions
Autodesk.Revit.DB.InstanceBinding
Autodesk.Revit.DB.Parameter
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.SelElementSet
Summary:This sample demonstrates how to add a shared instance parameter to beams and slabs, and uses GUID as the parameter’s value. Users also can use the value of the parameter to find the special element.

BoundaryConditions

Subject:Create or retrieve boundary conditions.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.1
Classes:Autodesk.Revit.DB.BoundaryConditions
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows to get BoundaryConditions’ parameters or create BoundaryConditons.

BrowseBindings

Subject:Display shared parameters bindings.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.DB.BindingMap
Autodesk.Revit.DB.CategorySet
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionBindingMapIterator
Autodesk.Revit.DB.ElementBinding
Autodesk.Revit.UI.IExternalCommand
Summary:This sample browses all the shared parameters bindings used in the project.

CapitalizeAllTextNotes

Subject:Capitalize All Text
Skill Level:Beginning
Category:Annotation, Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:2017.0
Classes:Autodesk.Revit.DB.FormattedText
Autodesk.Revit.DB.TextNote
Autodesk.Revit.UI.IExternalCommand
Summary:Capitalizes all the text of all the TextNotes in the project by formatting the text to use 'AllCaps'

CivilAlignments

Subject:Infrastructure alignments
Skill Level:Medium
Category:Annotation, Elements
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2021.1
Classes:Revit.SDK.Samples.CivilAlignments.CS.CivilAlignmentsApp
Revit.SDK.Samples.CivilAlignments.CS.CreateAlignmentStationLabelSetCmd
Revit.SDK.Samples.CivilAlignments.CS.ShowProperties
Summary:Demonstrates the use of API for finding, property querying and annotating of infrastructure alignment elements.

CloudAPISample

Subject:Revit Cloud API Usage Sample
Skill Level:High
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2020.0
Classes:Revit.SDK.Samples.CloudAPISample.CS.Application
Revit.SDK.Samples.CloudAPISample.CS.Coroutine.Coroutine
Revit.SDK.Samples.CloudAPISample.CS.Coroutine.CoroutineScheduler
Revit.SDK.Samples.CloudAPISample.CS.Migration.DefaultMigrationModel
Revit.SDK.Samples.CloudAPISample.CS.Migration.FolderLocation
Revit.SDK.Samples.CloudAPISample.CS.Migration.IMigrationModel
Revit.SDK.Samples.CloudAPISample.CS.Migration.MigrationRule
Revit.SDK.Samples.CloudAPISample.CS.Migration.MigrationToBim360
Revit.SDK.Samples.CloudAPISample.CS.RunSample
Revit.SDK.Samples.CloudAPISample.CS.SampleContext
Revit.SDK.Samples.CloudAPISample.CS.SampleEngine
Revit.SDK.Samples.CloudAPISample.CS.View.ViewMigrationToBim360
Revit.SDK.Samples.CloudAPISample.CS.View.ViewSamplePortal
Summary:This is a sample helps third party developers understand how to use Revit Cloud API

ColorFill

Subject:ColorFill Scheme and Legend creation and modification.
Skill Level:Medium
Category:Annotation
Type:ExternalCommand,
Revit Platform:All
First Released For:2022.0
Classes:Autodesk.Revit.DB.ColorFillScheme
Summary:This sample demonstrates how to create ColorFill scheme, add entries and modify entries for colorFill scheme. It also demonstrates how to create colorFill legend with scheme and modify its appearance.

CompoundStructure

Subject:CompoundStructure
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.CompoundStructure
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.StructuralAsset
Autodesk.Revit.DB.ThermalAsset
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to create a vertical CompoundStructure for walls.

ContextualAnalyticalModel

Subject:Contextual Analytical Model
Skill Level:Medium
Category:Elements, Geometry, Structure, UI
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2023.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementId
Autodesk.Revit.DB.Reference
Autodesk.Revit.DB.Structure.AnalyticalMember
Autodesk.Revit.DB.Structure.AnalyticalOpening
Autodesk.Revit.DB.Structure.AnalyticalPanel
Autodesk.Revit.DB.Transaction
Autodesk.Revit.UI.Events
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:Contextual Analytical Model

CreateBeamsColumnsBraces

Subject:Create a frame with beams, columns and braces.
Skill Level:Medium
Category:Parameters, Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document.NewFamilyInstance(…) method
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create a truss model which composes of columns, beams and braces automatically according to the user’s input.

CreateBeamSystem

Subject:Create beamsystem.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.1
Classes:Autodesk.Revit.DB.BeamSystem
Autodesk.Revit.DB.BeamSystem.LayoutRule
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to generate a beam system with the horizontal linear beams selection’s profile.

CreateComplexAreaRein

Subject:Create AreaReinforcement.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.ElementIterator
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Structural.AnalyticalModel
Autodesk.Revit.DB.Structural.AreaReinforcementType
Summary:This sample demonstrates how to create AreaReinforcement by Revit API and change its parameters.

CreateDimensions

Subject:Create dimensions.
Skill Level:Medium
Category:Annotation
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.Category
Autodesk.Revit.DB.CategorySet
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.Dimension
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.GeometryObjectArray
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.Location
Autodesk.Revit.DB.LocationCurve
Autodesk.Revit.DB.Options
Autodesk.Revit.DB.ReferenceArray
Autodesk.Revit.DB.View
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.SelElementSet
Summary:This sample shows how to add a dimension to a selected structure wall from its start to its end.

CreateDuctworkStiffener

Subject:Create Ductwork Stiffener
Skill Level:Beginning
Category:Families, MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2024.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create ductwork stiffener.

CreateFillPattern

Subject:Create and apply FillPatternElement and LinePatternElement
Skill Level:Beginning
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.FillPatternElement
Autodesk.Revit.DB.LinePatternElement
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create or retrieve a FillPatternElement or LinePatternElement and apply them to the surface or grid.

CreateShared

Subject:Create and modify a shared parameter.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.Category
Autodesk.Revit.DB.CategorySet
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.Parameters.InstanceBinding
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.DB.Symbol
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how a shared parameter can be created via the API and how a shared parameter can be modified via the API.

CreateSimpleAreaRein

Subject:Create rectangular AreaReinforcement.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Structure.AreaReinforcement
Autodesk.Revit.DB.Structure.AreaReinforcementType
Autodesk.Revit.DB.Wall
Summary:This sample uses to show how to create AreaReinforcement and change its parameters by Revit API.

CreateViewSection

Subject:Create section views.
Skill Level:Medium
Category:Views
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.BoundingBoxXYZ
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.LocationCurve
Autodesk.Revit.DB.Structural.AnalyticalModel
Autodesk.Revit.DB.Structural.AnalyticalModelFloor
Autodesk.Revit.DB.Structural.AnalyticalModelFrame
Autodesk.Revit.DB.Transform
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to generate a section view across the mid point of a linear element, such as a wall, floor or beam

CreateWallinBeamProfile

Subject:Create wall with Profile of selected Beams.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.Document
Autodesk.Revit.UI.Elements.FamilyInstance
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to generate a wall which has the profile of beams selection. When the command is executed, a dialog should appear that contains a drop-down list for all types of wall and a check box for whether the walls are structural. Default should be checked.

CreateWallsUnderBeams

Subject:Create wall under selected Beams.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to generate simple rectangular wall(s) under the beam(s) selection. When the command is executed a dialog should appear that contains a drop-down list for all types of wall and a check box for whether the walls are structural. Default should be checked.

CurtainSystem

Subject:Create curtain systems.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.CurtainSystem
Autodesk.Revit.DB.Document
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates 4 main features:1. How to create curtain systems on specified faces.2. How to delete curtain systems.3. How to add curtain grids to curtain systems.4. How to remove curtain grids from curtain systems.

CurtainWallGrid

Subject:Create Curtain Wall and manipulate its curtain grid.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.DB.CurtainCell
Autodesk.Revit.DB.CurtainGrid
Autodesk.Revit.DB.CurtainGridLine
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Mullion
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates five main features:1. How to create curtain wall with specific level and wall type.2. How to retrieve the curtain grid information of the curtain wall.3. How to edit the data of the curtain grid.4. How to retrieve the grid lines of the curtain grid.5. How to edit the grid lines and mullions of the curtain grid.

CurvedBeam

Subject:Curved Beam creation.
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Creation.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Geometry.Arc
Autodesk.Revit.DB.Geometry.Ellipse
Autodesk.Revit.DB.Geometry.NurbSpline
Autodesk.Revit.DB.Geometry.XYZ
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.Symbols.FamilySymbol
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create curved beam, this sample can create three types of curved beam: arc, ellipse and nurbspline.

Custom2DExporter

Subject:Export 2D views with CustomExporter
Skill Level:Medium
Category:Basics, Geometry, Views
Type:ExternalCommand,
Revit Platform:All
First Released For:2019.0
Classes:Autodesk.Revit.DB.CustomExporter
Autodesk.Revit.DB.IExportContext2D
Autodesk.Revit.UI.IExternalCommand
Summary:Export 2D views with CustomExporter, using varying options of the exporter.

DatumsModification

Subject:Datumplane modification
Skill Level:Beginning
Category:Elements
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.DB.DatumPlane
Autodesk.Revit.UI.IExternalApplication
Summary:Datumplane modification

DeckProperties

Subject:Display Deck Layer Properties.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.DB.CompoundStructureLayer
Autodesk.Revit.DB.CompoundStructureLayerFunction
Autodesk.Revit.DB.FloorType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows that how to get the properties of deck layer by RevitAPI.

DeleteDimensions

Subject:Delete dimensions.
Skill Level:Beginning
Category:Annotation, Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.Dimension
Autodesk.Revit.DB.Element
Autodesk.Revit.UI.IExternalCommand
Summary:Show how to delete Dimension elements.

DeleteObject

Subject:Delete Objects.
Skill Level:Beginning
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.SelElementSet
Summary:This sample is used to delete the objects selected by user.

DesignOptionReader

Subject:Display design options.
Skill Level:Beginning
Category:Basics, Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.DB.DesignOption
Autodesk.Revit.DB.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get the design options in the current document of Revit.

DimensionLeaderEnd

Subject:Dimension leader end point.
Skill Level:Beginning
Category:Annotation
Type:ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.DB.Dimension
Summary:Using new dimension api to move leader end point.

DirectionCalculation

Subject:Identify orientation of building elements
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.ElementClassFilter
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.Location
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.Selection.Selection
Summary:Find all windows and exterior walls that face the south direction.

DisableCommand

Subject:Command replacement
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.UI.AddInCommandBinding
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.RevitCommandId
Autodesk.Revit.UI.UIControlledApplication
Summary:Disable a command by replacing its implementation with a simple popup message

DisplacementElementAnimation

Subject:Use DisplacementElement to animate building members
Skill Level:High
Category:Elements, Views
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.DisplacementElement
Autodesk.Revit.UI.Events.IdlingEventArgs
Autodesk.Revit.UI.IExternalCommand
Summary:Use DisplacementElements to animate groups of building structural members, proceeding sequentially from bottom level to top.

DockableDialogs

Subject:Docking modeless dialogs
Skill Level:Medium
Category:UI
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.UI.DockablePane
Autodesk.Revit.UI.IDockablePaneProvider
Instructions: Build and install the addin, and start Revit. Before opening a document, select the “Register” ribbon button in the “DockableDialogs” ribbon tab to launch the registration dialog. Select a docking style (bottom, top, tabbed, floating, etc…). After opening a document, note the docked-modeless API window in the UI. The “Hide” and “Show” buttons in the DockableDialogs ribbon can hide and show the dialog without destroying it.
Summary:DockableDialogs is a sample addin that demonstrates modeless dialog design, external events, and the new dockable dialogs UI API framework.

ChangesMonitor

Subject:Track the changes in document.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.DocumentChangeArgs
Autodesk.Revit.UI. IExternalApplication
Summary:This sample demonstrates how to subscribe the DocumentChanged event to controlled application level, and how this event works.

DoorSwing

Subject:Manage opening of the door and rooms relevant to the door.
Skill Level:Medium
Category:Rooms/Spaces
Type:ExternalApplication, ExternalCommand,
Revit Platform:Architecture
First Released For:2009.0
Classes:Autodesk.Revit. UI.PushButton
Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.DB.BindingMap
Autodesk.Revit.DB.BoundingBoxXYZ
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DocumentType.Family
Autodesk.Revit.DB.ElementBinding
Autodesk.Revit.DB.Events.DocumentSavingAsEventArgs
Autodesk.Revit.DB.Events.DocumentSavingEventArgs
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.InstanceBinding
Autodesk.Revit.DB.Options
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.TypeBinding
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.RibbonPanel
Summary:This sample will demonstrate how to create and maintain door opening parameters, internal door parameter, From/To Room and how to schedule these parameters. Feature to customize to your country standard is also provided.

DuplicateGraphics

Subject:Display graphics using DirectContext3D
Skill Level:High
Category:Basics, Geometry
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2018.0
Classes:Autodesk.Revit.DB.DirectContext3D.DrawContext
Autodesk.Revit.DB.DirectContext3D.IDirectContext3DServer
Autodesk.Revit.DB.ExternalService.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:The sample demonstrates basic usage of DirectContext3D. The external application creates DirectContext3D servers that extract geometry from selected Revit elements, encode it in pairs of vertex and index buffers, and submit it for rendering using DirectContext3D. The effect of the process, which is triggered using an ExternalCommand, is to display the geometry content of selected Revit elements at an offset, so that the graphics appear to be duplicated.

DuplicateViews

Subject:Copy paste drafting views and schedules from one document to another
Skill Level:Medium
Category:Elements, Views
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.CopyPasteOptions
Autodesk.Revit.DB.ElementTransformUtils
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.IDuplicateTypeNamesHandler
Autodesk.Revit.DB.IFailuresPreprocessor
Autodesk.Revit.UI.IExternalCommand
Summary:Use the copy paste APIs to copy drafting views and schedules from one document to another. The drafting view contents will also be copied.

DynamicModelUpdate

Subject:Dynamic Model Update used to maintain relative position between elements
Skill Level:Advanced
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.ElementClassFilter
Autodesk.Revit.DB.LocationPoint
Autodesk.Revit.DB.LogicalAndFilter
Autodesk.Revit.DB.UpdaterRegistry
Summary:Move a section marker to maintain relative position with a window

ViewFilters

Subject:Create and modify view filters.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.ParameterFilterElement
Autodesk.Revit.DB.ParameterFilterRuleFactory
Autodesk.Revit.DB.ParameterFilterUtilities
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create and modify view filters by 2011 new element iteration API.

ErrorHandling

Subject:How to use the error handling framework.
Skill Level:Medium
Category:Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.FailureDefinition
Autodesk.Revit.DB.FailureDefinitionId
Autodesk.Revit.DB.FailureMessage
Autodesk.Revit.DB.IFailuresPreprocessor
Autodesk.Revit.DB.IFailuresProcessor
Autodesk.Revit.Document
Summary:This sample demonstrates how to create failure definition id, failure definition, failure message and how to resolve failures in failure (pro)processing steps.

AutoStamp

Subject:Auto stamp when print view.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Events.ViewPrintedEventArgs
Autodesk.Revit.DB.Events.ViewPrintingEventArgs
Autodesk.Revit.DB.Geometry.XYZ
Autodesk.Revit.DB.TextNote
Autodesk.Revit.UI.IExternalApplication
Summary:This sample demonstrates how to subscribe ViewPrint events, create and delete TextNote element in event handler and cancel events when creation failure occurred.

AutoUpdate

Subject:Auto-update Revit model after document is opened.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Events
Autodesk.Revit.UI.IExternalApplication
Summary:This sample demonstrates how to subscribe DocumentOpened event and modify model in event handler in the event handler method.

CancelSave

Subject:Cancel document save process
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.DB.ProjectInfo
Autodesk.Revit.UI.IExternalApplication
Summary:This sample demonstrates how to cancel the document save process through DocumentSaving / DocumentSavingAs event’s arguments.

EventsMonitor

Subject:Track Event.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Events
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.IExternamApplication
Summary:This sample demonstrates how to subscribe to controlled application level Events.

PrintLog

Subject:Dump print information to log.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Events.DocumentPrintedEventArgs
Autodesk.Revit.DB.Events.DocumentPrintingEventArgs
Autodesk.Revit.DB.Events.ViewPrintedEventArgs
Autodesk.Revit.DB.Events.ViewPrintingEventArgs
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
System.DateTime
System.Diagnostics.Stopwatch
Summary:This sample demonstrates how to subscribe Print related events, access properties in argument of event handlers and dump print related information to log file.

ProgressNotifier

Subject:Show progress information for an action in a stack data structure for easier analysis.
Skill Level:Medium
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB.Events.ProgressChangedEventArgs
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to subscribe ProgressNotify related events, access properties in argument of event handlers, and organize the subtransaction progress information into a stack.

SelectionChanged

Subject:SelectionChanged event
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2023.0
Classes:Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.UI.Events.SelectionChangedEventArgs
Autodesk.Revit.UI.IExternalApplication
Summary:The sample implements IExternalApplication interface and subscribes SelectionChanged event in OnStartUp; the registered event handler will dump selected references related information to log files.

ExportPDFSettingsSample

Subject:ExportPDFSettings examples.
Skill Level:Medium
Category:Data Exchange, Elements
Type:ExternalApplication,
Revit Platform:All
First Released For:2020.0
Classes:Autodesk.Revit.DB.ExportPDFSettings
Autodesk.Revit.DB.PDFExportOptions
Autodesk.Revit.DB.TableCellCombinedParameterData
Summary:Provides examples for manipulating ExportPDFSettings.

ExtensibleStorageManager

Subject:Create, read, update, and delete third party extensible storage in Revit Elements.
Skill Level:Advanced
Category:Elements
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ExtensibleStorage.Entity
Autodesk.Revit.DB.ExtensibleStorage.Field
Autodesk.Revit.DB.ExtensibleStorage.FieldBuilder
Autodesk.Revit.DB.ExtensibleStorage.Schema
Autodesk.Revit.DB.ExtensibleStorage.SchemaBuilder
Summary:This application demonstrates the ExtensibleStorage classes and related APIs by creating a wrapper class and control dialog that creates schemas, serializes and deserializes them to XML, and extracts and displays all data in Entities of those Schemas. This is an advanced sample. If you are not familiar with ExtensibleStorage, first look at the “DynamicModelUpdate” sample.

ExtensibleStorageUtility

Subject:ExtensibleStorageUtility
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2014.0
Classes:StorageUtility – provides all methods to query and delete, and display extensible storage.
Summary:This sample shows that query if storage of given schemas exists in a document using the ExtensibleStorageFilter as well as how to delete it.

ExternalResourceDBServer

Subject:Sample External Resource Server
Skill Level:Medium
Category:Data Exchange
Type:ExternalApplication,
Revit Platform:All
First Released For:2015.0
Classes:Application.cs
Autodesk.Revit.DB.IExternalDBApplication
Autodesk.Revit.DB.IExternalResourceServer
Autodesk.Revit.DB.IGetLocalPathForOpenCallback
Autodesk.Revit.DB.IOnLocalLinkSharedCoordinatesSavedCallback
Contains GetLinkPathForOpen and LocalLinkSharedCoordinatesSaved, which are implementations of additional external resource server interfaces - IGetLocalPathForOpenCallback and IOnLocalLinkSharedCoordinatesSavedCallback. These callback classes are required in order to support Revit links.
Contains the class DBApplication which inherits from interface IExternalDBApplication and implements the OnStartup and OnShutdown methods. The Sample External Resource DB Server is registered with Revit in the OnStartup method.
Contains the KeynotesDatabase class, which is a "fake" database used to demonstrate how keynote data can be loaded into Revit from an arbitrary source, rather than a traditional text file.
Contains the SampleExternalResourceDBServer class - an implementation of the IExternalResourceServer interface.
KeynotesDatabase.cs
Project Files
SampleExternalResourceDBServer.cs
ServerInterfaceExtensionsForRevitLinks.cs
Summary:Demonstrates a concrete class derived from the IExternalResourceServer interface. The class simulates the provision of keynote data and Revit link models from files in a remote storage location, as well as keynote data created from a database.

ExternalResourceUIServer

Subject:An External Resource UI Server Class
Skill Level:Medium
Category:Data Exchange
Type:ExternalApplication,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalResourceUIServer
Summary:An IExternalResourceUIServer implementation to provide messages and other UI in support of the SampleExternalResourceServer in the ExternalResourceDBServer project.

FabricationPartLayout

Subject:Fabrication Part
Skill Level:Medium
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2016.0
Classes:Autodesk.Revit.DB.Connector
Autodesk.Revit.DB.ConnectorSet
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.ElementId
Autodesk.Revit.DB.Fabrication.CustomDataType
Autodesk.Revit.DB.Fabrication.DesignToFabricationConverter
Autodesk.Revit.DB.Fabrication.DesignToFabricationConverterResult
Autodesk.Revit.DB.Fabrication.FabricationAncillaryType
Autodesk.Revit.DB.Fabrication.FabricationAncillaryUsageType
Autodesk.Revit.DB.Fabrication.FabricationPartCompareType
Autodesk.Revit.DB.Fabrication.FabricationPartFitResult
Autodesk.Revit.DB.Fabrication.FabricationPartRouteEnd
Autodesk.Revit.DB.Fabrication.FabricationUtils
Autodesk.Revit.DB.FabricationAncillaryUsage
Autodesk.Revit.DB.FabricationConfiguration
Autodesk.Revit.DB.FabricationDimensionDefinition
Autodesk.Revit.DB.FabricationItemFile
Autodesk.Revit.DB.FabricationItemFolder
Autodesk.Revit.DB.FabricationPart
Autodesk.Revit.DB.FabricationRodInfo
Autodesk.Revit.DB.FabricationService
Autodesk.Revit.DB.FabricationServiceButton
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.MEPConnectorInfo
Autodesk.Revit.DB.Parameter
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to use the Fabrication Part API to create a sample layout and make modifications to fabrication data in the model. This includes:rectangular and round ductworktap placementrotationsstraight optimizationsconnections to a generic Revit family instancestretch fabrication part fitting to a target elementconverting design elements into fabrication partsrenumbering the straight/coupling fabrication partsloading and unloading of item filesexporting fabrication parts to PCF and MAJaccessing fabrication part mesh geometry.flip a fabrication part

AutoJoin

Subject:Automatically join geometry of combinable elements.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.CombinableElement
Autodesk.Revit.DB.Document
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to automatically join geometry between multiple generic forms for use in family modeling and massing.

AutoParameter

Subject:Auto add parameters to family document.
Skill Level:Medium
Category:Families, Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.ExternalDefinition
Autodesk.Revit.DB.FamilyManager
Autodesk.Revit.DB.FamilyParameter
Autodesk.Revit.Document
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to automatically add parameters (shared or not) to family documents.

CreateAirHandler

Subject:Create one air handler and add connectors.
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.DB.CombinableElement
Autodesk.Revit.DB.Extrusion
Autodesk.Revit.DB.Mechanical.DuctConnector
Autodesk.Revit.DB.Plumbing.PipeConnector
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:This sample creates one air handler and adds connectors (piping, duct).

CreateTruss

Subject:Create Truss
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.Creation.ItemFactoryBase
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create a mono truss in truss family document.

DWGFamilyCreation

Subject:Import dwg file into family document.
Skill Level:Beginning
Category:Data Exchange, Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to import a dwg file into a family document and add parameters to the family through Revit API.

GenericModelCreation

Subject:Create Generic Model
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to create Generic Model through Revit API

TypeRegeneration

Subject:Family type regeneration
Skill Level:Beginning
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.FamilyManager
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:This sample demonstrates Family type regeneration by Revit API.

ValidateParameters

Subject:Validate Parameters
Skill Level:Beginning
Category:Families
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.FamilyManager
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:This sample will demonstrate if every type has valid values for certain parameters.

WindowWizard

Subject:Windows Wizard
Skill Level:Beginning
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.FamilyManager
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:This sample will demonstrate how to create a window family via wizard.

FamilyParametersOrder

Subject:Sort family parameters' order.
Skill Level:Medium
Category:Families, Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.ApplicationServices.Application;
Autodesk.Revit.DB
Autodesk.Revit.DB.Document;
Autodesk.Revit.DB.Family;
Autodesk.Revit.DB.FamilyManager;
Autodesk.Revit.DB.FamilySource;
Autodesk.Revit.DB.FilteredElementCollector;
Autodesk.Revit.DB.IFamilyLoadOptions;
Autodesk.Revit.UI.IExternalApplication;
Autodesk.Revit.UI.IExternalCommand;
Summary:This sample demonstrates how to sort the family parameters' order. The family could be a disk file or have been loaded into a project.

FindColumns

Subject:Columns Embedded in Walls
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.FilteredElementIterator
Autodesk.Revit.DB.Transform
Autodesk.Revit.DB.XYZ
Autodesk.Revit.UI.Selection.Selection
Summary:This sample shows how to find columns that are embedded in walls with the Revit API method FindReferencesWithContextByDirection.

MeasureHeight

Subject:Measure height of skylight window
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.BoundingBoxXYZ
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.UI.Selection.Selection
Summary:This sample shows how to find the height of a skylight window above the ground level using the Revit API method FindReferencesWithContextByDirection.

RayTraceBounce

Subject:Ray Trace Bounce
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to find intersection between ray and face and create connecting lines by Revit API method FindReferencesWithContextByDirection.

FireRating

Subject:Create shared parameter; export and import form excel.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.Category
Autodesk.Revit.UI.IExternalCommand
Summary:This program defines three commands: ApplyParameter which is used to add a new shared parameter; ExportFireRating which is used to export fire rating values to an Excel file and ImportFireRating which is used to import fire rating values from the Excel file and apply them to doors.

FoundationSlab

Subject:Create Foundation Slab.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.FloorType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create Foundation Slab.

FrameBuilder

Subject:Create a frame composed of columns, beams and braces.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.Level
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create a frame composed of columns, beams and braces. User can input parameters to create a frame consist of column, beam and brace. It has a user visible option to use the suspended updating function to increase the speed of the model creation. And users can duplicate the type of column, beam and brace.

FreeFormElement

Subject:FreeFormElement creation
Skill Level:Medium
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.BooleanOperationsUtils
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.CurveLoop
Autodesk.Revit.DB.FreeFormElement
Autodesk.Revit.UI.IExternalCommand
Summary:Use geometry tools to create a new family which has a cutout from an existing element.

GenerateFloor

Subject:Generate a floor using the closed outline made by a selection of walls.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.FloorType
Autodesk.Revit.DB.Level
Summary:This sample demonstrates how to generate a floor using the closed outline made by a selection of walls.

GenericStructuralConnection

Subject:Generic structural connection
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:2017.0
Classes:Autodesk.Revit.DB.ElementTransformUtils
Autodesk.Revit.DB.ExtensibleStorage.Entity
Autodesk.Revit.DB.ExtensibleStorage.Schema
Autodesk.Revit.DB.Structure.StructuralConnectionHandler
Autodesk.Revit.DB.Structure.StructuralConnectionHandlerType
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.ISelectionFilter
Summary:Demonstrates basic Create Read Update Delete operations on a generic / detailed structural connection

BRepBuilderExample

Subject:BRepBuilder usage example
Skill Level:Medium
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2017.0
Classes:Autodesk.Revit.DB.BRepBuilder
Autodesk.Revit.DB.DirectShape
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:Several cases of BRepBuilder usage for constructing Revit geometry using API.

ComputedSymbolGeometry

Subject:ComputedSymbolGeometry
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Analysis;
Autodesk.Revit.DB;
Autodesk.Revit.Document
Autodesk.Revit.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample is to demonstrate how to get computed symbol geometry of a family instance. This project will get various types of geometry information from the family instances in current Revit model and display them in different views by AVF.

EnergyAnalysisModel

Subject:EnergyAnalysisModel
Skill Level:Medium
Category:Analysis
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Analysis;
Autodesk.Revit.DB;
Autodesk.Revit.Document
Autodesk.Revit.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample is to demonstrate how to create use EnergyAnalysisModel. This project will get energy analytical model according to the defined options and show faces structure by a tree view.

GeometryCreation_BooleanOperation

Subject:Geometry Creation & Geometric Boolean Operation
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Analysis;
Autodesk.Revit.DB;
Autodesk.Revit.Document
Autodesk.Revit.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample is to demonstrate how to create the geometry solid using GeometryCreationUtils and operate the geometric boolean operation using BooleanOperationUtils. This project will create a constructive solid geometry - CSG tree (http://en.wikipedia.org/wiki/Constructive_solid_geometry, http://en.wikipedia.org/wiki/File:Csg_tree.png) and show it in a new view by AVF – Analysis Visualization Framework.

ProximityDetection_WallJoinControl

Subject:Proximity Detection and Wall Join Control
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB;
Autodesk.Revit.Document
Autodesk.Revit.Element
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI;
Summary:This sample is to demonstrate how to “find columns in wall”, “find elements blocking egress”, “find walls (nearly joined to) end of walls” and “check walls join/disjoin states” by ElementIntersectsSolidFilter, ElementIntersectsElementFilter and WallUtils.

UpdateExternallyTaggedBRep

Subject:UpdateExternallyTaggedBRep usage example.
Skill Level:Medium
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2022.0
Classes:Autodesk.Revit.DB.BRepBuilder
Autodesk.Revit.DB.DirectShape
Autodesk.Revit.DB.ExternalGeometryId
Autodesk.Revit.DB.ExternallyTaggedBRep
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how UpdateExternallyTaggedBRep can be used for creation and updating the geometry using DirectShape/DirectShapeType.

GetSetDefaultTypes

Subject:Get and set default family or element types
Skill Level:Medium
Category:Elements, Families
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.DB ElementType.IsValidDefaultFamilyType
Autodesk.Revit.DB.Docuemnt.GetDefaultFamilyTypeId
Autodesk.Revit.DB.Docuemnt.SetDefaultFamilyTypeId
Autodesk.Revit.DB.Document.GetDefaultElementTypeId
Autodesk.Revit.DB.Document.IsDefaultElementTypeIdValid
Autodesk.Revit.DB.Document.IsDefaultFamilyTypeIdValid
Autodesk.Revit.DB.Document.SetDefaultElementTypeId
Summary:GetSetDefaultTypes is a sample addin that demonstrates how to get and set default family and element types.

GridCreation

Subject:Create Grid.
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to create grids and modify grids’ properties through Revit API.

HelloRevit

Subject:Add ExternalCommand to the Revit user interface.
Skill Level:Beginning
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.TaskDialog
Summary:Shows how a basic ExternalCommand can be added to the Revit user interface. It uses a Revit task dialog to communicate information to the interactive user.

ImportExport

Subject:Import and Export data.
Skill Level:High
Category:Data Exchange
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.DGNExportOptions
Autodesk.Revit.DB.DWFExportOptions
Autodesk.Revit.DB.DWFXExportOptions
Autodesk.Revit.DB.DWGExportOptions
Autodesk.Revit.DB.DWGImportOptions
Autodesk.Revit.DB.DXFExportOptions
Autodesk.Revit.DB.FBXExportOptions
Autodesk.Revit.DB.GBXMLExportOptions
Autodesk.Revit.DB.GBXMLImportOptions
Autodesk.Revit.DB.ImageExportOptions
Autodesk.Revit.DB.ImageImportOptions
Autodesk.Revit.DB.InventorImportOptions
Autodesk.Revit.DB.PDFExportOptions
Autodesk.Revit.DB.SATExportOptions
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to export current project to dwg, sat,dxf, dwf(x), gbxml, fbx, dgn, pdf or image files and how to import a dwg, image, GBXML or Inventor file into Revit.

InCanvasControlAPI

Subject:In-Canvas controls
Skill Level:Beginning
Category:Annotation, Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2020.0
Classes:.
Autodesk.Revit.UI.InCanvasControlData
Autodesk.Revit.UI.ITemporaryGraphicsHandler
Autodesk.Revit.UI.TemporaryGraphicsCommandData
Autodesk.Revit.UI.TemporaryGraphicsManager
Summary:This sample will demonstrate how to create, keep track of and handle clicks on In-Canvas controls.

InPlaceMembers

Subject:Display In-place Familyinstance properties.
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get the In-place Family instance and its properties in the current document of Revit.

InvisibleParam

Subject:Create shared parameters.
Skill Level:Medium
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.InstanceBinding
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to use share parameter file to create share parameters and how to bind share parameters and instance.

Journaling

Subject:Journaling mechanism
Skill Level:Medium
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.Collections.StringStringMap
Autodesk.Revit.DB.Creation
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how an external application can be incorporated into the journaling mechanism.

LevelsProperty

Subject:Display and Create Levels.
Skill Level:Beginning
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Level
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get all the levels in a document, and how to create or delete a level and set its properties.

Loads

Subject:Operate Load Case, Load Nature, Load Usage and Load Combination.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Structure.LoadCase
Autodesk.Revit.DB.Structure.LoadCombination
Autodesk.Revit.DB.Structure.LoadNature
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to operate Load Case, Load Nature, Load Usage and Load Combination.

DistanceToPanels

Subject:Divided surface panel measurement
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.DividedSurface
Autodesk.Revit.DB.Panel
Autodesk.Revit.UI.IExternalCommand
Summary:Measure the distance from a selected object to all divided surface panels. Store this value for each panel in an instance parameter Distance.

DividedSurfaceByIntersects

Subject:Divide surface with intersects.
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.CurtainSystem
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates 2 main features:1. How to add intersects to DividedSurface.2. How to remove intersects to DividedSurface.

ManipulateForm

Subject:Add profile/edge to a form and manipulate edges/profiles of the form
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.ReferenceArray
Autodesk.Revit.DB.ReferenceArrayArray
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to create a simple form and add profile/edge to the form and how to move, rotate scale and delete the existing/added profile/edge.

MeasurePanelArea

Subject:Divided surface panel measurement and modification
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.DividedSurface
Autodesk.Revit.DB.Panel
Autodesk.Revit.UI.IExternalCommand
Summary:Measure the area of curtain panels in divided surfaces. Identify panels with area greater than and less than user-specified values. A text file is created in the same folder as the sample DLL file listing the area and element ID of every panel.

NewForm

Subject:Create Form
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Form
Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to create form through Revit API

PanelEdgeLengthAngle

Subject:Divided surface panel measurement
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.DividedSurface
Autodesk.Revit.DB.Panel
Autodesk.Revit.UI.IExternalCommand
Summary:Measure the edge length and angle of curtain panels in divided surfaces. Save the length and angle data to the instance parameters of curtain panels.

ParameterValuesFromImage

Subject:Set parameter values based on image data
Skill Level:Advanced
Category:Massing
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.DividedSurface
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
System.Drawing.Bitmap
Summary:Compute a grayscale value for each pixel in an image file. Use this value to set a parameter that will change the model’s geometry.

PointCurveCreation

Subject:Reference point and Curve By Point creation
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.CurveByPoints
Autodesk.Revit.DB.Form
Autodesk.Revit.DB.PointOnEdge
Autodesk.Revit.DB.ReferencePoint
System.IO.StreamReader
Summary:Use equations and external data files to create massing geometry

MaterialProperties

Subject:Display Material Properties.
Skill Level:Medium
Category:Materials
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.Parameter
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get the material physical properties of a selected beam, column or brace, how to change the material type of the selected beam and how to change the unit weight of a selected beam, column or brace.

MaterialQuantities

Subject:Material quantity data extraction
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.ElementClassFilter
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.LogicalAndFilter
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.Transaction
System.Collections.Generic.Dictionary
System.Diagnostics.Process
Summary:Outputs an analysis of the materials that make up walls, floors, and roofs, and displays the output in Excel.

ModelessForm_ExternalEvent

Subject:Show Modeless Form (External Event)
Skill Level:Medium
Category:Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB;
Autodesk.Revit.UI.Events;
Autodesk.Revit.UI;
Summary:This sample shows how to utilize an External Event object in order to communicate with the Revit API from an external modeless dialog.

ModelessForm_IdlingEvent

Subject:Show Modeless Form (Idling Event)
Skill Level:Medium
Category:Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB;
Autodesk.Revit.UI.Events;
Autodesk.Revit.UI;
Summary:This sample shows how to utilize the Idling event in order to communicate with the Revit API from an external, modeless dialog.

ModelLines

Subject:Display and Create ModelLines.
Skill Level:Beginning
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.2
Classes:Autodesk.Revit.Creation.Application
Autodesk.Revit.DB.Arc
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.ModelArc
Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.DB.ModelCurveArray
Autodesk.Revit.DB.ModelLine
Autodesk.Revit.DB.SketchPlane
Autodesk.Revit.DB.XYZ
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to get model lines of all kinds and how to create model lines using Revit API.

MoveLinear

Subject:Move an element which is based on Line.
Skill Level:Beginning
Category:Elements, Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.Creation.Application
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.LocationCurve
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to move element which is based on a Line.

MultiplanarRebar

Subject:Create multi-planar Rebar.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2012.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.ExternalDefinition
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.RebarShape
Autodesk.Revit.DB.Structure.RebarShapeDefinition
Autodesk.Revit.DB.Structure.RebarShapeDefinitionBySegments
Autodesk.Revit.DB.Structure.RebarShapeMultiplanarDefinition
Autodesk.Revit.DB.Structure.StructuralType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample is to demo multiplanar rebar creation in API. A user scenario of multiplanar rebar is corbel ‘s reinforcement. This sample is to reinforce sloped corbel(s).

MultistoryStairs

Subject:MultistoryStairs
Skill Level:Medium
Category:Elements
Type:ExternalApplication,
Revit Platform:All
First Released For:2018.0
Classes:Autodesk.Revit.DB.Architecture.MultistoryStairs
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.ISelectionFilter
Summary:MultistoryStairs editing utilities, including creating multistory stairs by a standard stairs, adding/removing stairs by picking level.

WorkThread

Subject:Sample of a multi-htreaded application utilizing the Idling event
Skill Level:Medium
Category:Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.DB.Analysis;
Autodesk.Revit.DB.Events;
Autodesk.Revit.UI.Events;
Autodesk.Revit.UI.Selection;
Autodesk.Revit.UI;
Summary:This sample shows how to utilize the Applicaiton.Idling event in order to communicate with the Revit API from an external work thread.

NetworkPressureLossReport

Subject:Add ExternalCommand to the Revit user interface.
Skill Level:Advanced
Category:MEP
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.DB.Analysis.AnalysisDisplayColorSettings
Autodesk.Revit.DB.Analysis.AnalysisDisplayStyle
Autodesk.Revit.DB.Analysis.AnalysisDisplayVectorSettings
Autodesk.Revit.DB.Analysis.AnalysisResultSchema
Autodesk.Revit.DB.Analysis.AnalyssiDisplayLegendSettings
Autodesk.Revit.DB.Analysis.FieldDomainPointsByXYZ
Autodesk.Revit.DB.Analysis.FieldValue
Autodesk.Revit.DB.Analysis.MEPAnalyticalModelData
Autodesk.Revit.DB.Analysis.MEPAnalyticalNode
Autodesk.Revit.DB.Analysis.MEPAnalyticalSegment
Autodesk.Revit.DB.Analysis.MEPNetworkIterator
Autodesk.Revit.DB.Analysis.MEPNetworkSegementId
Autodesk.Revit.DB.Analysis.MEPNetworkSegmentData
Autodesk.Revit.DB.Analysis.SpatialFieldManager
Autodesk.Revit.DB.ConnectorDomainType
Autodesk.Revit.DB.FabricationService
Autodesk.Revit.DB.ForgeTypeId
Autodesk.Revit.DB.FormatOptions
Autodesk.Revit.DB.MEPSystem
Autodesk.Revit.DB.OverrideGraphicSettings
Autodesk.Revit.DB.SpecTypeId
Autodesk.Revit.DB.UnitFormatUtils
Autodesk.Revit.DB.UnitUtils
Autodesk.Revit.DB.View
Autodesk.Revit.UI.IExternalCommand
Summary:This addin sample shows how to access the MEP analytical model data and traverse the network. The flow and pressure loss results are exported to a csv file or displayed in Analysis Visualization Framework (AVF).

NewHostedSweep

Subject:Create hosted sweep (Fascia, Gutter, and SlabEdge).
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Architecture.Fascia
Autodesk.Revit.DB.Architecture.FasciaType
Autodesk.Revit.DB.Architecture.Gutter
Autodesk.Revit.DB.Architecture.GutterType
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.HostedSweep
Autodesk.Revit.DB.HostedSweepType
Autodesk.Revit.DB.Reference
Autodesk.Revit.DB.SlabEdge
Autodesk.Revit.DB.SlabEdgeType
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to create hosted sweep (includes Fascia, Gutter and SlabEdge), and how to modify their properties.

NewOpenings

Subject:Create openings.
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.Creation.Application
Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Opening
Autodesk.Revit.DB.Wall
Autodesk.Revit.DB.XYZ
Summary:Shows how to create Openings by Revit API.

NewPathReinforcement

Subject:Create PathReinforcement.
Skill Level:Medium
Category:Geometry, Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2008.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.Face
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Structure.PathReinforcement
Autodesk.Revit.DB.Structure.PathReinforcementType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create PathReinforcement by API.

NewRebar

Subject:Create Rebar and ReabrShapes.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.ExternalDefinition
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.RebarShape
Autodesk.Revit.DB.Structure.RebarShapeDefinition
Autodesk.Revit.DB.Structure.RebarShapeDefinitionByArc
Autodesk.Revit.DB.Structure.RebarShapeDefinitionBySegments
Autodesk.Revit.DB.Structure.StructuralType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to create rebar via NewRebar (RebarShape rebarShape, RebarBarType rebarType, Element host, XYZ origin, XYZ xVec, XYZ yVec) and how to customize RebarShape (include straight segment and arc shape).

NewRoof

Subject:Create footprint and extrusion roof.
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.ExtrusionRoof
Autodesk.Revit.DB.FootPrintRoof
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.RoofType
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates four main features:1. How to create a new footprint roof.2. How to create an extrusion roof.3. How to edit an existed footprint roof.4. How to edit an existed extrusion roof.

ObjectViewer

Subject:Show element's geometry,get and set its parameter value.
Skill Level:Advanced
Category:Views
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates two main features:1. How to get physical or analytical model of selected element.2. How to get and set parameter’s value of selected element.

Openings

Subject:Display Opening informations.
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Opening
Autodesk.Revit.UI.IExternalCommand
Summary:Shows how to get geometry profile and properties of an opening and how to add x model lines to opening bounding box.

PanelSchedule

Subject:Show how the Panel Schedule API works.
Skill Level:Beginning
Category:Data Exchange
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2011.0
Classes:Autodesk.Revit.DB.Electrical.PanelScheduleSheetInstance
Autodesk.Revit.DB.Electrical.PanelScheduleView
Autodesk.Revit.DB.SectionType
Autodesk.Revit.DB.TableSectionData
Summary:This sample contains 3 external commands to show how to use the Panel Schedule API:1. PanelScheduleExport - gets the panel schedule view data via the API and generates a CSV file or a HTML page for it.2. InstanceViewCreation - Create a panel schedule view instance for an electrical panel you selected.3. SheetImport - Place the panel schedule view(s) on a sheet view.

ParameterUtils

Subject:Display parameters.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Parameter
Summary:This sample demonstrates how to get the parameters of a Revit element.

PathOfTravel

Subject:Create PathOfTravel.
Skill Level:Medium
Category:Annotation, Elements, Views
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2020.0
Classes:Autodesk.Revit.DB.Analysis.PathOfTravel
Autodesk.Revit.DB.Architecture.Door
Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Creation.Document
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrated how to create PathOfTravel elements from room(s) to door(s) in a plan view.

PathReinforcement

Subject:Display PathReinforcement informations.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.DB.Structure.PathReinforcement
Autodesk.Revit.DB.Structure.RebarBarType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to retrieve curves, profile and properties of path reinforcement object.

PerformanceAdviserControl

Subject:View, select, and run PerformanceAdviser rules.
Skill Level:Beginning
Category:Elements
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.IPerformanceAdviserRule
Autodesk.Revit.DB.PerformanceAdviser
Summary:This program demonstrates the usage the PerformanceAdviser class and related APIs.

PhaseSample

Subject:Filter elements by their phases.
Skill Level:Beginning
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.Elements.Phase
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to use phase to filter elements and how to highlight filtered elements by Execute method parameters.

PhysicalProp

Subject:Display physical property.
Skill Level:Beginning
Category:Materials, Parameters
Type:ExternalCommand,
Revit Platform:Structure
First Released For:8.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
Summary:This sample demonstrates how to get the physical material of a column or beam.

PlaceFamilyInstanceByFace

Subject:Create family instance on face.
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.DB.Face
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.Options
Autodesk.Revit.DB.Solid
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create family instance on face.

PlacementOptions

Subject:Interactive placement of family instance via options
Skill Level:Medium
Category:Basics, Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2017.0
Classes:Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.UI.FaceBasedPlacementType
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.PromptForFamilyInstancePlacementOptions
Autodesk.Revit.UI.SketchGalleryOptions
Autodesk.Revit.UI.UIDocument
Summary:This sample demonstrates how to place the family instance via options.

PointCloudEngine

Subject:Point cloud engine examples.
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.PointCloudInstance
Autodesk.Revit.DB.PointClouds.CloudPoint
Autodesk.Revit.DB.PointClouds.IPointCloudAccess
Autodesk.Revit.DB.PointClouds.IPointCloudEngine
Autodesk.Revit.DB.PointClouds.IPointSetIterator
Autodesk.Revit.DB.PointClouds.PointCloudFilter
Autodesk.Revit.DB.PointCloudType
Summary:Offers a variety of examples for custom point cloud engines.

PostCommandWorkflow

Subject:Demonstration of use of PostCommand() to drive user workflows
Skill Level:Advanced
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.DocumentSavingEventArgs
Autodesk.Revit.UI.AddInCommandBinding
Autodesk.Revit.UI.Events.BeforeExecutedEventArgs
Autodesk.Revit.UI.Events.TaskDialogShowingEventArgs
Autodesk.Revit.UI.IExternalEventHandler
Autodesk.Revit.UI.PushButton
Autodesk.Revit.UI.RevitCommandId
Autodesk.Revit.UI.TaskDialog
Autodesk.Revit.UI.UIApplication
Summary:Use PostCommand() as a part of a customized workflow. When a document does not have a new revision added, prompt to add one before saving.

PowerCircuit

Subject:Operate power circuits.
Skill Level:Beginning
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2009.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to operate power circuits.

ProjectInfo

Subject:Display project information.
Skill Level:Beginning
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Analysis.EnergyDataSettings
Autodesk.Revit.DB.Analysis.gbXMLBuildingType
Autodesk.Revit.DB.Analysis.gbXMLServiceType
Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.Construction
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Mechanical.MEPBuildingConstruction
Autodesk.Revit.DB.ProjectInfo
Autodesk.Revit.DB.ProjectLocation
Autodesk.Revit.DB.ProjectPosition
Summary:Demonstrates how to manipulate project information.

ReadonlySharedParameters

Subject:Read-only Shared Parameters
Skill Level:Medium
Category:Parameters
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.ElementParameterFilter
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.FilterRule
Autodesk.Revit.DB.Parameter
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:

RebarContainerAnyShapeType

Subject:Create Rebar Container Object.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2016.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.StructuralType
Autodesk.Revit.UI.IExternalCommand
Summary:Show how to create a Rebar Container in a concrete element (Beam or Column) which does not currently host reinforcement.

RebarFreeForm

Subject:Rebar Free Form
Skill Level:Advanced
Category:Structure
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2018.0
Classes:AddSharedParams
Application
Command
CurveElementRegenUpdater
RebarUpdateServer
TargetFace
Summary:External command to create a Rebar FreeForm element and external application to implement the custom server used to regenerate the rebar geometry based on constraints

ReferencePlane

Subject:Create ReferencePlane.
Skill Level:Medium
Category:Basics, Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.Mesh
Autodesk.Revit.DB.Options
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Wall
Summary:This sample shows how to create Reference Plane by Revit API.

Reinforcement

Subject:Create Rebars.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.1
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.StructuralType
Autodesk.Revit.UI.IExternalCommand
Summary:Show how to create Rebar in concrete element (Beam or Column) which does not have any reinforcement.

RevitCommands

Subject:Simple Revit commands.
Skill Level:Beginning
Category:Basics, Families
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.ApplicationServices.ApplicationServices.Application
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.Instance
Autodesk.Revit.DB.Location
Autodesk.Revit.DB.Mesh
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Solid
Summary:These sample contains 5 commands, demonstrates1. How to load family from family file.2. How to load family symbol from family file.3. How to access the selection set.4. How to get and set library paths in Revit.5. How to retrieve data from selected elements.

Ribbon

Subject:Create customized Ribbon by Ribbon API
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.PulldownButton
Autodesk.Revit.UI.PulldownButtonData
Autodesk.Revit.UI.PushButton
Autodesk.Revit.UI.PushButtonData
Autodesk.Revit.UI.RibbonPanel
Summary:This sample demonstrates how to create customized ribbon for Add-In and how to create different types of ribbon items (RibbonPanel, PushButton, PulldownButton, Stackable Buttons, RadioButtonGroup, TextBox, SplitButton).

RoofsRooms

Subject:Geometry checking for Roofs and Rooms (Spaces).
Skill Level:Medium
Category:Rooms/Spaces
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2009.1
Classes:Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Architecture.RoomFilter
Autodesk.Revit.DB.BuiltInCategory
Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.Face
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.LogicalOrFilter
Autodesk.Revit.DB.Mechanical.Space
Autodesk.Revit.DB.Mechanical.SpaceFilter
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.SpatialElementBoundarySubface
Autodesk.Revit.DB.SpatialElementGeometryCalculator
Autodesk.Revit.DB.SpatialElementGeometryResults
Summary:This sample demonstrates how to check whether a Room/Space has a bounding Roof.

Rooms

Subject:Room data retrieval and modification.
Skill Level:Beginning
Category:Rooms/Spaces
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:9.1
Classes:Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Architecture.RoomTag
Autodesk.Revit.DB.Creation.Document
Autodesk.Revit.DB.Parameters.BuiltInParameter
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get Room’s information (Number, Area, Department, etc), add room tags and change Room numbers.

RoomSchedule

Subject:Room creation and modification; Excel data import and export.
Skill Level:High
Category:Rooms/Spaces
Type:ExternalApplication, ExternalCommand,
Revit Platform:Architecture
First Released For:2008.2
Classes:Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Category
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Events.DocumentClosed
Autodesk.Revit.DB.Events.DocumentSaving
Autodesk.Revit.DB.Events.DocumentSavingAs
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.Parameters.BuildInParameter
Autodesk.Revit.DB.Parameters.Definition
Autodesk.Revit.DB.Parameters.DefinitionGroup
Autodesk.Revit.DB.Parameters.InstanceBinding
Autodesk.Revit.DB.Phase
Autodesk.Revit.UI.IExternalCommand
System.Data.DataTable
System.Data.OleDb.OleDbCommand
System.Data.OleDb.OleDbConnection
Summary:This sample demonstrates: how to retrieve spread sheet data, how to create rooms without placing them and how to update spreadsheet data with data of rooms mapped to.

RotateFramingObjects

Subject:Rotate framing objects.
Skill Level:Medium
Category:Basics, Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.Creation.Application
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
Autodesk.Revit.Structural.Enums.StructuralType
Summary:Demonstrates how to rotate beams, braces or structural columns around their directional axis rather than project axis.

RoutingPreferenceTools

Subject:Tools for routing preferences
Skill Level:Medium
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2013.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.DB.Plumbing
Summary:This sample contains three commands.[Note] – all samples only work properly when created from MEP document templates, such as “Systems-Default.rte.”Routing Preference AnalysisSubject: Analyze the routing preferences of a given pipe type to check for common problems.Summary: This sample demonstrates how to use the routing preferences API to look at all rules and criteria for a given PipeType and check for several common problems, including:The first rule in a group (e.g. “Elbows”) has a range of “None.”All rules in a group have a range of “None.”A preferred junction type of Tee or Tap is set, but no fittings of that type are assigned to rules.A segment’s size range is not fully covered by the sizes ranges covered by elbow, junction, or cross fittings.

RvtSamples

Subject:Add menu items of samples to Revit.
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.UI.PulldownButton
Autodesk.Revit.UI.PulldownButtonData
Autodesk.Revit.UI.PushButton
Autodesk.Revit.UI.PushButtonData
Autodesk.Revit.UI.RibbonPanel
Summary:This sample integrates all other samples excluding ExternalApplications into a panel named “RvtSamples” under menu “Add-Ins”.

SampleCommandsSteelElements

Subject:Sample commands for steel elements
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:2019.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementId
Autodesk.Revit.DB.Reference
Autodesk.Revit.DB.Steel.SteelElementProperties
Autodesk.Revit.DB.Structure.StructuralConnectionHandler
Autodesk.Revit.DB.Structure.StructuralConnectionHandlerType
Autodesk.Revit.DB.Transaction
Autodesk.Revit.UI.Events
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:Sample commands for steel elements. These API samples allow for creation, modification and deletion of steel elements.

ScheduleAutomaticFormatter

Subject:Schedule formatting tool
Skill Level:High
Category:Views
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.ExtensibleStorage.Entity
Autodesk.Revit.DB.ExtensibleStorage.ExtensibleStorageFilter
Autodesk.Revit.DB.ExtensibleStorage.Schema
Autodesk.Revit.DB.IUpdater
Autodesk.Revit.DB.ScheduleDefinition
Autodesk.Revit.DB.TableCellStyle
Autodesk.Revit.DB.TableCellStyleOverrideOptions
Autodesk.Revit.DB.ViewSchedule
Summary:Automatically formats alternating columns of a schedule to have a different background color.

ScheduleCreation

Subject:ScheduleAPI
Skill Level:Beginning
Category:Views
Type:ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB.SchedulableField
Autodesk.Revit.DB.ScheduleDefinition
Autodesk.Revit.DB.ScheduleField
Autodesk.Revit.DB.ScheduleFieldId
Autodesk.Revit.DB.ScheduleFilter
Autodesk.Revit.DB.ScheduleSheetInstance
Autodesk.Revit.DB.ScheduleSortGroupField
Autodesk.Revit.DB.ViewSchedule
Autodesk.Revit.UI.IExternalCommand
Summary:This sample introduces how to create a view schedule and how to show its data on a sheet.

ScheduleToHTML

Subject:Schedules
Skill Level:Medium
Category:Views
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.TableCellStyle
Autodesk.Revit.DB.TableData
Autodesk.Revit.DB.TableMergedCell
Autodesk.Revit.DB.TableSectionData
Autodesk.Revit.DB.ViewSchedule
Summary:Export Schedule to formatted HTML

Selections

Subject:Selections
Skill Level:Beginning
Category:Selection
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Reference
Autodesk.Revit.Exceptions.OperationCanceledException
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.ISelectionFilter
Autodesk.Revit.UI.Selection.ObjectSnapTypes
Autodesk.Revit.UI.Selection.ObjectType
Autodesk.Revit.UI.Selection.Selection
Summary:This sample will demonstrate how to perform selection operations.

ShaftHolePuncher

Subject:Create all Kinds Opening.
Skill Level:High
Category:Elements, Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.Face
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Instance
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.Opening
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create single or Shaft Opening on a wall, floor or beam.

SharedCoordinateSystem

Subject:Get and set project's place,location.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.CitySet
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.SiteLocation
Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get place, location of project, and change their values.

SheetToView3D

Subject:Click on a ViewPlan viewport on a sheet to create a new perspective 3D view with its camera at that point in the model
Skill Level:Advanced
Category:View Transforms
Type:ExternalCommand,
Revit Platform:All
First Released For:2023.0
Classes:Autodesk.Revit.DB.Curveloop
Autodesk.Revit.DB.Plane
Autodesk.Revit.DB.Transform
Autodesk.Revit.DB.TransformWithBoundary
Autodesk.Revit.DB.View
Autodesk.Revit.DB.View3D.CreatePerspective
Autodesk.Revit.DB.Viewport
Autodesk.Revit.DB.ViewSheet
Summary:This sample demonstrates how to use the View and Viewport transforms to map a point on a sheet to a location in the 3D model. It also demonstrates how to use TransformWithBoundary to inspect the view crop regions if the view crop has been broken (split) into many pieces.

SinePlotter

Subject:A simple sine curve demonstration
Skill Level:Medium
Category:Families, Geometry
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:Array a series of prism family instances over a sine curve

SlabProperties

Subject:Slab properties retrieval.
Skill Level:Beginning
Category:Elements, Parameters
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Structural.CompoundStructureLayer
Autodesk.Revit.DB.Structural.CompoundStructureLayerArray
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get Slab’s properties which consist of Level, Type Name, Span Direction and Slab’s Layers information (Material Name, Thickness, Young Modulus X, Y and Z).

SlabShapeEditing

Subject:Create SlabShapeVertex and SlabShapeCrease.
Skill Level:Medium
Category:Elements, Geometry
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2009.0
Classes:Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.SlabShapeCrease
Autodesk.Revit.DB.SlabShapeCreaseArray
Autodesk.Revit.DB.SlabShapeCreaseArrayIterator
Autodesk.Revit.DB.SlabShapeEditor
Autodesk.Revit.DB.SlabShapeVertex
Summary:This sample demonstrates how to create SlabShapeVertex and SlabShapeCrease, and then use them to edit slab’s shape.

SolidSolidCut

Subject:Solid-Solid Cut and Uncut.
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.SolidSolidCutUtils
Autodesk.Revit.IExternalCommand
Summary:Shows how to use Solid-Solid Cut and Uncut.

SpanDirection

Subject:Date retrieval for structural Floor (Slab).
Skill Level:Beginning
Category:Elements, Parameters
Type:ExternalCommand,
Revit Platform:Structure
First Released For:8.1
Classes:Autodesk.Revit.DB.ElementArray
Autodesk.Revit.DB.ElementArrayIterator
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Floor
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get span direction and span direction symbols of structural Floor (Slab).

SpotDimension

Subject:Display Spot Dimensions.
Skill Level:Beginning
Category:Annotation
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.SpotDimension
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to retrieve all the spot dimensions and theirs properties in all views of Revit document.

StairsAutomation

Subject:Stairs creation
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2013.0
Classes:Autodesk.Revit.DB.Architecture.Stairs
Autodesk.Revit.DB.Architecture.StairsEditScope
Autodesk.Revit.DB.Architecture.StairsLanding
Autodesk.Revit.DB.Architecture.StairsRun
Autodesk.Revit.UI.IExternalCommand
Summary:A utility sample that creates a series of stairs, stairs runs and stairs landings configurations based upon predefined rules and parameters.

StructSample

Subject:Column creation and placing.
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Geometry.Line
Autodesk.Revit.DB.Geometry.UV
Autodesk.Revit.DB.Geometry.XYZ
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Symbols.FamilySymbol
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to place a set of columns in the selected wall.

StructuralLayerFunction

Subject:Function retrieval for structural layers.
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Structural.CompoundStructureLayer
Autodesk.Revit.DB.Structural.Enum.CompoundStructureLayerFunction
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to retrieve the function of each structural layer of selected floor in order from outside to inside in a dialog box.

TagBeam

Subject:Create tags for beam or rebar; Create text.
Skill Level:Beginning
Category:Annotation
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.IndependentTag
Autodesk.Revit.DB.LocationCurve
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.TextNote
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create tags at the start and end of selected beams, how to create a rebar tag at the end of the first curve of selected rebar and how to create a text.

TestFloorThickness

Subject:Change the thickness of floor.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.FloorType
Summary:Retrieve and change floor thickness.

TestWallThickness

Subject:Change the thickness of wall.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Wall
Autodesk.Revit.DB.WallType
Summary:Retrieve and change wall thickness.

Toposolid

Subject:Toposolid API Samples
Skill Level:Beginning
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2020.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
The blue texts are for your reference, please update them and change the font to normal.
Summary:API samples for toposolid related features.

TransactionControl

Subject:How to deal with transaction group, transaction and sub transaction.
Skill Level:Medium
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.SubTransaction
Autodesk.Revit.DB.Transaction
Autodesk.Revit.DB.TransactionGroup
Autodesk.Revit.Document
Summary:This sample demonstrates how to use transaction group, transaction and sub transaction.

TraverseSystem

Subject:Traverse a well-connected mechanical or piping system in the direction of flow.
Skill Level:Medium
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2010.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to traverse a well-connected mechanical or piping system in the direction of flow and dump the traversal into an XML file.

Truss

Subject:Create truss, edit truss Profile and Members.
Skill Level:Medium
Category:Geometry, Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2009.0
Classes:Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.Structure.Truss
Autodesk.Revit.DB.Structure.TrussType
Autodesk.Revit.DB.Strucure.TrussMemberInfo
Autodesk.Revit.DB.ViewPlan
Summary:This sample demonstrates how to create a truss and modify its truss members and profile.

TypeSelector

Subject:Wall types retrieval.
Skill Level:Beginning
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.ElementId
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.FamilySymbolSet
Autodesk.Revit.DB.WallType
Autodesk.Revit.DB.WallTypeSet
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to retrieve all types in project of one specific family (wall) and how to change the type of one family instance or wall.

UIAPI

Subject:API UI Usage.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.UI.ContextualHelp
Autodesk.Revit.UI.TabbedDialogExtension
Autodesk.Revit.UI.UIApplication
Summary:This sample demonstrates how to use API UI abilities.

Units

Subject:Units API
Skill Level:Beginning
Category:Basics, Data Exchange
Type:ExternalCommand,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.FormatOptions
Autodesk.Revit.DB.UnitFormatUtils
Autodesk.Revit.DB.Units
Autodesk.Revit.DB.UnitUtils
Autodesk.Revit.UI.IExternalCommand
Summary:Add a command which lists all the units in the current project and displays their format information, users can set the format options of each unit type; Display the decimal symbol type, digit grouping symbol, digit grouping amount of current project’s units, users could set them.

VersionChecking

Subject:Version information of Revit application.
Skill Level:Beginning
Category:Basics, Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get Revit version information: product name, product version and product build number.

AnalyticalViewer

Subject:View analytical model wireframe.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:Structure
First Released For:8.0
Classes:Autodesk.Revit.DB.ContFooting
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.DB.Wall
Summary:This program demonstrates the usage of a structural analytical model. This sample uses a helper program RevitViewer.

ElementViewer

Subject:View element wireframe.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.GeometryObject
Summary:This program demonstrates the usage of element's geometry. This sample uses a helper program RevitViewer.

RevitViewer

Subject:View geometry information.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.IExternalCommand
Summary:A simple sample to help viewing the geometry information which obtained by Revit API.

RoomViewer

Subject:View room boundary wireframe.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:8.0
Classes:Autodesk.Revit.DB.Architecture.BoundarySegmentArrayArray
Autodesk.Revit.DB.Architecture.Room
Summary:This sample demonstrates the usage of room boundary and uses a helper program RevitViewer.

ViewPrinter

Subject:Print the printable views.
Skill Level:Medium
Category:Data Exchange
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Document.PrintManager
Autodesk.Revit.DB.PrintRange
Autodesk.Revit.DB.PrintSetting
Autodesk.Revit.DB.PrintSetup
Autodesk.Revit.DB.ViewSheetSet
Autodesk.Revit.DB.ViewSheetSetting
Autodesk.Revit.DB.VirtualPrinterType
Summary:This sample demonstrates how to print the printable view and sheets.

ViewTemplateCreation

Subject:Create and configure new view template
Skill Level:Medium
Category:Parameters, Views
Type:ExternalCommand,
Revit Platform:All
First Released For:2020.0
Classes:Autodesk.Revit.DB.BuiltInCategory;
Autodesk.Revit.DB.BuiltInParameter;
Autodesk.Revit.DB.Color;
Autodesk.Revit.DB.Document;
Autodesk.Revit.DB.ElementId;
Autodesk.Revit.DB.FillPatternElement;
Autodesk.Revit.DB.FillPatternTarget;
Autodesk.Revit.DB.FilteredElementCollector;
Autodesk.Revit.DB.OverrideGraphicSettings;
Autodesk.Revit.DB.Transaction;
Autodesk.Revit.DB.View;
Autodesk.Revit.DB.ViewDetailLevel;
Autodesk.Revit.UI.IExternalCommand;
Autodesk.Revit.UI.Result;
Summary:In this sample is showed a process of new view template creation from a regular view and view template settings configuration.

VisibilityControl

Subject:Control visibility by category.
Skill Level:Medium
Category:Views
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Categories
Autodesk.Revit.DB.Document.Settings
Autodesk.Revit.DB.View
Autodesk.Revit.Document
Autodesk.Revit.UI.Selection
Summary:This sample demonstrates how to control visibility by category, and how the API supports the options to pick a single element or pick multiple elements.

WinderStairs

Subject:API Sketched Winder Stairs
Skill Level:Advanced
Category:Elements
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2013.0
Classes:Autodesk.Revit.DB.Arc
Autodesk.Revit.DB.Architecture.Stairs
Autodesk.Revit.DB.Architecture.StairsRun
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.IUpdater
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.StairsEditScope
Autodesk.Revit.DB.Transaction
Autodesk.Revit.DB.Transform
Autodesk.Revit.DB.UpdaterRegistry
Autodesk.Revit.DB.XYZ
Autodesk.Revit.UI.ExternalEvent
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.IExternalEventHandler
Summary:This sample demos the Winder Stairs creation via sketched stairs API. It implemented the single point L-Winder and U-Winder layout algorithms. And also it utilizes the DMU (dynamic model update) framework to regenerate the winder stairs.

\ No newline at end of file +

AddSpaceAndZone

Subject:Create spaces and zones.
Skill Level:Medium
Category:Rooms/Spaces
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Mechanical.Space
Autodesk.Revit.DB.Mechanical.Zone
Autodesk.Revit.DB.Phase
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates three main features:1. How to get all Space elements in a specified level.2. How to get all Zone elements in a specified level.3. How to create Space elements for each closed wall loop or closed space separation.4. How to create a new Zone element in a specified level and phase.5. How to add/remove spaces in a Zone element.

AllViews

Subject:Generate a new sheet that includes all the selected views and edit properties of a selected viewport in a sheet.
Skill Level:Medium
Category:Views
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document.NewViewSheet
Autodesk.Revit.DB.View
Autodesk.Revit.DB.ViewSet
Summary:This sample demonstrates how to generate a new sheet that includes all the selected views. It also demonstrates how to access the properties of a viewport such as LabelLineOffset, LabelLength and Orientation.

DistanceToSurfaces

Subject:Display analysis results in a Revit model using Dynamic Model Update
Skill Level:Advanced
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.Analysis.FieldDomainPointsByUV
Autodesk.Revit.DB.Analysis.FieldValues
Autodesk.Revit.DB.Analysis.SpatialFieldManager
Autodesk.Revit.DB.BoundingBoxUV
Autodesk.Revit.DB.Events.DocumentOpenedEventArgs
Autodesk.Revit.DB.FaceArray
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.LocationPoint
Autodesk.Revit.DB.UpdaterRegistry
Summary:On startup, the external application creates a trigger that will execute when walls, masses, and family instances in the project change. When this occurs, Revit calculates the distance from a family instance (sphere.rfa) to several points on each face. These distances are used as values for the analysis visualization display.

MultithreadedCalculation

Subject:Analysis Visualization Framework
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Analysis.FieldDomainPointsByUV
Autodesk.Revit.DB.Analysis.FieldValues
Autodesk.Revit.DB.Analysis.SpatialFieldManager
Autodesk.Revit.DB.UpdaterRegistry
System.Threading.Thread
Summary:A combination of Analysis Visualization Framework, multi-threading, Revit’s Idling event, and Dynamic Model Update to simulate how analysis results can be periodically updated during computation and re-started when the Revit model changes.

SpatialFieldGradient

Subject:Display analysis results in a Revit model
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.Analysis.AnalysisDisplayColoredSurfaceSettings
Autodesk.Revit.DB.Analysis.AnalysisDisplayColorSettings
Autodesk.Revit.DB.Analysis.AnalysisDisplayLegendSettings
Autodesk.Revit.DB.Analysis.AnalysisDisplayStyle
Autodesk.Revit.DB.Analysis.FieldDomainPointsByUV
Autodesk.Revit.DB.Analysis.FieldValues
Autodesk.Revit.DB.Analysis.SpatialFieldManager
Autodesk.Revit.DB.BoundingBoxUV
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.TextNoteType
Autodesk.Revit.UI.Selection.Selection
Summary:Select a face and display numeric data on that face


APIAppStartup

Subject:Launch an external application.
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.UI.IExternalApplication
Summary:This sample demonstrates how to launch an external application when Revit starts and closes.

AppearanceAssetEditing

Subject:Edit appearance asset properties via a small control dialog
Skill Level:Medium
Category:Materials
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2018.1
Classes:Autodesk.Revit.DB.AppearanceAssetElement
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.Visual.AppearanceAssetEditScope
Autodesk.Revit.DB.Visual.AssetPropertyBoolean
Autodesk.Revit.DB.Visual.AssetPropertyDoubleArray4d
Summary:This sample demonstrates basic usage of the AppearanceAssetEditScope and AssetProperty classes to change the value of an asset property in a given material.

ArchSample

Subject:Export data to Excel.
Skill Level:Medium
Category:Data Exchange
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.Collections.Map
Autodesk.Revit.Collections.MapIterator
Autodesk.Revit.Collections.Set
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.UI.IExternalCommand
Summary:This sample exports the contents of an entire project to Microsoft Excel 2003.

AreaReinCurve

Subject:Parameters of AreaReinCurve.
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Structure.AreaReinforcementCurve
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows user how to get AreaReinforcementCurve and change its parameters.

AreaReinParameters

Subject:Parameters of AreaReinforcement and Rebar.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.ElementIterator
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Structure.AreaReinforcementCurve
Autodesk.Revit.DB.Structure.RebarBarType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to use API displays and modifies parameters of AreaReinforcement. And teach user how to get all parameters of Rebar.

AttachedDetailGroup

Subject:Attached Detail Group
Skill Level:Medium
Category:Elements
Type:ExternalApplication,
Revit Platform:All
First Released For:2019.1
Classes:Autodesk.Revit.DB.Group
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to show and hide the attached detail groups of a model group.

AutoRoute

Subject:Route ducts and fittings.
Skill Level:Beginning
Category:MEP
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Connector
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Mechanical.Duct
Autodesk.Revit.DB.Mechanical.MechanicalSystem
Summary:This sample demonstrates how to route a set of ducts and fittings between a base air supply equipment and 2 terminals.

AutoTagRooms

Subject:Auto Tag Rooms.
Skill Level:Medium
Category:Annotation
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2008.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Architecture.RoomTag
Autodesk.Revit.DB.Architecture.RoomTagType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates three main features:1. How to get all rooms in a specified level.2. How to get all room tags in current document.3. How to create new room tags with specified room tag type to auto tag all rooms in a specified level.

AvoidObstruction

Subject:Obstruction detects and resolve.
Skill Level:Medium
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2010.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Mechanical.Duct
Autodesk.Revit.DB.Plumbing.Pipe
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to detect and resolve the obstructions of Pipe with Pipe, Pipe with Beam, or Pipe with Duct.

BeamAndSlabNewParameter

Subject:Shared parameter.
Skill Level:Medium
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.CategorySet
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.DefinitionGroups
Autodesk.Revit.DB.Definitions
Autodesk.Revit.DB.InstanceBinding
Autodesk.Revit.DB.Parameter
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.SelElementSet
Summary:This sample demonstrates how to add a shared instance parameter to beams and slabs, and uses GUID as the parameter’s value. Users also can use the value of the parameter to find the special element.

BoundaryConditions

Subject:Create or retrieve boundary conditions.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.1
Classes:Autodesk.Revit.DB.BoundaryConditions
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows to get BoundaryConditions’ parameters or create BoundaryConditons.

BrowseBindings

Subject:Display shared parameters bindings.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.DB.BindingMap
Autodesk.Revit.DB.CategorySet
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionBindingMapIterator
Autodesk.Revit.DB.ElementBinding
Autodesk.Revit.UI.IExternalCommand
Summary:This sample browses all the shared parameters bindings used in the project.

CapitalizeAllTextNotes

Subject:Capitalize All Text
Skill Level:Beginning
Category:Annotation, Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:2017.0
Classes:Autodesk.Revit.DB.FormattedText
Autodesk.Revit.DB.TextNote
Autodesk.Revit.UI.IExternalCommand
Summary:Capitalizes all the text of all the TextNotes in the project by formatting the text to use 'AllCaps'

CivilAlignments

Subject:Infrastructure alignments
Skill Level:Medium
Category:Annotation, Elements
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2021.1
Classes:Revit.SDK.Samples.CivilAlignments.CS.CivilAlignmentsApp
Revit.SDK.Samples.CivilAlignments.CS.CreateAlignmentStationLabelSetCmd
Revit.SDK.Samples.CivilAlignments.CS.ShowProperties
Summary:Demonstrates the use of API for finding, property querying and annotating of infrastructure alignment elements.

CloudAPISample

Subject:Revit Cloud API Usage Sample
Skill Level:High
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2020.0
Classes:Revit.SDK.Samples.CloudAPISample.CS.Application
Revit.SDK.Samples.CloudAPISample.CS.Coroutine.Coroutine
Revit.SDK.Samples.CloudAPISample.CS.Coroutine.CoroutineScheduler
Revit.SDK.Samples.CloudAPISample.CS.Migration.DefaultMigrationModel
Revit.SDK.Samples.CloudAPISample.CS.Migration.FolderLocation
Revit.SDK.Samples.CloudAPISample.CS.Migration.IMigrationModel
Revit.SDK.Samples.CloudAPISample.CS.Migration.MigrationRule
Revit.SDK.Samples.CloudAPISample.CS.Migration.MigrationToBim360
Revit.SDK.Samples.CloudAPISample.CS.RunSample
Revit.SDK.Samples.CloudAPISample.CS.SampleContext
Revit.SDK.Samples.CloudAPISample.CS.SampleEngine
Revit.SDK.Samples.CloudAPISample.CS.View.ViewMigrationToBim360
Revit.SDK.Samples.CloudAPISample.CS.View.ViewSamplePortal
Summary:This is a sample helps third party developers understand how to use Revit Cloud API

ColorFill

Subject:ColorFill Scheme and Legend creation and modification.
Skill Level:Medium
Category:Annotation
Type:ExternalCommand,
Revit Platform:All
First Released For:2022.0
Classes:Autodesk.Revit.DB.ColorFillScheme
Summary:This sample demonstrates how to create ColorFill scheme, add entries and modify entries for colorFill scheme. It also demonstrates how to create colorFill legend with scheme and modify its appearance.

CompoundStructure

Subject:CompoundStructure
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.CompoundStructure
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.StructuralAsset
Autodesk.Revit.DB.ThermalAsset
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to create a vertical CompoundStructure for walls.

ContextMenu

Subject:ContextMenu
Skill Level:Beginning
Category:UI
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2025.0
Classes:Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.ContextMenu
Autodesk.Revit.UI.IContextMenuCreator
Summary:This sample demonstrates how to create customized context menu for Add-In and how to create different types of menu items (CommandMenuItem, SeparatorItem, SubMenuItem).

ContextualAnalyticalModel

Subject:Contextual Analytical Model
Skill Level:Medium
Category:Elements, Geometry, Structure, UI
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2023.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementId
Autodesk.Revit.DB.Reference
Autodesk.Revit.DB.Structure.AnalyticalMember
Autodesk.Revit.DB.Structure.AnalyticalOpening
Autodesk.Revit.DB.Structure.AnalyticalPanel
Autodesk.Revit.DB.Transaction
Autodesk.Revit.UI.Events
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:Contextual Analytical Model

CreateBeamsColumnsBraces

Subject:Create a frame with beams, columns and braces.
Skill Level:Medium
Category:Parameters, Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document.NewFamilyInstance(…) method
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create a truss model which composes of columns, beams and braces automatically according to the user’s input.

CreateBeamSystem

Subject:Create beamsystem.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.1
Classes:Autodesk.Revit.DB.BeamSystem
Autodesk.Revit.DB.BeamSystem.LayoutRule
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to generate a beam system with the horizontal linear beams selection’s profile.

CreateComplexAreaRein

Subject:Create AreaReinforcement.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.ElementIterator
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Structural.AnalyticalModel
Autodesk.Revit.DB.Structural.AreaReinforcementType
Summary:This sample demonstrates how to create AreaReinforcement by Revit API and change its parameters.

CreateDimensions

Subject:Create dimensions.
Skill Level:Medium
Category:Annotation
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.Category
Autodesk.Revit.DB.CategorySet
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.Dimension
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.GeometryObjectArray
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.Location
Autodesk.Revit.DB.LocationCurve
Autodesk.Revit.DB.Options
Autodesk.Revit.DB.ReferenceArray
Autodesk.Revit.DB.View
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.SelElementSet
Summary:This sample shows how to add a dimension to a selected structure wall from its start to its end.

CreateDuctworkStiffener

Subject:Create Ductwork Stiffener
Skill Level:Beginning
Category:Families, MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2024.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create ductwork stiffener.

CreateFillPattern

Subject:Create and apply FillPatternElement and LinePatternElement
Skill Level:Beginning
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.FillPatternElement
Autodesk.Revit.DB.LinePatternElement
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create or retrieve a FillPatternElement or LinePatternElement and apply them to the surface or grid.

CreateShared

Subject:Create and modify a shared parameter.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.Category
Autodesk.Revit.DB.CategorySet
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.Parameters.InstanceBinding
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.DB.Symbol
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how a shared parameter can be created via the API and how a shared parameter can be modified via the API.

CreateSimpleAreaRein

Subject:Create rectangular AreaReinforcement.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Structure.AreaReinforcement
Autodesk.Revit.DB.Structure.AreaReinforcementType
Autodesk.Revit.DB.Wall
Summary:This sample uses to show how to create AreaReinforcement and change its parameters by Revit API.

CreateViewSection

Subject:Create section views.
Skill Level:Medium
Category:Views
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.BoundingBoxXYZ
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.LocationCurve
Autodesk.Revit.DB.Structural.AnalyticalModel
Autodesk.Revit.DB.Structural.AnalyticalModelFloor
Autodesk.Revit.DB.Structural.AnalyticalModelFrame
Autodesk.Revit.DB.Transform
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to generate a section view across the mid point of a linear element, such as a wall, floor or beam

CreateWallinBeamProfile

Subject:Create wall with Profile of selected Beams.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.Document
Autodesk.Revit.UI.Elements.FamilyInstance
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to generate a wall which has the profile of beams selection. When the command is executed, a dialog should appear that contains a drop-down list for all types of wall and a check box for whether the walls are structural. Default should be checked.

CreateWallsUnderBeams

Subject:Create wall under selected Beams.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to generate simple rectangular wall(s) under the beam(s) selection. When the command is executed a dialog should appear that contains a drop-down list for all types of wall and a check box for whether the walls are structural. Default should be checked.

CurtainSystem

Subject:Create curtain systems.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.CurtainSystem
Autodesk.Revit.DB.Document
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates 4 main features:1. How to create curtain systems on specified faces.2. How to delete curtain systems.3. How to add curtain grids to curtain systems.4. How to remove curtain grids from curtain systems.

CurtainWallGrid

Subject:Create Curtain Wall and manipulate its curtain grid.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.DB.CurtainCell
Autodesk.Revit.DB.CurtainGrid
Autodesk.Revit.DB.CurtainGridLine
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Mullion
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates five main features:1. How to create curtain wall with specific level and wall type.2. How to retrieve the curtain grid information of the curtain wall.3. How to edit the data of the curtain grid.4. How to retrieve the grid lines of the curtain grid.5. How to edit the grid lines and mullions of the curtain grid.

CurvedBeam

Subject:Curved Beam creation.
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Creation.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Geometry.Arc
Autodesk.Revit.DB.Geometry.Ellipse
Autodesk.Revit.DB.Geometry.NurbSpline
Autodesk.Revit.DB.Geometry.XYZ
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.Symbols.FamilySymbol
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create curved beam, this sample can create three types of curved beam: arc, ellipse and nurbspline.

Custom2DExporter

Subject:Export 2D views with CustomExporter
Skill Level:Medium
Category:Basics, Geometry, Views
Type:ExternalCommand,
Revit Platform:All
First Released For:2019.0
Classes:Autodesk.Revit.DB.CustomExporter
Autodesk.Revit.DB.IExportContext2D
Autodesk.Revit.UI.IExternalCommand
Summary:Export 2D views with CustomExporter, using varying options of the exporter.

DatumsModification

Subject:Datumplane modification
Skill Level:Beginning
Category:Elements
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.DB.DatumPlane
Autodesk.Revit.UI.IExternalApplication
Summary:Datumplane modification

DeckProperties

Subject:Display Deck Layer Properties.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.DB.CompoundStructureLayer
Autodesk.Revit.DB.CompoundStructureLayerFunction
Autodesk.Revit.DB.FloorType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows that how to get the properties of deck layer by RevitAPI.

DeleteDimensions

Subject:Delete dimensions.
Skill Level:Beginning
Category:Annotation, Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.Dimension
Autodesk.Revit.DB.Element
Autodesk.Revit.UI.IExternalCommand
Summary:Show how to delete Dimension elements.

DeleteObject

Subject:Delete Objects.
Skill Level:Beginning
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.SelElementSet
Summary:This sample is used to delete the objects selected by user.

DesignOptionReader

Subject:Display design options.
Skill Level:Beginning
Category:Basics, Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.DB.DesignOption
Autodesk.Revit.DB.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get the design options in the current document of Revit.

DimensionLeaderEnd

Subject:Dimension leader end point.
Skill Level:Beginning
Category:Annotation
Type:ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.DB.Dimension
Summary:Using new dimension api to move leader end point.

DirectionCalculation

Subject:Identify orientation of building elements
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.ElementClassFilter
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.Location
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.Selection.Selection
Summary:Find all windows and exterior walls that face the south direction.

DisableCommand

Subject:Command replacement
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.UI.AddInCommandBinding
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.RevitCommandId
Autodesk.Revit.UI.UIControlledApplication
Summary:Disable a command by replacing its implementation with a simple popup message

DisallowEndWrapping

Subject:Disallow end wrapping of locations on wall
Skill Level:Beginning
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2025.0
Classes:Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.Wall
Autodesk.Revit.DB.Reference
Autodesk.Revit.DB.Document
Summary:This sample demonstrates how to use public APIs to allow or disallow end wrapping at some locations of a wall.

DisplacementElementAnimation

Subject:Use DisplacementElement to animate building members
Skill Level:High
Category:Elements, Views
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.DisplacementElement
Autodesk.Revit.UI.Events.IdlingEventArgs
Autodesk.Revit.UI.IExternalCommand
Summary:Use DisplacementElements to animate groups of building structural members, proceeding sequentially from bottom level to top.

DockableDialogs

Subject:Docking modeless dialogs
Skill Level:Medium
Category:UI
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.UI.DockablePane
Autodesk.Revit.UI.IDockablePaneProvider
Instructions: Build and install the addin, and start Revit. Before opening a document, select the “Register” ribbon button in the “DockableDialogs” ribbon tab to launch the registration dialog. Select a docking style (bottom, top, tabbed, floating, etc…). After opening a document, note the docked-modeless API window in the UI. The “Hide” and “Show” buttons in the DockableDialogs ribbon can hide and show the dialog without destroying it.
Summary:DockableDialogs is a sample addin that demonstrates modeless dialog design, external events, and the new dockable dialogs UI API framework.

ChangesMonitor

Subject:Track the changes in document.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.DocumentChangeArgs
Autodesk.Revit.UI. IExternalApplication
Summary:This sample demonstrates how to subscribe the DocumentChanged event to controlled application level, and how this event works.

DoorSwing

Subject:Manage opening of the door and rooms relevant to the door.
Skill Level:Medium
Category:Rooms/Spaces
Type:ExternalApplication, ExternalCommand,
Revit Platform:Architecture
First Released For:2009.0
Classes:Autodesk.Revit. UI.PushButton
Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.DB.BindingMap
Autodesk.Revit.DB.BoundingBoxXYZ
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DocumentType.Family
Autodesk.Revit.DB.ElementBinding
Autodesk.Revit.DB.Events.DocumentSavingAsEventArgs
Autodesk.Revit.DB.Events.DocumentSavingEventArgs
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.InstanceBinding
Autodesk.Revit.DB.Options
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.TypeBinding
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.RibbonPanel
Summary:This sample will demonstrate how to create and maintain door opening parameters, internal door parameter, From/To Room and how to schedule these parameters. Feature to customize to your country standard is also provided.

DuplicateGraphics

Subject:Display graphics using DirectContext3D
Skill Level:High
Category:Basics, Geometry
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2018.0
Classes:Autodesk.Revit.DB.DirectContext3D.DrawContext
Autodesk.Revit.DB.DirectContext3D.IDirectContext3DServer
Autodesk.Revit.DB.ExternalService.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:The sample demonstrates basic usage of DirectContext3D. The external application creates DirectContext3D servers that extract geometry from selected Revit elements, encode it in pairs of vertex and index buffers, and submit it for rendering using DirectContext3D. The effect of the process, which is triggered using an ExternalCommand, is to display the geometry content of selected Revit elements at an offset, so that the graphics appear to be duplicated.

DuplicateViews

Subject:Copy paste drafting views and schedules from one document to another
Skill Level:Medium
Category:Elements, Views
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.CopyPasteOptions
Autodesk.Revit.DB.ElementTransformUtils
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.IDuplicateTypeNamesHandler
Autodesk.Revit.DB.IFailuresPreprocessor
Autodesk.Revit.UI.IExternalCommand
Summary:Use the copy paste APIs to copy drafting views and schedules from one document to another. The drafting view contents will also be copied.

DynamicModelUpdate

Subject:Dynamic Model Update used to maintain relative position between elements
Skill Level:Advanced
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.ElementClassFilter
Autodesk.Revit.DB.LocationPoint
Autodesk.Revit.DB.LogicalAndFilter
Autodesk.Revit.DB.UpdaterRegistry
Summary:Move a section marker to maintain relative position with a window

ViewFilters

Subject:Create and modify view filters.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.ParameterFilterElement
Autodesk.Revit.DB.ParameterFilterRuleFactory
Autodesk.Revit.DB.ParameterFilterUtilities
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create and modify view filters by 2011 new element iteration API.

ErrorHandling

Subject:How to use the error handling framework.
Skill Level:Medium
Category:Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.FailureDefinition
Autodesk.Revit.DB.FailureDefinitionId
Autodesk.Revit.DB.FailureMessage
Autodesk.Revit.DB.IFailuresPreprocessor
Autodesk.Revit.DB.IFailuresProcessor
Autodesk.Revit.Document
Summary:This sample demonstrates how to create failure definition id, failure definition, failure message and how to resolve failures in failure (pro)processing steps.

AutoStamp

Subject:Auto stamp when print view.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Events.ViewPrintedEventArgs
Autodesk.Revit.DB.Events.ViewPrintingEventArgs
Autodesk.Revit.DB.Geometry.XYZ
Autodesk.Revit.DB.TextNote
Autodesk.Revit.UI.IExternalApplication
Summary:This sample demonstrates how to subscribe ViewPrint events, create and delete TextNote element in event handler and cancel events when creation failure occurred.

AutoUpdate

Subject:Auto-update Revit model after document is opened.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Events
Autodesk.Revit.UI.IExternalApplication
Summary:This sample demonstrates how to subscribe DocumentOpened event and modify model in event handler in the event handler method.

CancelSave

Subject:Cancel document save process
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.DB.ProjectInfo
Autodesk.Revit.UI.IExternalApplication
Summary:This sample demonstrates how to cancel the document save process through DocumentSaving / DocumentSavingAs event’s arguments.

EventsMonitor

Subject:Track Event.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Events
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.IExternamApplication
Summary:This sample demonstrates how to subscribe to controlled application level Events.

PrintLog

Subject:Dump print information to log.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Events.DocumentPrintedEventArgs
Autodesk.Revit.DB.Events.DocumentPrintingEventArgs
Autodesk.Revit.DB.Events.ViewPrintedEventArgs
Autodesk.Revit.DB.Events.ViewPrintingEventArgs
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
System.DateTime
System.Diagnostics.Stopwatch
Summary:This sample demonstrates how to subscribe Print related events, access properties in argument of event handlers and dump print related information to log file.

ProgressNotifier

Subject:Show progress information for an action in a stack data structure for easier analysis.
Skill Level:Medium
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB.Events.ProgressChangedEventArgs
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to subscribe ProgressNotify related events, access properties in argument of event handlers, and organize the subtransaction progress information into a stack.

SelectionChanged

Subject:SelectionChanged event
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2023.0
Classes:Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.UI.Events.SelectionChangedEventArgs
Autodesk.Revit.UI.IExternalApplication
Summary:The sample implements IExternalApplication interface and subscribes SelectionChanged event in OnStartUp; the registered event handler will dump selected references related information to log files.

ExportPDFSettingsSample

Subject:ExportPDFSettings examples.
Skill Level:Medium
Category:Data Exchange, Elements
Type:ExternalApplication,
Revit Platform:All
First Released For:2020.0
Classes:Autodesk.Revit.DB.ExportPDFSettings
Autodesk.Revit.DB.PDFExportOptions
Autodesk.Revit.DB.TableCellCombinedParameterData
Summary:Provides examples for manipulating ExportPDFSettings.

ExtensibleStorageManager

Subject:Create, read, update, and delete third party extensible storage in Revit Elements.
Skill Level:Advanced
Category:Elements
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ExtensibleStorage.Entity
Autodesk.Revit.DB.ExtensibleStorage.Field
Autodesk.Revit.DB.ExtensibleStorage.FieldBuilder
Autodesk.Revit.DB.ExtensibleStorage.Schema
Autodesk.Revit.DB.ExtensibleStorage.SchemaBuilder
Summary:This application demonstrates the ExtensibleStorage classes and related APIs by creating a wrapper class and control dialog that creates schemas, serializes and deserializes them to XML, and extracts and displays all data in Entities of those Schemas. This is an advanced sample. If you are not familiar with ExtensibleStorage, first look at the “DynamicModelUpdate” sample.

ExtensibleStorageUtility

Subject:ExtensibleStorageUtility
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2014.0
Classes:StorageUtility – provides all methods to query and delete, and display extensible storage.
Summary:This sample shows that query if storage of given schemas exists in a document using the ExtensibleStorageFilter as well as how to delete it.

ExternalResourceDBServer

Subject:Sample External Resource Server
Skill Level:Medium
Category:Data Exchange
Type:ExternalApplication,
Revit Platform:All
First Released For:2015.0
Classes:Application.cs
Autodesk.Revit.DB.IExternalDBApplication
Autodesk.Revit.DB.IExternalResourceServer
Autodesk.Revit.DB.IGetLocalPathForOpenCallback
Autodesk.Revit.DB.IOnLocalLinkSharedCoordinatesSavedCallback
Contains GetLinkPathForOpen and LocalLinkSharedCoordinatesSaved, which are implementations of additional external resource server interfaces - IGetLocalPathForOpenCallback and IOnLocalLinkSharedCoordinatesSavedCallback. These callback classes are required in order to support Revit links.
Contains the class DBApplication which inherits from interface IExternalDBApplication and implements the OnStartup and OnShutdown methods. The Sample External Resource DB Server is registered with Revit in the OnStartup method.
Contains the KeynotesDatabase class, which is a "fake" database used to demonstrate how keynote data can be loaded into Revit from an arbitrary source, rather than a traditional text file.
Contains the SampleExternalResourceDBServer class - an implementation of the IExternalResourceServer interface.
KeynotesDatabase.cs
Project Files
SampleExternalResourceDBServer.cs
ServerInterfaceExtensionsForRevitLinks.cs
Summary:Demonstrates a concrete class derived from the IExternalResourceServer interface. The class simulates the provision of keynote data and Revit link models from files in a remote storage location, as well as keynote data created from a database.

ExternalResourceUIServer

Subject:An External Resource UI Server Class
Skill Level:Medium
Category:Data Exchange
Type:ExternalApplication,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalResourceUIServer
Summary:An IExternalResourceUIServer implementation to provide messages and other UI in support of the SampleExternalResourceServer in the ExternalResourceDBServer project.

FabricationPartLayout

Subject:Fabrication Part
Skill Level:Medium
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2016.0
Classes:Autodesk.Revit.DB.Connector
Autodesk.Revit.DB.ConnectorSet
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.ElementId
Autodesk.Revit.DB.Fabrication.CustomDataType
Autodesk.Revit.DB.Fabrication.DesignToFabricationConverter
Autodesk.Revit.DB.Fabrication.DesignToFabricationConverterResult
Autodesk.Revit.DB.Fabrication.FabricationAncillaryType
Autodesk.Revit.DB.Fabrication.FabricationAncillaryUsageType
Autodesk.Revit.DB.Fabrication.FabricationPartCompareType
Autodesk.Revit.DB.Fabrication.FabricationPartFitResult
Autodesk.Revit.DB.Fabrication.FabricationPartRouteEnd
Autodesk.Revit.DB.Fabrication.FabricationUtils
Autodesk.Revit.DB.FabricationAncillaryUsage
Autodesk.Revit.DB.FabricationConfiguration
Autodesk.Revit.DB.FabricationDimensionDefinition
Autodesk.Revit.DB.FabricationItemFile
Autodesk.Revit.DB.FabricationItemFolder
Autodesk.Revit.DB.FabricationPart
Autodesk.Revit.DB.FabricationRodInfo
Autodesk.Revit.DB.FabricationService
Autodesk.Revit.DB.FabricationServiceButton
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.MEPConnectorInfo
Autodesk.Revit.DB.Parameter
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to use the Fabrication Part API to create a sample layout and make modifications to fabrication data in the model. This includes:rectangular and round ductworktap placementrotationsstraight optimizationsconnections to a generic Revit family instancestretch fabrication part fitting to a target elementconverting design elements into fabrication partsrenumbering the straight/coupling fabrication partsloading and unloading of item filesexporting fabrication parts to PCF and MAJaccessing fabrication part mesh geometry.flip a fabrication part

AutoJoin

Subject:Automatically join geometry of combinable elements.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.CombinableElement
Autodesk.Revit.DB.Document
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to automatically join geometry between multiple generic forms for use in family modeling and massing.

AutoParameter

Subject:Auto add parameters to family document.
Skill Level:Medium
Category:Families, Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.ExternalDefinition
Autodesk.Revit.DB.FamilyManager
Autodesk.Revit.DB.FamilyParameter
Autodesk.Revit.Document
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to automatically add parameters (shared or not) to family documents.

CreateAirHandler

Subject:Create one air handler and add connectors.
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.DB.CombinableElement
Autodesk.Revit.DB.Extrusion
Autodesk.Revit.DB.Mechanical.DuctConnector
Autodesk.Revit.DB.Plumbing.PipeConnector
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:This sample creates one air handler and adds connectors (piping, duct).

CreateTruss

Subject:Create Truss
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.Creation.ItemFactoryBase
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create a mono truss in truss family document.

DWGFamilyCreation

Subject:Import dwg file into family document.
Skill Level:Beginning
Category:Data Exchange, Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to import a dwg file into a family document and add parameters to the family through Revit API.

GenericModelCreation

Subject:Create Generic Model
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to create Generic Model through Revit API

TypeRegeneration

Subject:Family type regeneration
Skill Level:Beginning
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.FamilyManager
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:This sample demonstrates Family type regeneration by Revit API.

ValidateParameters

Subject:Validate Parameters
Skill Level:Beginning
Category:Families
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.FamilyManager
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:This sample will demonstrate if every type has valid values for certain parameters.

WindowWizard

Subject:Windows Wizard
Skill Level:Beginning
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.FamilyManager
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.ParameterSet
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:This sample will demonstrate how to create a window family via wizard.

FamilyParametersOrder

Subject:Sort family parameters' order.
Skill Level:Medium
Category:Families, Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.ApplicationServices.Application;
Autodesk.Revit.DB
Autodesk.Revit.DB.Document;
Autodesk.Revit.DB.Family;
Autodesk.Revit.DB.FamilyManager;
Autodesk.Revit.DB.FamilySource;
Autodesk.Revit.DB.FilteredElementCollector;
Autodesk.Revit.DB.IFamilyLoadOptions;
Autodesk.Revit.UI.IExternalApplication;
Autodesk.Revit.UI.IExternalCommand;
Summary:This sample demonstrates how to sort the family parameters' order. The family could be a disk file or have been loaded into a project.

FindColumns

Subject:Columns Embedded in Walls
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.FilteredElementIterator
Autodesk.Revit.DB.Transform
Autodesk.Revit.DB.XYZ
Autodesk.Revit.UI.Selection.Selection
Summary:This sample shows how to find columns that are embedded in walls with the Revit API method FindReferencesWithContextByDirection.

MeasureHeight

Subject:Measure height of skylight window
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.BoundingBoxXYZ
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.UI.Selection.Selection
Summary:This sample shows how to find the height of a skylight window above the ground level using the Revit API method FindReferencesWithContextByDirection.

RayTraceBounce

Subject:Ray Trace Bounce
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to find intersection between ray and face and create connecting lines by Revit API method FindReferencesWithContextByDirection.

FireRating

Subject:Create shared parameter; export and import form excel.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.Category
Autodesk.Revit.UI.IExternalCommand
Summary:This program defines three commands: ApplyParameter which is used to add a new shared parameter; ExportFireRating which is used to export fire rating values to an Excel file and ImportFireRating which is used to import fire rating values from the Excel file and apply them to doors.

FoundationSlab

Subject:Create Foundation Slab.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.FloorType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create Foundation Slab.

FrameBuilder

Subject:Create a frame composed of columns, beams and braces.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.Level
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create a frame composed of columns, beams and braces. User can input parameters to create a frame consist of column, beam and brace. It has a user visible option to use the suspended updating function to increase the speed of the model creation. And users can duplicate the type of column, beam and brace.

FreeFormElement

Subject:FreeFormElement creation
Skill Level:Medium
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.BooleanOperationsUtils
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.CurveLoop
Autodesk.Revit.DB.FreeFormElement
Autodesk.Revit.UI.IExternalCommand
Summary:Use geometry tools to create a new family which has a cutout from an existing element.

GenerateFloor

Subject:Generate a floor using the closed outline made by a selection of walls.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.FloorType
Autodesk.Revit.DB.Level
Summary:This sample demonstrates how to generate a floor using the closed outline made by a selection of walls.

GenericStructuralConnection

Subject:Generic structural connection
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:2017.0
Classes:Autodesk.Revit.DB.ElementTransformUtils
Autodesk.Revit.DB.ExtensibleStorage.Entity
Autodesk.Revit.DB.ExtensibleStorage.Schema
Autodesk.Revit.DB.Structure.StructuralConnectionHandler
Autodesk.Revit.DB.Structure.StructuralConnectionHandlerType
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.ISelectionFilter
Summary:Demonstrates basic Create Read Update Delete operations on a generic / detailed structural connection

BRepBuilderExample

Subject:BRepBuilder usage example
Skill Level:Medium
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2017.0
Classes:Autodesk.Revit.DB.BRepBuilder
Autodesk.Revit.DB.DirectShape
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:Several cases of BRepBuilder usage for constructing Revit geometry using API.

ComputedSymbolGeometry

Subject:ComputedSymbolGeometry
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Analysis;
Autodesk.Revit.DB;
Autodesk.Revit.Document
Autodesk.Revit.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample is to demonstrate how to get computed symbol geometry of a family instance. This project will get various types of geometry information from the family instances in current Revit model and display them in different views by AVF.

EnergyAnalysisModel

Subject:EnergyAnalysisModel
Skill Level:Medium
Category:Analysis
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Analysis;
Autodesk.Revit.DB;
Autodesk.Revit.Document
Autodesk.Revit.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample is to demonstrate how to create use EnergyAnalysisModel. This project will get energy analytical model according to the defined options and show faces structure by a tree view.

GeometryCreation_BooleanOperation

Subject:Geometry Creation & Geometric Boolean Operation
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.Analysis;
Autodesk.Revit.DB;
Autodesk.Revit.Document
Autodesk.Revit.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample is to demonstrate how to create the geometry solid using GeometryCreationUtils and operate the geometric boolean operation using BooleanOperationUtils. This project will create a constructive solid geometry - CSG tree (http://en.wikipedia.org/wiki/Constructive_solid_geometry, http://en.wikipedia.org/wiki/File:Csg_tree.png) and show it in a new view by AVF – Analysis Visualization Framework.

ProximityDetection_WallJoinControl

Subject:Proximity Detection and Wall Join Control
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB;
Autodesk.Revit.Document
Autodesk.Revit.Element
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI;
Summary:This sample is to demonstrate how to “find columns in wall”, “find elements blocking egress”, “find walls (nearly joined to) end of walls” and “check walls join/disjoin states” by ElementIntersectsSolidFilter, ElementIntersectsElementFilter and WallUtils.

UpdateExternallyTaggedBRep

Subject:UpdateExternallyTaggedBRep usage example.
Skill Level:Medium
Category:Geometry
Type:ExternalApplication,
Revit Platform:All
First Released For:2022.0
Classes:Autodesk.Revit.DB.BRepBuilder
Autodesk.Revit.DB.DirectShape
Autodesk.Revit.DB.ExternalGeometryId
Autodesk.Revit.DB.ExternallyTaggedBRep
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how UpdateExternallyTaggedBRep can be used for creation and updating the geometry using DirectShape/DirectShapeType.

GetSetDefaultTypes

Subject:Get and set default family or element types
Skill Level:Medium
Category:Elements, Families
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.DB ElementType.IsValidDefaultFamilyType
Autodesk.Revit.DB.Docuemnt.GetDefaultFamilyTypeId
Autodesk.Revit.DB.Docuemnt.SetDefaultFamilyTypeId
Autodesk.Revit.DB.Document.GetDefaultElementTypeId
Autodesk.Revit.DB.Document.IsDefaultElementTypeIdValid
Autodesk.Revit.DB.Document.IsDefaultFamilyTypeIdValid
Autodesk.Revit.DB.Document.SetDefaultElementTypeId
Summary:GetSetDefaultTypes is a sample addin that demonstrates how to get and set default family and element types.

GridCreation

Subject:Create Grid.
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to create grids and modify grids’ properties through Revit API.

HelloRevit

Subject:Add ExternalCommand to the Revit user interface.
Skill Level:Beginning
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.TaskDialog
Summary:Shows how a basic ExternalCommand can be added to the Revit user interface. It uses a Revit task dialog to communicate information to the interactive user.

ImportExport

Subject:Import and Export data.
Skill Level:High
Category:Data Exchange
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.DGNExportOptions
Autodesk.Revit.DB.DWFExportOptions
Autodesk.Revit.DB.DWFXExportOptions
Autodesk.Revit.DB.DWGExportOptions
Autodesk.Revit.DB.DWGImportOptions
Autodesk.Revit.DB.DXFExportOptions
Autodesk.Revit.DB.FBXExportOptions
Autodesk.Revit.DB.GBXMLExportOptions
Autodesk.Revit.DB.GBXMLImportOptions
Autodesk.Revit.DB.ImageExportOptions
Autodesk.Revit.DB.ImageImportOptions
Autodesk.Revit.DB.InventorImportOptions
Autodesk.Revit.DB.PDFExportOptions
Autodesk.Revit.DB.SATExportOptions
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to export current project to dwg, sat,dxf, dwf(x), gbxml, fbx, dgn, pdf or image files and how to import a dwg, image, GBXML or Inventor file into Revit.

InCanvasControlAPI

Subject:In-Canvas controls
Skill Level:Beginning
Category:Annotation, Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2020.0
Classes:.
Autodesk.Revit.UI.InCanvasControlData
Autodesk.Revit.UI.ITemporaryGraphicsHandler
Autodesk.Revit.UI.TemporaryGraphicsCommandData
Autodesk.Revit.UI.TemporaryGraphicsManager
Summary:This sample will demonstrate how to create, keep track of and handle clicks on In-Canvas controls.

InPlaceMembers

Subject:Display In-place Familyinstance properties.
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get the In-place Family instance and its properties in the current document of Revit.

InvisibleParam

Subject:Create shared parameters.
Skill Level:Medium
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.DB.Definition
Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.InstanceBinding
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to use share parameter file to create share parameters and how to bind share parameters and instance.

Journaling

Subject:Journaling mechanism
Skill Level:Medium
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.Collections.StringStringMap
Autodesk.Revit.DB.Creation
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how an external application can be incorporated into the journaling mechanism.

LevelsProperty

Subject:Display and Create Levels.
Skill Level:Beginning
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Level
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get all the levels in a document, and how to create or delete a level and set its properties.

Loads

Subject:Operate Load Case, Load Nature, Load Usage and Load Combination.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Structure.LoadCase
Autodesk.Revit.DB.Structure.LoadCombination
Autodesk.Revit.DB.Structure.LoadNature
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to operate Load Case, Load Nature, Load Usage and Load Combination.

DistanceToPanels

Subject:Divided surface panel measurement
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.DividedSurface
Autodesk.Revit.DB.Panel
Autodesk.Revit.UI.IExternalCommand
Summary:Measure the distance from a selected object to all divided surface panels. Store this value for each panel in an instance parameter Distance.

DividedSurfaceByIntersects

Subject:Divide surface with intersects.
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.CurtainSystem
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates 2 main features:1. How to add intersects to DividedSurface.2. How to remove intersects to DividedSurface.

ManipulateForm

Subject:Add profile/edge to a form and manipulate edges/profiles of the form
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.ReferenceArray
Autodesk.Revit.DB.ReferenceArrayArray
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to create a simple form and add profile/edge to the form and how to move, rotate scale and delete the existing/added profile/edge.

MeasurePanelArea

Subject:Divided surface panel measurement and modification
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.DividedSurface
Autodesk.Revit.DB.Panel
Autodesk.Revit.UI.IExternalCommand
Summary:Measure the area of curtain panels in divided surfaces. Identify panels with area greater than and less than user-specified values. A text file is created in the same folder as the sample DLL file listing the area and element ID of every panel.

NewForm

Subject:Create Form
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.Creation.FamilyItemFactory
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Form
Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to create form through Revit API

PanelEdgeLengthAngle

Subject:Divided surface panel measurement
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.DB.DividedSurface
Autodesk.Revit.DB.Panel
Autodesk.Revit.UI.IExternalCommand
Summary:Measure the edge length and angle of curtain panels in divided surfaces. Save the length and angle data to the instance parameters of curtain panels.

ParameterValuesFromImage

Subject:Set parameter values based on image data
Skill Level:Advanced
Category:Massing
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.DividedSurface
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
System.Drawing.Bitmap
Summary:Compute a grayscale value for each pixel in an image file. Use this value to set a parameter that will change the model’s geometry.

PointCurveCreation

Subject:Reference point and Curve By Point creation
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.CurveByPoints
Autodesk.Revit.DB.Form
Autodesk.Revit.DB.PointOnEdge
Autodesk.Revit.DB.ReferencePoint
System.IO.StreamReader
Summary:Use equations and external data files to create massing geometry

MaterialProperties

Subject:Display Material Properties.
Skill Level:Medium
Category:Materials
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.Parameter
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get the material physical properties of a selected beam, column or brace, how to change the material type of the selected beam and how to change the unit weight of a selected beam, column or brace.

MaterialQuantities

Subject:Material quantity data extraction
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.ElementClassFilter
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.LogicalAndFilter
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.Transaction
System.Collections.Generic.Dictionary
System.Diagnostics.Process
Summary:Outputs an analysis of the materials that make up walls, floors, and roofs, and displays the output in Excel.

ModelessForm_ExternalEvent

Subject:Show Modeless Form (External Event)
Skill Level:Medium
Category:Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB;
Autodesk.Revit.UI.Events;
Autodesk.Revit.UI;
Summary:This sample shows how to utilize an External Event object in order to communicate with the Revit API from an external modeless dialog.

ModelessForm_IdlingEvent

Subject:Show Modeless Form (Idling Event)
Skill Level:Medium
Category:Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB;
Autodesk.Revit.UI.Events;
Autodesk.Revit.UI;
Summary:This sample shows how to utilize the Idling event in order to communicate with the Revit API from an external, modeless dialog.

ModelLines

Subject:Display and Create ModelLines.
Skill Level:Beginning
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.2
Classes:Autodesk.Revit.Creation.Application
Autodesk.Revit.DB.Arc
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.ModelArc
Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.DB.ModelCurveArray
Autodesk.Revit.DB.ModelLine
Autodesk.Revit.DB.SketchPlane
Autodesk.Revit.DB.XYZ
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to get model lines of all kinds and how to create model lines using Revit API.

MoveLinear

Subject:Move an element which is based on Line.
Skill Level:Beginning
Category:Elements, Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.Creation.Application
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.LocationCurve
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to move element which is based on a Line.

NewMacro

Subject:Create a New Macro Sample.
Skill Level:Beginning
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:2025.0
Classes:Autodesk.Revit.DB.Macros
Autodesk.Revit.UI.Macros
Autodesk.Revit.DB.Macros.MacroModule
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create a new Macro

MultiplanarRebar

Subject:Create multi-planar Rebar.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2012.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.ExternalDefinition
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.RebarShape
Autodesk.Revit.DB.Structure.RebarShapeDefinition
Autodesk.Revit.DB.Structure.RebarShapeDefinitionBySegments
Autodesk.Revit.DB.Structure.RebarShapeMultiplanarDefinition
Autodesk.Revit.DB.Structure.StructuralType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample is to demo multiplanar rebar creation in API. A user scenario of multiplanar rebar is corbel ‘s reinforcement. This sample is to reinforce sloped corbel(s).

MultistoryStairs

Subject:MultistoryStairs
Skill Level:Medium
Category:Elements
Type:ExternalApplication,
Revit Platform:All
First Released For:2018.0
Classes:Autodesk.Revit.DB.Architecture.MultistoryStairs
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.ISelectionFilter
Summary:MultistoryStairs editing utilities, including creating multistory stairs by a standard stairs, adding/removing stairs by picking level.

WorkThread

Subject:Sample of a multi-htreaded application utilizing the Idling event
Skill Level:Medium
Category:Basics
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.DB.Analysis;
Autodesk.Revit.DB.Events;
Autodesk.Revit.UI.Events;
Autodesk.Revit.UI.Selection;
Autodesk.Revit.UI;
Summary:This sample shows how to utilize the Applicaiton.Idling event in order to communicate with the Revit API from an external work thread.

NetworkPressureLossReport

Subject:Add ExternalCommand to the Revit user interface.
Skill Level:Advanced
Category:MEP
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.DB.Analysis.AnalysisDisplayColorSettings
Autodesk.Revit.DB.Analysis.AnalysisDisplayStyle
Autodesk.Revit.DB.Analysis.AnalysisDisplayVectorSettings
Autodesk.Revit.DB.Analysis.AnalysisResultSchema
Autodesk.Revit.DB.Analysis.AnalyssiDisplayLegendSettings
Autodesk.Revit.DB.Analysis.FieldDomainPointsByXYZ
Autodesk.Revit.DB.Analysis.FieldValue
Autodesk.Revit.DB.Analysis.MEPAnalyticalModelData
Autodesk.Revit.DB.Analysis.MEPAnalyticalNode
Autodesk.Revit.DB.Analysis.MEPAnalyticalSegment
Autodesk.Revit.DB.Analysis.MEPNetworkIterator
Autodesk.Revit.DB.Analysis.MEPNetworkSegementId
Autodesk.Revit.DB.Analysis.MEPNetworkSegmentData
Autodesk.Revit.DB.Analysis.SpatialFieldManager
Autodesk.Revit.DB.ConnectorDomainType
Autodesk.Revit.DB.FabricationService
Autodesk.Revit.DB.ForgeTypeId
Autodesk.Revit.DB.FormatOptions
Autodesk.Revit.DB.MEPSystem
Autodesk.Revit.DB.OverrideGraphicSettings
Autodesk.Revit.DB.SpecTypeId
Autodesk.Revit.DB.UnitFormatUtils
Autodesk.Revit.DB.UnitUtils
Autodesk.Revit.DB.View
Autodesk.Revit.UI.IExternalCommand
Summary:This addin sample shows how to access the MEP analytical model data and traverse the network. The flow and pressure loss results are exported to a csv file or displayed in Analysis Visualization Framework (AVF).

NewHostedSweep

Subject:Create hosted sweep (Fascia, Gutter, and SlabEdge).
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Architecture.Fascia
Autodesk.Revit.DB.Architecture.FasciaType
Autodesk.Revit.DB.Architecture.Gutter
Autodesk.Revit.DB.Architecture.GutterType
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.HostedSweep
Autodesk.Revit.DB.HostedSweepType
Autodesk.Revit.DB.Reference
Autodesk.Revit.DB.SlabEdge
Autodesk.Revit.DB.SlabEdgeType
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to create hosted sweep (includes Fascia, Gutter and SlabEdge), and how to modify their properties.

NewOpenings

Subject:Create openings.
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.Creation.Application
Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Opening
Autodesk.Revit.DB.Wall
Autodesk.Revit.DB.XYZ
Summary:Shows how to create Openings by Revit API.

NewPathReinforcement

Subject:Create PathReinforcement.
Skill Level:Medium
Category:Geometry, Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2008.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.Face
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Structure.PathReinforcement
Autodesk.Revit.DB.Structure.PathReinforcementType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create PathReinforcement by API.

NewRebar

Subject:Create Rebar and ReabrShapes.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.ExternalDefinition
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.RebarShape
Autodesk.Revit.DB.Structure.RebarShapeDefinition
Autodesk.Revit.DB.Structure.RebarShapeDefinitionByArc
Autodesk.Revit.DB.Structure.RebarShapeDefinitionBySegments
Autodesk.Revit.DB.Structure.StructuralType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample will demonstrate how to create rebar via NewRebar (RebarShape rebarShape, RebarBarType rebarType, Element host, XYZ origin, XYZ xVec, XYZ yVec) and how to customize RebarShape (include straight segment and arc shape).

NewRoof

Subject:Create footprint and extrusion roof.
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.ExtrusionRoof
Autodesk.Revit.DB.FootPrintRoof
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.RoofType
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates four main features:1. How to create a new footprint roof.2. How to create an extrusion roof.3. How to edit an existed footprint roof.4. How to edit an existed extrusion roof.

ObjectViewer

Subject:Show element's geometry,get and set its parameter value.
Skill Level:Advanced
Category:Views
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.Element
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates two main features:1. How to get physical or analytical model of selected element.2. How to get and set parameter’s value of selected element.

Openings

Subject:Display Opening informations.
Skill Level:High
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Opening
Autodesk.Revit.UI.IExternalCommand
Summary:Shows how to get geometry profile and properties of an opening and how to add x model lines to opening bounding box.

PanelSchedule

Subject:Show how the Panel Schedule API works.
Skill Level:Beginning
Category:Data Exchange
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2011.0
Classes:Autodesk.Revit.DB.Electrical.PanelScheduleSheetInstance
Autodesk.Revit.DB.Electrical.PanelScheduleView
Autodesk.Revit.DB.SectionType
Autodesk.Revit.DB.TableSectionData
Summary:This sample contains 3 external commands to show how to use the Panel Schedule API:1. PanelScheduleExport - gets the panel schedule view data via the API and generates a CSV file or a HTML page for it.2. InstanceViewCreation - Create a panel schedule view instance for an electrical panel you selected.3. SheetImport - Place the panel schedule view(s) on a sheet view.

ParameterUtils

Subject:Display parameters.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:8.1
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Parameter
Summary:This sample demonstrates how to get the parameters of a Revit element.

PathOfTravel

Subject:Create PathOfTravel.
Skill Level:Medium
Category:Annotation, Elements, Views
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2020.0
Classes:Autodesk.Revit.DB.Analysis.PathOfTravel
Autodesk.Revit.DB.Architecture.Door
Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Creation.Document
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrated how to create PathOfTravel elements from room(s) to door(s) in a plan view.

PathReinforcement

Subject:Display PathReinforcement informations.
Skill Level:Medium
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.ModelCurve
Autodesk.Revit.DB.Structure.PathReinforcement
Autodesk.Revit.DB.Structure.RebarBarType
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to retrieve curves, profile and properties of path reinforcement object.

PerformanceAdviserControl

Subject:View, select, and run PerformanceAdviser rules.
Skill Level:Beginning
Category:Elements
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.IPerformanceAdviserRule
Autodesk.Revit.DB.PerformanceAdviser
Summary:This program demonstrates the usage the PerformanceAdviser class and related APIs.

PhaseSample

Subject:Filter elements by their phases.
Skill Level:Beginning
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.Elements.Phase
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to use phase to filter elements and how to highlight filtered elements by Execute method parameters.

PhysicalProp

Subject:Display physical property.
Skill Level:Beginning
Category:Materials, Parameters
Type:ExternalCommand,
Revit Platform:Structure
First Released For:8.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
Summary:This sample demonstrates how to get the physical material of a column or beam.

PlaceFamilyInstanceByFace

Subject:Create family instance on face.
Skill Level:Medium
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.DB.Face
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.Options
Autodesk.Revit.DB.Solid
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create family instance on face.

PlacementOptions

Subject:Interactive placement of family instance via options
Skill Level:Medium
Category:Basics, Families
Type:ExternalCommand,
Revit Platform:All
First Released For:2017.0
Classes:Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.UI.FaceBasedPlacementType
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.PromptForFamilyInstancePlacementOptions
Autodesk.Revit.UI.SketchGalleryOptions
Autodesk.Revit.UI.UIDocument
Summary:This sample demonstrates how to place the family instance via options.

PointCloudEngine

Subject:Point cloud engine examples.
Skill Level:Advanced
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2012.0
Classes:Autodesk.Revit.DB.PointCloudInstance
Autodesk.Revit.DB.PointClouds.CloudPoint
Autodesk.Revit.DB.PointClouds.IPointCloudAccess
Autodesk.Revit.DB.PointClouds.IPointCloudEngine
Autodesk.Revit.DB.PointClouds.IPointSetIterator
Autodesk.Revit.DB.PointClouds.PointCloudFilter
Autodesk.Revit.DB.PointCloudType
Summary:Offers a variety of examples for custom point cloud engines.

PostCommandWorkflow

Subject:Demonstration of use of PostCommand() to drive user workflows
Skill Level:Advanced
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.DocumentSavingEventArgs
Autodesk.Revit.UI.AddInCommandBinding
Autodesk.Revit.UI.Events.BeforeExecutedEventArgs
Autodesk.Revit.UI.Events.TaskDialogShowingEventArgs
Autodesk.Revit.UI.IExternalEventHandler
Autodesk.Revit.UI.PushButton
Autodesk.Revit.UI.RevitCommandId
Autodesk.Revit.UI.TaskDialog
Autodesk.Revit.UI.UIApplication
Summary:Use PostCommand() as a part of a customized workflow. When a document does not have a new revision added, prompt to add one before saving.

PowerCircuit

Subject:Operate power circuits.
Skill Level:Beginning
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2009.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to operate power circuits.

ProjectInfo

Subject:Display project information.
Skill Level:Beginning
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Analysis.EnergyDataSettings
Autodesk.Revit.DB.Analysis.gbXMLBuildingType
Autodesk.Revit.DB.Analysis.gbXMLServiceType
Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.Construction
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Mechanical.MEPBuildingConstruction
Autodesk.Revit.DB.ProjectInfo
Autodesk.Revit.DB.ProjectLocation
Autodesk.Revit.DB.ProjectPosition
Summary:Demonstrates how to manipulate project information.

ReadonlySharedParameters

Subject:Read-only Shared Parameters
Skill Level:Medium
Category:Parameters
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2015.0
Classes:Autodesk.Revit.DB.DefinitionFile
Autodesk.Revit.DB.DefinitionGroup
Autodesk.Revit.DB.ElementParameterFilter
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.FilterRule
Autodesk.Revit.DB.Parameter
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:

RebarContainerAnyShapeType

Subject:Create Rebar Container Object.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2016.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.StructuralType
Autodesk.Revit.UI.IExternalCommand
Summary:Show how to create a Rebar Container in a concrete element (Beam or Column) which does not currently host reinforcement.

RebarFreeForm

Subject:Rebar Free Form
Skill Level:Advanced
Category:Structure
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2018.0
Classes:AddSharedParams
Application
Command
CurveElementRegenUpdater
RebarUpdateServer
TargetFace
Summary:External command to create a Rebar FreeForm element and external application to implement the custom server used to regenerate the rebar geometry based on constraints

ReferencePlane

Subject:Create ReferencePlane.
Skill Level:Medium
Category:Basics, Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.Mesh
Autodesk.Revit.DB.Options
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Wall
Summary:This sample shows how to create Reference Plane by Revit API.

Reinforcement

Subject:Create Rebars.
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.1
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.StructuralType
Autodesk.Revit.UI.IExternalCommand
Summary:Show how to create Rebar in concrete element (Beam or Column) which does not have any reinforcement.

RevitCommands

Subject:Simple Revit commands.
Skill Level:Beginning
Category:Basics, Families
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.ApplicationServices.ApplicationServices.Application
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.Instance
Autodesk.Revit.DB.Location
Autodesk.Revit.DB.Mesh
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Solid
Summary:These sample contains 5 commands, demonstrates1. How to load family from family file.2. How to load family symbol from family file.3. How to access the selection set.4. How to get and set library paths in Revit.5. How to retrieve data from selected elements.

Ribbon

Subject:Create customized Ribbon by Ribbon API
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2010.0
Classes:Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.PulldownButton
Autodesk.Revit.UI.PulldownButtonData
Autodesk.Revit.UI.PushButton
Autodesk.Revit.UI.PushButtonData
Autodesk.Revit.UI.RibbonPanel
Summary:This sample demonstrates how to create customized ribbon for Add-In and how to create different types of ribbon items (RibbonPanel, PushButton, PulldownButton, Stackable Buttons, RadioButtonGroup, TextBox, SplitButton).

RoofsRooms

Subject:Geometry checking for Roofs and Rooms (Spaces).
Skill Level:Medium
Category:Rooms/Spaces
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2009.1
Classes:Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Architecture.RoomFilter
Autodesk.Revit.DB.BuiltInCategory
Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.Face
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.LogicalOrFilter
Autodesk.Revit.DB.Mechanical.Space
Autodesk.Revit.DB.Mechanical.SpaceFilter
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.SpatialElementBoundarySubface
Autodesk.Revit.DB.SpatialElementGeometryCalculator
Autodesk.Revit.DB.SpatialElementGeometryResults
Summary:This sample demonstrates how to check whether a Room/Space has a bounding Roof.

Rooms

Subject:Room data retrieval and modification.
Skill Level:Beginning
Category:Rooms/Spaces
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:9.1
Classes:Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Architecture.RoomTag
Autodesk.Revit.DB.Creation.Document
Autodesk.Revit.DB.Parameters.BuiltInParameter
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get Room’s information (Number, Area, Department, etc), add room tags and change Room numbers.

RoomSchedule

Subject:Room creation and modification; Excel data import and export.
Skill Level:High
Category:Rooms/Spaces
Type:ExternalApplication, ExternalCommand,
Revit Platform:Architecture
First Released For:2008.2
Classes:Autodesk.Revit.DB.Architecture.Room
Autodesk.Revit.DB.Category
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Events.DocumentClosed
Autodesk.Revit.DB.Events.DocumentSaving
Autodesk.Revit.DB.Events.DocumentSavingAs
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.Parameters.BuildInParameter
Autodesk.Revit.DB.Parameters.Definition
Autodesk.Revit.DB.Parameters.DefinitionGroup
Autodesk.Revit.DB.Parameters.InstanceBinding
Autodesk.Revit.DB.Phase
Autodesk.Revit.UI.IExternalCommand
System.Data.DataTable
System.Data.OleDb.OleDbCommand
System.Data.OleDb.OleDbConnection
Summary:This sample demonstrates: how to retrieve spread sheet data, how to create rooms without placing them and how to update spreadsheet data with data of rooms mapped to.

RotateFramingObjects

Subject:Rotate framing objects.
Skill Level:Medium
Category:Basics, Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.Creation.Application
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Parameter
Autodesk.Revit.Structural.Enums.StructuralType
Summary:Demonstrates how to rotate beams, braces or structural columns around their directional axis rather than project axis.

RoutingPreferenceTools

Subject:Tools for routing preferences
Skill Level:Medium
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2013.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.DB.Plumbing
Summary:This sample contains three commands.[Note] – all samples only work properly when created from MEP document templates, such as “Systems-Default.rte.”Routing Preference AnalysisSubject: Analyze the routing preferences of a given pipe type to check for common problems.Summary: This sample demonstrates how to use the routing preferences API to look at all rules and criteria for a given PipeType and check for several common problems, including:The first rule in a group (e.g. “Elbows”) has a range of “None.”All rules in a group have a range of “None.”A preferred junction type of Tee or Tap is set, but no fittings of that type are assigned to rules.A segment’s size range is not fully covered by the sizes ranges covered by elbow, junction, or cross fittings.

RvtSamples

Subject:Add menu items of samples to Revit.
Skill Level:Beginning
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2009.0
Classes:Autodesk.Revit.ApplicationServices.ControlledApplication
Autodesk.Revit.UI.PulldownButton
Autodesk.Revit.UI.PulldownButtonData
Autodesk.Revit.UI.PushButton
Autodesk.Revit.UI.PushButtonData
Autodesk.Revit.UI.RibbonPanel
Summary:This sample integrates all other samples excluding ExternalApplications into a panel named “RvtSamples” under menu “Add-Ins”.

SampleCommandsSteelElements

Subject:Sample commands for steel elements
Skill Level:High
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:2019.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementId
Autodesk.Revit.DB.Reference
Autodesk.Revit.DB.Steel.SteelElementProperties
Autodesk.Revit.DB.Structure.StructuralConnectionHandler
Autodesk.Revit.DB.Structure.StructuralConnectionHandlerType
Autodesk.Revit.DB.Transaction
Autodesk.Revit.UI.Events
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.UIDocument
Summary:Sample commands for steel elements. These API samples allow for creation, modification and deletion of steel elements.

ScheduleAutomaticFormatter

Subject:Schedule formatting tool
Skill Level:High
Category:Views
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.ExtensibleStorage.Entity
Autodesk.Revit.DB.ExtensibleStorage.ExtensibleStorageFilter
Autodesk.Revit.DB.ExtensibleStorage.Schema
Autodesk.Revit.DB.IUpdater
Autodesk.Revit.DB.ScheduleDefinition
Autodesk.Revit.DB.TableCellStyle
Autodesk.Revit.DB.TableCellStyleOverrideOptions
Autodesk.Revit.DB.ViewSchedule
Summary:Automatically formats alternating columns of a schedule to have a different background color.

ScheduleCreation

Subject:ScheduleAPI
Skill Level:Beginning
Category:Views
Type:ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.DB.SchedulableField
Autodesk.Revit.DB.ScheduleDefinition
Autodesk.Revit.DB.ScheduleField
Autodesk.Revit.DB.ScheduleFieldId
Autodesk.Revit.DB.ScheduleFilter
Autodesk.Revit.DB.ScheduleSheetInstance
Autodesk.Revit.DB.ScheduleSortGroupField
Autodesk.Revit.DB.ViewSchedule
Autodesk.Revit.UI.IExternalCommand
Summary:This sample introduces how to create a view schedule and how to show its data on a sheet.

ScheduleToHTML

Subject:Schedules
Skill Level:Medium
Category:Views
Type:ExternalApplication,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.TableCellStyle
Autodesk.Revit.DB.TableData
Autodesk.Revit.DB.TableMergedCell
Autodesk.Revit.DB.TableSectionData
Autodesk.Revit.DB.ViewSchedule
Summary:Export Schedule to formatted HTML

Selections

Subject:Selections
Skill Level:Beginning
Category:Selection
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Reference
Autodesk.Revit.Exceptions.OperationCanceledException
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.Selection.ISelectionFilter
Autodesk.Revit.UI.Selection.ObjectSnapTypes
Autodesk.Revit.UI.Selection.ObjectType
Autodesk.Revit.UI.Selection.Selection
Summary:This sample will demonstrate how to perform selection operations.

ShaftHolePuncher

Subject:Create all Kinds Opening.
Skill Level:High
Category:Elements, Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.Face
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Instance
Autodesk.Revit.DB.Level
Autodesk.Revit.DB.Opening
Autodesk.Revit.DB.Solid
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create single or Shaft Opening on a wall, floor or beam.

SharedCoordinateSystem

Subject:Get and set project's place,location.
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:9.1
Classes:Autodesk.Revit.DB.CitySet
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.SiteLocation
Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.DB.Transform
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get place, location of project, and change their values.

SheetToView3D

Subject:Click on a ViewPlan viewport on a sheet to create a new perspective 3D view with its camera at that point in the model
Skill Level:Advanced
Category:View Transforms
Type:ExternalCommand,
Revit Platform:All
First Released For:2023.0
Classes:Autodesk.Revit.DB.Curveloop
Autodesk.Revit.DB.Plane
Autodesk.Revit.DB.Transform
Autodesk.Revit.DB.TransformWithBoundary
Autodesk.Revit.DB.View
Autodesk.Revit.DB.View3D.CreatePerspective
Autodesk.Revit.DB.Viewport
Autodesk.Revit.DB.ViewSheet
Summary:This sample demonstrates how to use the View and Viewport transforms to map a point on a sheet to a location in the 3D model. It also demonstrates how to use TransformWithBoundary to inspect the view crop regions if the view crop has been broken (split) into many pieces.

SinePlotter

Subject:A simple sine curve demonstration
Skill Level:Medium
Category:Families, Geometry
Type:ExternalApplication, ExternalCommand,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Summary:Array a series of prism family instances over a sine curve

SlabProperties

Subject:Slab properties retrieval.
Skill Level:Beginning
Category:Elements, Parameters
Type:ExternalCommand,
Revit Platform:Structure
First Released For:9.0
Classes:Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Structural.CompoundStructureLayer
Autodesk.Revit.DB.Structural.CompoundStructureLayerArray
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get Slab’s properties which consist of Level, Type Name, Span Direction and Slab’s Layers information (Material Name, Thickness, Young Modulus X, Y and Z).

SlabShapeEditing

Subject:Create SlabShapeVertex and SlabShapeCrease.
Skill Level:Medium
Category:Elements, Geometry
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2009.0
Classes:Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.Edge
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.SlabShapeCrease
Autodesk.Revit.DB.SlabShapeCreaseArray
Autodesk.Revit.DB.SlabShapeCreaseArrayIterator
Autodesk.Revit.DB.SlabShapeEditor
Autodesk.Revit.DB.SlabShapeVertex
Summary:This sample demonstrates how to create SlabShapeVertex and SlabShapeCrease, and then use them to edit slab’s shape.

SolidSolidCut

Subject:Solid-Solid Cut and Uncut.
Skill Level:Beginning
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:2011.0
Classes:Autodesk.Revit.DB.SolidSolidCutUtils
Autodesk.Revit.IExternalCommand
Summary:Shows how to use Solid-Solid Cut and Uncut.

SpanDirection

Subject:Date retrieval for structural Floor (Slab).
Skill Level:Beginning
Category:Elements, Parameters
Type:ExternalCommand,
Revit Platform:Structure
First Released For:8.1
Classes:Autodesk.Revit.DB.ElementArray
Autodesk.Revit.DB.ElementArrayIterator
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Floor
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get span direction and span direction symbols of structural Floor (Slab).

SpotDimension

Subject:Display Spot Dimensions.
Skill Level:Beginning
Category:Annotation
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.SpotDimension
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to retrieve all the spot dimensions and theirs properties in all views of Revit document.

StairsAutomation

Subject:Stairs creation
Skill Level:Medium
Category:Elements
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2013.0
Classes:Autodesk.Revit.DB.Architecture.Stairs
Autodesk.Revit.DB.Architecture.StairsEditScope
Autodesk.Revit.DB.Architecture.StairsLanding
Autodesk.Revit.DB.Architecture.StairsRun
Autodesk.Revit.UI.IExternalCommand
Summary:A utility sample that creates a series of stairs, stairs runs and stairs landings configurations based upon predefined rules and parameters.

StructSample

Subject:Column creation and placing.
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Geometry.Line
Autodesk.Revit.DB.Geometry.UV
Autodesk.Revit.DB.Geometry.XYZ
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Symbols.FamilySymbol
Autodesk.Revit.DB.Wall
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to place a set of columns in the selected wall.

StructuralLayerFunction

Subject:Function retrieval for structural layers.
Skill Level:Beginning
Category:Structure
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Structural.CompoundStructureLayer
Autodesk.Revit.DB.Structural.Enum.CompoundStructureLayerFunction
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to retrieve the function of each structural layer of selected floor in order from outside to inside in a dialog box.

TagBeam

Subject:Create tags for beam or rebar; Create text.
Skill Level:Beginning
Category:Annotation
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.IndependentTag
Autodesk.Revit.DB.LocationCurve
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.TextNote
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to create tags at the start and end of selected beams, how to create a rebar tag at the end of the first curve of selected rebar and how to create a text.

TestFloorThickness

Subject:Change the thickness of floor.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.FloorType
Summary:Retrieve and change floor thickness.

TestWallThickness

Subject:Change the thickness of wall.
Skill Level:Beginning
Category:Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Wall
Autodesk.Revit.DB.WallType
Summary:Retrieve and change wall thickness.

Toposolid

Subject:Toposolid API Samples
Skill Level:Beginning
Category:Elements
Type:ExternalCommand,
Revit Platform:All
First Released For:2020.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
The blue texts are for your reference, please update them and change the font to normal.
Summary:API samples for toposolid related features.

TransactionControl

Subject:How to deal with transaction group, transaction and sub transaction.
Skill Level:Medium
Category:Basics
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.SubTransaction
Autodesk.Revit.DB.Transaction
Autodesk.Revit.DB.TransactionGroup
Autodesk.Revit.Document
Summary:This sample demonstrates how to use transaction group, transaction and sub transaction.

TraverseSystem

Subject:Traverse a well-connected mechanical or piping system in the direction of flow.
Skill Level:Medium
Category:MEP
Type:ExternalCommand,
Revit Platform:MEP
First Released For:2010.0
Classes:Autodesk.Revit.DB
Autodesk.Revit.UI.IExternalCommand
Summary:This sample shows how to traverse a well-connected mechanical or piping system in the direction of flow and dump the traversal into an XML file.

Truss

Subject:Create truss, edit truss Profile and Members.
Skill Level:Medium
Category:Geometry, Structure
Type:ExternalCommand,
Revit Platform:Structure
First Released For:2009.0
Classes:Autodesk.Revit.DB.CurveArray
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.Structure.Truss
Autodesk.Revit.DB.Structure.TrussType
Autodesk.Revit.DB.Strucure.TrussMemberInfo
Autodesk.Revit.DB.ViewPlan
Summary:This sample demonstrates how to create a truss and modify its truss members and profile.

TypeSelector

Subject:Wall types retrieval.
Skill Level:Beginning
Category:Families
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.Document
Autodesk.Revit.DB.ElementId
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.FamilySymbol
Autodesk.Revit.DB.FamilySymbolSet
Autodesk.Revit.DB.WallType
Autodesk.Revit.DB.WallTypeSet
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to retrieve all types in project of one specific family (wall) and how to change the type of one family instance or wall.

UIAPI

Subject:API UI Usage.
Skill Level:Medium
Category:Basics
Type:ExternalApplication,
Revit Platform:All
First Released For:2013.0
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.UI.ContextualHelp
Autodesk.Revit.UI.TabbedDialogExtension
Autodesk.Revit.UI.UIApplication
Summary:This sample demonstrates how to use API UI abilities.

Units

Subject:Units API
Skill Level:Beginning
Category:Basics, Data Exchange
Type:ExternalCommand,
Revit Platform:All
First Released For:2014.0
Classes:Autodesk.Revit.DB.FormatOptions
Autodesk.Revit.DB.UnitFormatUtils
Autodesk.Revit.DB.Units
Autodesk.Revit.DB.UnitUtils
Autodesk.Revit.UI.IExternalCommand
Summary:Add a command which lists all the units in the current project and displays their format information, users can set the format options of each unit type; Display the decimal symbol type, digit grouping symbol, digit grouping amount of current project’s units, users could set them.

VersionChecking

Subject:Version information of Revit application.
Skill Level:Beginning
Category:Basics, Parameters
Type:ExternalCommand,
Revit Platform:All
First Released For:9.0
Classes:Autodesk.Revit.ApplicationServices.Application
Autodesk.Revit.UI.IExternalCommand
Summary:This sample demonstrates how to get Revit version information: product name, product version and product build number.

AnalyticalViewer

Subject:View analytical model wireframe.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:Structure
First Released For:8.0
Classes:Autodesk.Revit.DB.ContFooting
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Floor
Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.DB.Wall
Summary:This program demonstrates the usage of a structural analytical model. This sample uses a helper program RevitViewer.

ElementViewer

Subject:View element wireframe.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.DB.GeometryElement
Autodesk.Revit.DB.GeometryObject
Summary:This program demonstrates the usage of element's geometry. This sample uses a helper program RevitViewer.

RevitViewer

Subject:View geometry information.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:All
First Released For:8.0
Classes:Autodesk.Revit.IExternalCommand
Summary:A simple sample to help viewing the geometry information which obtained by Revit API.

RoomViewer

Subject:View room boundary wireframe.
Skill Level:Medium
Category:Geometry
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:8.0
Classes:Autodesk.Revit.DB.Architecture.BoundarySegmentArrayArray
Autodesk.Revit.DB.Architecture.Room
Summary:This sample demonstrates the usage of room boundary and uses a helper program RevitViewer.

ViewPrinter

Subject:Print the printable views.
Skill Level:Medium
Category:Data Exchange
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Document.PrintManager
Autodesk.Revit.DB.PrintRange
Autodesk.Revit.DB.PrintSetting
Autodesk.Revit.DB.PrintSetup
Autodesk.Revit.DB.ViewSheetSet
Autodesk.Revit.DB.ViewSheetSetting
Autodesk.Revit.DB.VirtualPrinterType
Summary:This sample demonstrates how to print the printable view and sheets.

ViewTemplateCreation

Subject:Create and configure new view template
Skill Level:Medium
Category:Parameters, Views
Type:ExternalCommand,
Revit Platform:All
First Released For:2020.0
Classes:Autodesk.Revit.DB.BuiltInCategory;
Autodesk.Revit.DB.BuiltInParameter;
Autodesk.Revit.DB.Color;
Autodesk.Revit.DB.Document;
Autodesk.Revit.DB.ElementId;
Autodesk.Revit.DB.FillPatternElement;
Autodesk.Revit.DB.FillPatternTarget;
Autodesk.Revit.DB.FilteredElementCollector;
Autodesk.Revit.DB.OverrideGraphicSettings;
Autodesk.Revit.DB.Transaction;
Autodesk.Revit.DB.View;
Autodesk.Revit.DB.ViewDetailLevel;
Autodesk.Revit.UI.IExternalCommand;
Autodesk.Revit.UI.Result;
Summary:In this sample is showed a process of new view template creation from a regular view and view template settings configuration.

VisibilityControl

Subject:Control visibility by category.
Skill Level:Medium
Category:Views
Type:ExternalCommand,
Revit Platform:All
First Released For:2008.0
Classes:Autodesk.Revit.DB.Categories
Autodesk.Revit.DB.Document.Settings
Autodesk.Revit.DB.View
Autodesk.Revit.Document
Autodesk.Revit.UI.Selection
Summary:This sample demonstrates how to control visibility by category, and how the API supports the options to pick a single element or pick multiple elements.

WinderStairs

Subject:API Sketched Winder Stairs
Skill Level:Advanced
Category:Elements
Type:ExternalCommand,
Revit Platform:Architecture
First Released For:2013.0
Classes:Autodesk.Revit.DB.Arc
Autodesk.Revit.DB.Architecture.Stairs
Autodesk.Revit.DB.Architecture.StairsRun
Autodesk.Revit.DB.Curve
Autodesk.Revit.DB.IUpdater
Autodesk.Revit.DB.Line
Autodesk.Revit.DB.StairsEditScope
Autodesk.Revit.DB.Transaction
Autodesk.Revit.DB.Transform
Autodesk.Revit.DB.UpdaterRegistry
Autodesk.Revit.DB.XYZ
Autodesk.Revit.UI.ExternalEvent
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.UI.IExternalEventHandler
Summary:This sample demos the Winder Stairs creation via sketched stairs API. It implemented the single point L-Winder and U-Winder layout algorithms. And also it utilizes the DMU (dynamic model update) framework to regenerate the winder stairs.

\ No newline at end of file diff --git a/SDK/Samples/SamplesIndex.htm b/SDK/Samples/SamplesIndex.htm index 7522c67f..b689ad83 100644 --- a/SDK/Samples/SamplesIndex.htm +++ b/SDK/Samples/SamplesIndex.htm @@ -83,7 +83,6 @@
  • AddSpaceAndZone
  • AllViews
  • -
  • AnalyticalSupportData_Info
  • AnalyticalViewer
  • APIAppStartup
  • AppearanceAssetEditing
  • @@ -110,6 +109,7 @@
  • ColorFill
  • CompoundStructure
  • ComputedSymbolGeometry
  • +
  • ContextMenu
  • ContextualAnalyticalModel
  • CreateAirHandler
  • CreateBeamsColumnsBraces
  • @@ -136,6 +136,7 @@
  • DimensionLeaderEnd
  • DirectionCalculation
  • DisableCommand
  • +
  • DisallowEndWrapping
  • DisplacementElementAnimation
  • DistanceToPanels
  • DistanceToSurfaces
  • @@ -191,6 +192,7 @@
  • NetworkPressureLossReport
  • NewForm
  • NewHostedSweep
  • +
  • NewMacro
  • NewOpenings
  • NewPathReinforcement
  • NewRebar
  • diff --git a/SDK/Samples/ScheduleAutomaticFormatter/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ScheduleAutomaticFormatter/CS/Properties/AssemblyInfo.cs index e167f536..2c821f0c 100644 --- a/SDK/Samples/ScheduleAutomaticFormatter/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ScheduleAutomaticFormatter/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ScheduleAutomaticFormatter/CS/ScheduleAutomaticFormatter.csproj b/SDK/Samples/ScheduleAutomaticFormatter/CS/ScheduleAutomaticFormatter.csproj index 4dfb27e1..15a96f01 100644 --- a/SDK/Samples/ScheduleAutomaticFormatter/CS/ScheduleAutomaticFormatter.csproj +++ b/SDK/Samples/ScheduleAutomaticFormatter/CS/ScheduleAutomaticFormatter.csproj @@ -1,105 +1,19 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {E120542B-B6DD-4FF7-8071-37BACB04DDE4} - Library - Properties Revit.SDK.Samples.ScheduleAutomaticFormatter.CS - ScheduleAutomaticFormatter - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ScheduleAutomaticFormatter.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ScheduleAutomaticFormatter.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - - 3.5 - - - - - - - - True - True - Resources.resx - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ScheduleCreation/CS/ScheduleCreation.csproj b/SDK/Samples/ScheduleCreation/CS/ScheduleCreation.csproj index bd4e81ba..40c14fa2 100644 --- a/SDK/Samples/ScheduleCreation/CS/ScheduleCreation.csproj +++ b/SDK/Samples/ScheduleCreation/CS/ScheduleCreation.csproj @@ -1,90 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {541DE414-1696-48D4-BE72-9E52077CDACD} - Library - Properties Revit.SDK.Samples.ScheduleCreation.CS - ScheduleCreation - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ScheduleCreation.XML - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ScheduleCreation.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ScheduleToHTML/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ScheduleToHTML/CS/Properties/AssemblyInfo.cs index 2b888c0b..9bbf5f03 100644 --- a/SDK/Samples/ScheduleToHTML/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ScheduleToHTML/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ScheduleToHTML/CS/ScheduleHTMLExporter.cs b/SDK/Samples/ScheduleToHTML/CS/ScheduleHTMLExporter.cs index 3fb21097..2417960f 100644 --- a/SDK/Samples/ScheduleToHTML/CS/ScheduleHTMLExporter.cs +++ b/SDK/Samples/ScheduleToHTML/CS/ScheduleHTMLExporter.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -using System.Web.UI; using System.IO; +using System.Web.UI; using Autodesk.Revit.DB; namespace Revit.SDK.Samples.ScheduleToHTML.CS @@ -333,7 +333,7 @@ namespace Revit.SDK.Samples.ScheduleToHTML.CS /// /// The writer for the HTML file. /// - private HtmlTextWriter writer; + private HtmlTextWriter writer { get; set; } /// /// The schedule being exported. diff --git a/SDK/Samples/ScheduleToHTML/CS/ScheduleToHTML.csproj b/SDK/Samples/ScheduleToHTML/CS/ScheduleToHTML.csproj index 4ea349ce..b24dbe23 100644 --- a/SDK/Samples/ScheduleToHTML/CS/ScheduleToHTML.csproj +++ b/SDK/Samples/ScheduleToHTML/CS/ScheduleToHTML.csproj @@ -1,112 +1,32 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {6DAAF250-FCEE-4D36-9E26-F0155A31F779} - Library - Properties Revit.SDK.Samples.ScheduleToHTML.CS - ScheduleToHTML - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ScheduleToHTML.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\ScheduleToHTML.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset + + + + + - OnOutputUpdated - - - - - - - - - - - - 3.5 - - - - - - - - True - True - Resources.resx - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" -if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" + if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + echo d | xcopy /f /y "$(Pkghtmltextwriter)\lib\netstandard2.0\*.*" "$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\ScheduleToHTML\CS" + None - \ No newline at end of file + \ No newline at end of file diff --git a/SDK/Samples/Selections/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Selections/CS/Properties/AssemblyInfo.cs index fce837c7..81d76ccf 100644 --- a/SDK/Samples/Selections/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Selections/CS/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/Selections/CS/Selections.csproj b/SDK/Samples/Selections/CS/Selections.csproj index 0d24a9f1..46243d98 100644 --- a/SDK/Samples/Selections/CS/Selections.csproj +++ b/SDK/Samples/Selections/CS/Selections.csproj @@ -1,104 +1,17 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {E145CA05-3742-4CFA-95C3-EB4ACC85E4A6} - Library - Properties - Selections - Selections - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - 3.5 - - - - - 3.5 - - - 3.5 - - - + - - - - - - Form - - - SelectionForm.cs - - - - - - SelectionForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ShaftHolePuncher/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ShaftHolePuncher/CS/Properties/AssemblyInfo.cs index c34c7e76..9ebf4f4c 100644 --- a/SDK/Samples/ShaftHolePuncher/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ShaftHolePuncher/CS/Properties/AssemblyInfo.cs @@ -54,3 +54,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ShaftHolePuncher/CS/ShaftHolePuncher.csproj b/SDK/Samples/ShaftHolePuncher/CS/ShaftHolePuncher.csproj index 15721f2b..75a295a5 100644 --- a/SDK/Samples/ShaftHolePuncher/CS/ShaftHolePuncher.csproj +++ b/SDK/Samples/ShaftHolePuncher/CS/ShaftHolePuncher.csproj @@ -1,101 +1,11 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F505433F-AF41-4A23-AC0F-F38FFA99EC5D} - Library - Properties - ShaftHolePuncher - ShaftHolePuncher - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - - - - - - - - - Form - - - ShaftHolePuncherForm.cs - - - - - Designer - ShaftHolePuncherForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ShaftHolePuncher/CS/ShaftHolePuncherForm.cs b/SDK/Samples/ShaftHolePuncher/CS/ShaftHolePuncherForm.cs index df935868..cde92479 100644 --- a/SDK/Samples/ShaftHolePuncher/CS/ShaftHolePuncherForm.cs +++ b/SDK/Samples/ShaftHolePuncher/CS/ShaftHolePuncherForm.cs @@ -29,6 +29,7 @@ using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Point = System.Drawing.Point; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.ShaftHolePuncher.CS { diff --git a/SDK/Samples/SharedCoordinateSystem/CS/CoordinateSystemDataForm.cs b/SDK/Samples/SharedCoordinateSystem/CS/CoordinateSystemDataForm.cs index bbbddf79..071e5bcf 100644 --- a/SDK/Samples/SharedCoordinateSystem/CS/CoordinateSystemDataForm.cs +++ b/SDK/Samples/SharedCoordinateSystem/CS/CoordinateSystemDataForm.cs @@ -31,6 +31,7 @@ using System.Windows.Forms; using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.SharedCoordinateSystem.CS { diff --git a/SDK/Samples/SharedCoordinateSystem/CS/DuplicateForm.cs b/SDK/Samples/SharedCoordinateSystem/CS/DuplicateForm.cs index e0569bfd..6e69e0de 100644 --- a/SDK/Samples/SharedCoordinateSystem/CS/DuplicateForm.cs +++ b/SDK/Samples/SharedCoordinateSystem/CS/DuplicateForm.cs @@ -29,6 +29,7 @@ using System.Text; using System.Windows.Forms; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.SharedCoordinateSystem.CS { diff --git a/SDK/Samples/SharedCoordinateSystem/CS/PlaceInfo.cs b/SDK/Samples/SharedCoordinateSystem/CS/PlaceInfo.cs index 8a8199dd..f9f30eaa 100644 --- a/SDK/Samples/SharedCoordinateSystem/CS/PlaceInfo.cs +++ b/SDK/Samples/SharedCoordinateSystem/CS/PlaceInfo.cs @@ -31,6 +31,7 @@ using System.Windows.Forms; using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.SharedCoordinateSystem.CS { diff --git a/SDK/Samples/SharedCoordinateSystem/CS/Properties/AssemblyInfo.cs b/SDK/Samples/SharedCoordinateSystem/CS/Properties/AssemblyInfo.cs index 9858ba0e..5ff41d09 100644 --- a/SDK/Samples/SharedCoordinateSystem/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/SharedCoordinateSystem/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/SharedCoordinateSystem/CS/SharedCoordinateSystem.csproj b/SDK/Samples/SharedCoordinateSystem/CS/SharedCoordinateSystem.csproj index aa5cbec2..dc34d568 100644 --- a/SDK/Samples/SharedCoordinateSystem/CS/SharedCoordinateSystem.csproj +++ b/SDK/Samples/SharedCoordinateSystem/CS/SharedCoordinateSystem.csproj @@ -1,113 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {7E14896B-D571-4927-A55A-05DD26193312} - Library - Properties - SharedCoordinateSystem - SharedCoordinateSystem - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - CoordinateSystemDataForm.cs - - - Form - - - DuplicateForm.cs - - - - - - - - Designer - CoordinateSystemDataForm.cs - - - Designer - DuplicateForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/SheetToView3D/CS/SheetToView3D.csproj b/SDK/Samples/SheetToView3D/CS/SheetToView3D.csproj index 7057502b..dc34d568 100644 --- a/SDK/Samples/SheetToView3D/CS/SheetToView3D.csproj +++ b/SDK/Samples/SheetToView3D/CS/SheetToView3D.csproj @@ -1,88 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {2885DDD6-703A-4D8A-82BA-D57B3A4C4F43} - Library - Properties - SheetToView3D - SheetToView3D - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/SinePlotter/CS/Application.cs b/SDK/Samples/SinePlotter/CS/Application.cs index 7e516832..3c41338b 100644 --- a/SDK/Samples/SinePlotter/CS/Application.cs +++ b/SDK/Samples/SinePlotter/CS/Application.cs @@ -77,7 +77,7 @@ namespace Revit.SDK.Samples.SinePlotter.CS { assemblyPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); assemblyName = Assembly.GetExecutingAssembly().GetName().Name + ".dll"; - imageFolder = GetProjectDirectory() + "/Resources/"; + imageFolder = assemblyPath + "/Resources/"; //add a panel to go on the Add-In tab RibbonPanel panel = application.CreateRibbonPanel("ArrayPrismsOnASineCurve"); @@ -316,20 +316,6 @@ namespace Revit.SDK.Samples.SinePlotter.CS } } - - /// - /// Returns the path of the main project directory. - /// - /// A string object corresponding to the full path of the main project directory. - private String GetProjectDirectory() - { - //get the absolut path of the assembly - string assemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - //move two directory levels back - String grandParentDir = Directory.GetParent(assemblyPath).Parent.FullName; - return grandParentDir; - } - #endregion } } diff --git a/SDK/Samples/SinePlotter/CS/SinePlotter.csproj b/SDK/Samples/SinePlotter/CS/SinePlotter.csproj index 71dcad5c..cdef7acd 100644 --- a/SDK/Samples/SinePlotter/CS/SinePlotter.csproj +++ b/SDK/Samples/SinePlotter/CS/SinePlotter.csproj @@ -1,91 +1,19 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {7E9BA4F7-BDEB-4185-B589-A3A80AF512DC} - Library - Properties Revit.SDK.Samples.SinePlotter.CS - SinePlotter - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\SinePlotter.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\SinePlotter.XML true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - - 3.5 - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" @@ -93,4 +21,9 @@ if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" " None + + + Always + + \ No newline at end of file diff --git a/SDK/Samples/SlabProperties/CS/AssemblyInfo.cs b/SDK/Samples/SlabProperties/CS/AssemblyInfo.cs index b93a70f6..19927f61 100644 --- a/SDK/Samples/SlabProperties/CS/AssemblyInfo.cs +++ b/SDK/Samples/SlabProperties/CS/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -34,7 +34,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -79,3 +79,4 @@ using System.Runtime.CompilerServices; [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] +[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/SlabProperties/CS/Command.cs b/SDK/Samples/SlabProperties/CS/Command.cs index 1a393080..8448cdcd 100644 --- a/SDK/Samples/SlabProperties/CS/Command.cs +++ b/SDK/Samples/SlabProperties/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -24,11 +24,11 @@ using System; using System.Windows.Forms; -using Autodesk.Revit; -using Autodesk.Revit.DB.Structure; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; + namespace Revit.SDK.Samples.SlabProperties.CS { /// diff --git a/SDK/Samples/SlabProperties/CS/SlabProperitiesForm.cs b/SDK/Samples/SlabProperties/CS/SlabProperitiesForm.cs deleted file mode 100644 index 782b0e2b..00000000 --- a/SDK/Samples/SlabProperties/CS/SlabProperitiesForm.cs +++ /dev/null @@ -1,273 +0,0 @@ -// -// (C) Copyright 2003-2019 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// - - -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; - - -namespace Revit.SDK.Samples.SlabProperties.CS -{ - /// - /// Show some properties of a slab in Revit Structure 5, including Level, Type name, Span direction, - /// Material name, Thickness, and Young Modulus for each layer of the slab's material. - /// - public class SlabPropertiesForm : System.Windows.Forms.Form - { - private System.Windows.Forms.GroupBox layerGroupBox; - private System.Windows.Forms.RichTextBox layerRichTextBox; - private System.Windows.Forms.Label levelLabel; - private System.Windows.Forms.Label typeNameLabel; - private System.Windows.Forms.Label spanDirectionLabel; - private System.Windows.Forms.TextBox levelTextBox; - private System.Windows.Forms.TextBox typeNameTextBox; - private System.Windows.Forms.TextBox spanDirectionTextBox; - private System.Windows.Forms.Button closeButton; - - /// - /// Required designer variable. - /// - private System.ComponentModel.Container components = null; - private Label degreeLabel; - - // To store the data - private Command m_dataBuffer; - - - private SlabPropertiesForm() - { - // - // Required for Windows Form Designer support - // - InitializeComponent(); - } - - /// - /// overload the constructor - /// - /// To store the data of a slab - public SlabPropertiesForm(Command dataBuffer) - { - InitializeComponent(); - - // get all the data - m_dataBuffer = dataBuffer; - } - - /// - /// Clean up any resources being used. - /// - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (null != components) - { - components.Dispose(); - } - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.layerGroupBox = new System.Windows.Forms.GroupBox(); - this.layerRichTextBox = new System.Windows.Forms.RichTextBox(); - this.levelLabel = new System.Windows.Forms.Label(); - this.levelTextBox = new System.Windows.Forms.TextBox(); - this.typeNameTextBox = new System.Windows.Forms.TextBox(); - this.spanDirectionTextBox = new System.Windows.Forms.TextBox(); - this.typeNameLabel = new System.Windows.Forms.Label(); - this.spanDirectionLabel = new System.Windows.Forms.Label(); - this.closeButton = new System.Windows.Forms.Button(); - this.degreeLabel = new System.Windows.Forms.Label(); - this.layerGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // layerGroupBox - // - this.layerGroupBox.Controls.Add(this.layerRichTextBox); - this.layerGroupBox.Location = new System.Drawing.Point(22, 86); - this.layerGroupBox.Name = "layerGroupBox"; - this.layerGroupBox.Size = new System.Drawing.Size(375, 265); - this.layerGroupBox.TabIndex = 29; - this.layerGroupBox.TabStop = false; - this.layerGroupBox.Text = "Layers:"; - // - // layerRichTextBox - // - this.layerRichTextBox.Location = new System.Drawing.Point(6, 19); - this.layerRichTextBox.Name = "layerRichTextBox"; - this.layerRichTextBox.ReadOnly = true; - this.layerRichTextBox.Size = new System.Drawing.Size(359, 232); - this.layerRichTextBox.TabIndex = 2; - this.layerRichTextBox.Text = ""; - // - // levelLabel - // - this.levelLabel.Location = new System.Drawing.Point(13, 7); - this.levelLabel.Name = "levelLabel"; - this.levelLabel.Size = new System.Drawing.Size(98, 23); - this.levelLabel.TabIndex = 27; - this.levelLabel.Text = "Level:"; - this.levelLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // levelTextBox - // - this.levelTextBox.Location = new System.Drawing.Point(117, 8); - this.levelTextBox.Name = "levelTextBox"; - this.levelTextBox.ReadOnly = true; - this.levelTextBox.Size = new System.Drawing.Size(280, 20); - this.levelTextBox.TabIndex = 24; - // - // typeNameTextBox - // - this.typeNameTextBox.Location = new System.Drawing.Point(117, 34); - this.typeNameTextBox.Name = "typeNameTextBox"; - this.typeNameTextBox.ReadOnly = true; - this.typeNameTextBox.Size = new System.Drawing.Size(280, 20); - this.typeNameTextBox.TabIndex = 22; - // - // spanDirectionTextBox - // - this.spanDirectionTextBox.Location = new System.Drawing.Point(117, 60); - this.spanDirectionTextBox.Name = "spanDirectionTextBox"; - this.spanDirectionTextBox.ReadOnly = true; - this.spanDirectionTextBox.Size = new System.Drawing.Size(224, 20); - this.spanDirectionTextBox.TabIndex = 23; - // - // typeNameLabel - // - this.typeNameLabel.Location = new System.Drawing.Point(13, 34); - this.typeNameLabel.Name = "typeNameLabel"; - this.typeNameLabel.Size = new System.Drawing.Size(98, 23); - this.typeNameLabel.TabIndex = 25; - this.typeNameLabel.Text = "Type Name:"; - this.typeNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // spanDirectionLabel - // - this.spanDirectionLabel.Location = new System.Drawing.Point(13, 60); - this.spanDirectionLabel.Name = "spanDirectionLabel"; - this.spanDirectionLabel.Size = new System.Drawing.Size(98, 23); - this.spanDirectionLabel.TabIndex = 26; - this.spanDirectionLabel.Text = "Span Direction:"; - this.spanDirectionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // closeButton - // - this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.closeButton.Location = new System.Drawing.Point(322, 367); - this.closeButton.Name = "closeButton"; - this.closeButton.Size = new System.Drawing.Size(75, 23); - this.closeButton.TabIndex = 0; - this.closeButton.Text = "Close"; - this.closeButton.Click += new System.EventHandler(this.closeButton_Click); - // - // degreeLabel - // - this.degreeLabel.Location = new System.Drawing.Point(347, 59); - this.degreeLabel.Name = "degreeLabel"; - this.degreeLabel.Size = new System.Drawing.Size(50, 23); - this.degreeLabel.TabIndex = 26; - this.degreeLabel.Text = "Degree"; - this.degreeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // SlabPropertiesForm - // - this.AcceptButton = this.closeButton; - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.CancelButton = this.closeButton; - this.ClientSize = new System.Drawing.Size(411, 402); - this.Controls.Add(this.layerGroupBox); - this.Controls.Add(this.levelLabel); - this.Controls.Add(this.levelTextBox); - this.Controls.Add(this.typeNameTextBox); - this.Controls.Add(this.spanDirectionTextBox); - this.Controls.Add(this.typeNameLabel); - this.Controls.Add(this.degreeLabel); - this.Controls.Add(this.spanDirectionLabel); - this.Controls.Add(this.closeButton); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "SlabPropertiesForm"; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Slab Properties"; - this.Load += new System.EventHandler(this.SlabPropertiesForm_Load); - this.layerGroupBox.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - #endregion - - /// - /// Close the Form - /// - /// - /// - private void closeButton_Click(object sender, System.EventArgs e) - { - Close(); - } - - /// - /// Display the properties on the form when the form load - /// - /// - /// - private void SlabPropertiesForm_Load(object sender, System.EventArgs e) - { - this.levelTextBox.Text = m_dataBuffer.Level; - this.typeNameTextBox.Text = m_dataBuffer.TypeName; - this.spanDirectionTextBox.Text = m_dataBuffer.SpanDirection; - - int numberOfLayers = m_dataBuffer.NumberOfLayers; - - this.layerRichTextBox.Text = ""; - - for (int i = 0; i < numberOfLayers; i++) - { - // Get each layer's Material name and Young Modulus properties - m_dataBuffer.SetLayer(i); - - this.layerRichTextBox.Text += "Layer " + (i + 1).ToString() + "\r\n"; - this.layerRichTextBox.Text += "Material name: " + m_dataBuffer.LayerMaterialName + "\r\n"; - this.layerRichTextBox.Text += "Thickness: " + m_dataBuffer.LayerThickness + "\r\n"; - this.layerRichTextBox.Text += "YoungModulus X: " + m_dataBuffer.LayerYoungModulusX + "\r\n"; - this.layerRichTextBox.Text += "YoungModulus Y: " + m_dataBuffer.LayerYoungModulusY + "\r\n"; - this.layerRichTextBox.Text += "YoungModulus Z: " + m_dataBuffer.LayerYoungModulusZ + "\r\n"; - this.layerRichTextBox.Text += "-----------------------------------------------------------" + "\r\n"; - } - } - } -} diff --git a/SDK/Samples/SlabProperties/CS/SlabProperties.csproj b/SDK/Samples/SlabProperties/CS/SlabProperties.csproj index 6a628117..2645f583 100644 --- a/SDK/Samples/SlabProperties/CS/SlabProperties.csproj +++ b/SDK/Samples/SlabProperties/CS/SlabProperties.csproj @@ -1,142 +1,27 @@ - - + Local - 9.0.30729 - 2.0 - {D092B1DC-252A-4B30-A426-671A16189C2B} - Debug - AnyCPU - - - - - SlabProperties - - JScript Grid IE50 false - Library - SlabProperties - OnBuildSuccess - - - - - - - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - true - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - true - 4 - none - prompt + + false + - true bin\x64\Debug\ - DEBUG;TRACE 285212672 4096 - full - x64 - prompt - MinimumRecommendedRules.ruleset bin\x64\Release\ - TRACE 285212672 - true true 4096 - x64 - prompt - MinimumRecommendedRules.ruleset + - OnOutputUpdated - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - Code - - - - Form - - - SlabProperitiesForm.cs - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/SlabProperties/CS/SlabPropertiesForm.Designer.cs b/SDK/Samples/SlabProperties/CS/SlabPropertiesForm.Designer.cs new file mode 100644 index 00000000..49fc6159 --- /dev/null +++ b/SDK/Samples/SlabProperties/CS/SlabPropertiesForm.Designer.cs @@ -0,0 +1,175 @@ +namespace Revit.SDK.Samples.SlabProperties.CS +{ + public partial class SlabPropertiesForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + private System.Windows.Forms.GroupBox layerGroupBox; + private System.Windows.Forms.RichTextBox layerRichTextBox; + private System.Windows.Forms.Label levelLabel; + private System.Windows.Forms.Label typeNameLabel; + private System.Windows.Forms.Label spanDirectionLabel; + private System.Windows.Forms.TextBox levelTextBox; + private System.Windows.Forms.TextBox typeNameTextBox; + private System.Windows.Forms.TextBox spanDirectionTextBox; + private System.Windows.Forms.Button closeButton; + private System.Windows.Forms.Label degreeLabel; + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (null != components) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.layerGroupBox = new System.Windows.Forms.GroupBox(); + this.layerRichTextBox = new System.Windows.Forms.RichTextBox(); + this.levelLabel = new System.Windows.Forms.Label(); + this.levelTextBox = new System.Windows.Forms.TextBox(); + this.typeNameTextBox = new System.Windows.Forms.TextBox(); + this.spanDirectionTextBox = new System.Windows.Forms.TextBox(); + this.typeNameLabel = new System.Windows.Forms.Label(); + this.spanDirectionLabel = new System.Windows.Forms.Label(); + this.closeButton = new System.Windows.Forms.Button(); + this.degreeLabel = new System.Windows.Forms.Label(); + this.layerGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // layerGroupBox + // + this.layerGroupBox.Controls.Add(this.layerRichTextBox); + this.layerGroupBox.Location = new System.Drawing.Point(22, 86); + this.layerGroupBox.Name = "layerGroupBox"; + this.layerGroupBox.Size = new System.Drawing.Size(375, 265); + this.layerGroupBox.TabIndex = 29; + this.layerGroupBox.TabStop = false; + this.layerGroupBox.Text = "Layers:"; + // + // layerRichTextBox + // + this.layerRichTextBox.Location = new System.Drawing.Point(6, 19); + this.layerRichTextBox.Name = "layerRichTextBox"; + this.layerRichTextBox.ReadOnly = true; + this.layerRichTextBox.Size = new System.Drawing.Size(359, 232); + this.layerRichTextBox.TabIndex = 2; + this.layerRichTextBox.Text = ""; + // + // levelLabel + // + this.levelLabel.Location = new System.Drawing.Point(13, 7); + this.levelLabel.Name = "levelLabel"; + this.levelLabel.Size = new System.Drawing.Size(98, 23); + this.levelLabel.TabIndex = 27; + this.levelLabel.Text = "Level:"; + this.levelLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // levelTextBox + // + this.levelTextBox.Location = new System.Drawing.Point(117, 8); + this.levelTextBox.Name = "levelTextBox"; + this.levelTextBox.ReadOnly = true; + this.levelTextBox.Size = new System.Drawing.Size(280, 20); + this.levelTextBox.TabIndex = 24; + // + // typeNameTextBox + // + this.typeNameTextBox.Location = new System.Drawing.Point(117, 34); + this.typeNameTextBox.Name = "typeNameTextBox"; + this.typeNameTextBox.ReadOnly = true; + this.typeNameTextBox.Size = new System.Drawing.Size(280, 20); + this.typeNameTextBox.TabIndex = 22; + // + // spanDirectionTextBox + // + this.spanDirectionTextBox.Location = new System.Drawing.Point(117, 60); + this.spanDirectionTextBox.Name = "spanDirectionTextBox"; + this.spanDirectionTextBox.ReadOnly = true; + this.spanDirectionTextBox.Size = new System.Drawing.Size(224, 20); + this.spanDirectionTextBox.TabIndex = 23; + // + // typeNameLabel + // + this.typeNameLabel.Location = new System.Drawing.Point(13, 34); + this.typeNameLabel.Name = "typeNameLabel"; + this.typeNameLabel.Size = new System.Drawing.Size(98, 23); + this.typeNameLabel.TabIndex = 25; + this.typeNameLabel.Text = "Type Name:"; + this.typeNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // spanDirectionLabel + // + this.spanDirectionLabel.Location = new System.Drawing.Point(13, 60); + this.spanDirectionLabel.Name = "spanDirectionLabel"; + this.spanDirectionLabel.Size = new System.Drawing.Size(98, 23); + this.spanDirectionLabel.TabIndex = 26; + this.spanDirectionLabel.Text = "Span Direction:"; + this.spanDirectionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // closeButton + // + this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.closeButton.Location = new System.Drawing.Point(322, 367); + this.closeButton.Name = "closeButton"; + this.closeButton.Size = new System.Drawing.Size(75, 23); + this.closeButton.TabIndex = 0; + this.closeButton.Text = "Close"; + this.closeButton.Click += new System.EventHandler(this.closeButton_Click); + // + // degreeLabel + // + this.degreeLabel.Location = new System.Drawing.Point(347, 59); + this.degreeLabel.Name = "degreeLabel"; + this.degreeLabel.Size = new System.Drawing.Size(50, 23); + this.degreeLabel.TabIndex = 26; + this.degreeLabel.Text = "Degree"; + this.degreeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // SlabPropertiesForm + // + this.AcceptButton = this.closeButton; + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.CancelButton = this.closeButton; + this.ClientSize = new System.Drawing.Size(411, 402); + this.Controls.Add(this.layerGroupBox); + this.Controls.Add(this.levelLabel); + this.Controls.Add(this.levelTextBox); + this.Controls.Add(this.typeNameTextBox); + this.Controls.Add(this.spanDirectionTextBox); + this.Controls.Add(this.typeNameLabel); + this.Controls.Add(this.degreeLabel); + this.Controls.Add(this.spanDirectionLabel); + this.Controls.Add(this.closeButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "SlabPropertiesForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Slab Properties"; + this.Load += new System.EventHandler(this.SlabPropertiesForm_Load); + this.layerGroupBox.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + #endregion + } +} diff --git a/SDK/Samples/SlabProperties/CS/SlabPropertiesForm.cs b/SDK/Samples/SlabProperties/CS/SlabPropertiesForm.cs new file mode 100644 index 00000000..639d77c8 --- /dev/null +++ b/SDK/Samples/SlabProperties/CS/SlabPropertiesForm.cs @@ -0,0 +1,93 @@ +// +// (C) Copyright 2003-2023 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// +namespace Revit.SDK.Samples.SlabProperties.CS +{ + /// + /// Show some properties of a slab in Revit Structure 5, including Level, Type name, Span direction, + /// Material name, Thickness, and Young Modulus for each layer of the slab's material. + /// + public partial class SlabPropertiesForm : System.Windows.Forms.Form + { + // To store the data + private Command m_dataBuffer; + + private SlabPropertiesForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + } + + /// + /// overload the constructor + /// + /// To store the data of a slab + public SlabPropertiesForm(Command dataBuffer) + { + InitializeComponent(); + + // get all the data + m_dataBuffer = dataBuffer; + } + + /// + /// Close the Form + /// + /// + /// + private void closeButton_Click(object sender, System.EventArgs e) + { + Close(); + } + + /// + /// Display the properties on the form when the form load + /// + /// + /// + private void SlabPropertiesForm_Load(object sender, System.EventArgs e) + { + this.levelTextBox.Text = m_dataBuffer.Level; + this.typeNameTextBox.Text = m_dataBuffer.TypeName; + this.spanDirectionTextBox.Text = m_dataBuffer.SpanDirection; + + int numberOfLayers = m_dataBuffer.NumberOfLayers; + + this.layerRichTextBox.Text = ""; + + for (int i = 0; i < numberOfLayers; i++) + { + // Get each layer's Material name and Young Modulus properties + m_dataBuffer.SetLayer(i); + + this.layerRichTextBox.Text += "Layer " + (i + 1).ToString() + "\r\n"; + this.layerRichTextBox.Text += "Material name: " + m_dataBuffer.LayerMaterialName + "\r\n"; + this.layerRichTextBox.Text += "Thickness: " + m_dataBuffer.LayerThickness + "\r\n"; + this.layerRichTextBox.Text += "YoungModulus X: " + m_dataBuffer.LayerYoungModulusX + "\r\n"; + this.layerRichTextBox.Text += "YoungModulus Y: " + m_dataBuffer.LayerYoungModulusY + "\r\n"; + this.layerRichTextBox.Text += "YoungModulus Z: " + m_dataBuffer.LayerYoungModulusZ + "\r\n"; + this.layerRichTextBox.Text += "-----------------------------------------------------------" + "\r\n"; + } + } + } +} diff --git a/SDK/Samples/SlabProperties/CS/SlabPropertiesForm.resx b/SDK/Samples/SlabProperties/CS/SlabPropertiesForm.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/SDK/Samples/SlabProperties/CS/SlabPropertiesForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SDK/Samples/SlabProperties/VB.NET/AssemblyInfo.vb b/SDK/Samples/SlabProperties/VB.NET/AssemblyInfo.vb index 1a39db5b..fa5dee94 100644 --- a/SDK/Samples/SlabProperties/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/SlabProperties/VB.NET/AssemblyInfo.vb @@ -52,4 +52,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/SlabProperties/VB.NET/Command.vb b/SDK/Samples/SlabProperties/VB.NET/Command.vb index 7e3c095d..12fc6e2d 100644 --- a/SDK/Samples/SlabProperties/VB.NET/Command.vb +++ b/SDK/Samples/SlabProperties/VB.NET/Command.vb @@ -105,7 +105,7 @@ Public Class Command Catch displayProblem As Exception - TaskDialog.Show("Revit", displayProblem.ToString()) + UI.TaskDialog.Show("Revit", displayProblem.ToString()) Return Autodesk.Revit.UI.Result.Failed End Try @@ -296,14 +296,14 @@ Public Class Command If m_slabComponent.IsEmpty Then 'nothing selected - TaskDialog.Show("Revit", "Please select a slab.") + UI.TaskDialog.Show("Revit", "Please select a slab.") Return False ElseIf 1 <> m_slabComponent.Size Then 'too many things selected - TaskDialog.Show("Revit", "Please select only one slab.") + UI.TaskDialog.Show("Revit", "Please select only one slab.") Return False diff --git a/SDK/Samples/SlabProperties/VB.NET/SlabProperties.vbproj b/SDK/Samples/SlabProperties/VB.NET/SlabProperties.vbproj index e2331c38..461317cb 100644 --- a/SDK/Samples/SlabProperties/VB.NET/SlabProperties.vbproj +++ b/SDK/Samples/SlabProperties/VB.NET/SlabProperties.vbproj @@ -1,151 +1,23 @@ - - + Local - 9.0.30729 - 2.0 - {66FE594A-8686-4CF9-98F6-F2796EE0461E} - Debug - AnyCPU - - - - - SlabProperties - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.SlabProperties.VB.NET Revit.SDK.Samples.SlabProperties.VB.NET.%28None%29 - - Windows - - - v4.8 - - - - bin\ - - 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false + true + true - - bin\ - - - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - Form - - - SlabPropertiesForm.vb - Designer - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/SlabShapeEditing/CS/Command.cs b/SDK/Samples/SlabShapeEditing/CS/Command.cs index f8470a63..870ef4fd 100644 --- a/SDK/Samples/SlabShapeEditing/CS/Command.cs +++ b/SDK/Samples/SlabShapeEditing/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/SlabShapeEditing/CS/LineTool.cs b/SDK/Samples/SlabShapeEditing/CS/LineTool.cs index 0a8de207..f908e2e9 100644 --- a/SDK/Samples/SlabShapeEditing/CS/LineTool.cs +++ b/SDK/Samples/SlabShapeEditing/CS/LineTool.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/SlabShapeEditing/CS/MathTools.cs b/SDK/Samples/SlabShapeEditing/CS/MathTools.cs index 4cd80e22..766c265f 100644 --- a/SDK/Samples/SlabShapeEditing/CS/MathTools.cs +++ b/SDK/Samples/SlabShapeEditing/CS/MathTools.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/SlabShapeEditing/CS/Properties/AssemblyInfo.cs b/SDK/Samples/SlabShapeEditing/CS/Properties/AssemblyInfo.cs index f3c42c2b..5b59fe5a 100644 --- a/SDK/Samples/SlabShapeEditing/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/SlabShapeEditing/CS/Properties/AssemblyInfo.cs @@ -33,3 +33,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/SlabShapeEditing/CS/SlabProfile.cs b/SDK/Samples/SlabShapeEditing/CS/SlabProfile.cs index e65721f8..0c3d7934 100644 --- a/SDK/Samples/SlabShapeEditing/CS/SlabProfile.cs +++ b/SDK/Samples/SlabShapeEditing/CS/SlabProfile.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -28,6 +28,7 @@ using Autodesk.Revit.UI; using System.Drawing; using Autodesk.Revit; using System.Windows.Forms; +using System.Linq; namespace Revit.SDK.Samples.SlabShapeEditing.CS { @@ -362,12 +363,17 @@ namespace Revit.SDK.Samples.SlabShapeEditing.CS /// new created vertex public SlabShapeVertex AddVertex(PointF point) { - Transaction transaction = new Transaction( - m_commandData.Application.ActiveUIDocument.Document, "AddVertex"); + Document doc = m_commandData.Application.ActiveUIDocument.Document; + Transaction transaction = new Transaction(doc, "AddVertex"); transaction.Start(); Vector4 v1 = new Vector4(new Autodesk.Revit.DB.XYZ(point.X, point.Y, 0)); v1 = m_restoreMatrix.Transform(v1); - SlabShapeVertex vertex = m_slabShapeEditor.DrawPoint(new Autodesk.Revit.DB.XYZ(v1.X, v1.Y, v1.Z)); + if (!m_slabShapeEditor.IsEnabled) + { + m_slabShapeEditor.Enable(); + doc.Regenerate(); + } + SlabShapeVertex vertex = m_slabShapeEditor.AddPoint(new Autodesk.Revit.DB.XYZ(v1.X, v1.Y, v1.Z)); transaction.Commit(); //re-calculate geometry info GetSlabProfileInfo(); @@ -383,21 +389,26 @@ namespace Revit.SDK.Samples.SlabShapeEditing.CS /// new created Crease public SlabShapeCrease AddCrease(PointF point1, PointF point2) { + Document doc = m_commandData.Application.ActiveUIDocument.Document; //create first vertex - Transaction transaction = new Transaction( - m_commandData.Application.ActiveUIDocument.Document, "AddCrease"); + Transaction transaction = new Transaction(doc, "AddCrease"); transaction.Start(); + if (!m_slabShapeEditor.IsEnabled) + { + m_slabShapeEditor.Enable(); + doc.Regenerate(); + } Vector4 v1 = new Vector4(new Autodesk.Revit.DB.XYZ(point1.X, point1.Y, 0)); v1 = m_restoreMatrix.Transform(v1); - SlabShapeVertex vertex1 = m_slabShapeEditor.DrawPoint(new Autodesk.Revit.DB.XYZ(v1.X, v1.Y, v1.Z)); + SlabShapeVertex vertex1 = m_slabShapeEditor.AddPoint(new Autodesk.Revit.DB.XYZ(v1.X, v1.Y, v1.Z)); //create second vertex Vector4 v2 = new Vector4(new Autodesk.Revit.DB.XYZ(point2.X, point2.Y, 0)); v2 = m_restoreMatrix.Transform(v2); - SlabShapeVertex vertex2 = m_slabShapeEditor.DrawPoint(new Autodesk.Revit.DB.XYZ(v2.X, v2.Y, v2.Z)); + SlabShapeVertex vertex2 = m_slabShapeEditor.AddPoint(new Autodesk.Revit.DB.XYZ(v2.X, v2.Y, v2.Z)); //create crease - SlabShapeCreaseArray creases = m_slabShapeEditor.DrawSplitLine(vertex1, vertex2); + IList creases = m_slabShapeEditor.AddSplitLine(vertex1, vertex2); - SlabShapeCrease crease = creases.get_Item(0); + SlabShapeCrease crease = creases.First(); transaction.Commit(); //re-calculate geometry info GetSlabProfileInfo(); @@ -412,12 +423,17 @@ namespace Revit.SDK.Samples.SlabShapeEditing.CS public bool CanCreateVertex(PointF pointF) { bool createSuccess = false; - Transaction transaction = new Transaction( - m_commandData.Application.ActiveUIDocument.Document, "CanCreateVertex"); + Document doc = m_commandData.Application.ActiveUIDocument.Document; + Transaction transaction = new Transaction(doc, "AddVertex"); transaction.Start(); + if (!m_slabShapeEditor.IsEnabled) + { + m_slabShapeEditor.Enable(); + doc.Regenerate(); + } Vector4 v1 = new Vector4(new Autodesk.Revit.DB.XYZ(pointF.X, pointF.Y, 0)); v1 = m_restoreMatrix.Transform(v1); - SlabShapeVertex vertex = m_slabShapeEditor.DrawPoint(new Autodesk.Revit.DB.XYZ(v1.X, v1.Y, v1.Z)); + SlabShapeVertex vertex = m_slabShapeEditor.AddPoint(new Autodesk.Revit.DB.XYZ(v1.X, v1.Y, v1.Z)); if (null != vertex) { createSuccess = true; } transaction.RollBack(); //re-calculate geometry info diff --git a/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditing.csproj b/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditing.csproj index 384a1b7b..a6b9de68 100644 --- a/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditing.csproj +++ b/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditing.csproj @@ -1,86 +1,14 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {1DC983AE-320A-4CEB-8C7F-4223367099D0} - Library - Properties - SlabShapeEditing - SlabShapeEditing - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + false + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - - True - True - Resources.resx - - - - Form - - - SlabShapeEditingForm.cs - - Designer @@ -92,14 +20,7 @@ SlabShapeEditingForm.cs - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditingForm.Designer.cs b/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditingForm.Designer.cs index 661e1731..4540d959 100644 --- a/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditingForm.Designer.cs +++ b/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditingForm.Designer.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -34,9 +34,16 @@ namespace Revit.SDK.Samples.SlabShapeEditing.CS /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + if (components != null) + components.Dispose(); + if (m_toolPen != null) + m_toolPen.Dispose(); + if (m_selectPen != null) + m_selectPen.Dispose(); + if (m_profilePen != null) + m_profilePen.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditingForm.cs b/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditingForm.cs index 04618e80..cb90b1e5 100644 --- a/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditingForm.cs +++ b/SDK/Samples/SlabShapeEditing/CS/SlabShapeEditingForm.cs @@ -53,7 +53,7 @@ namespace Revit.SDK.Samples.SlabShapeEditing.CS int m_clickedIndex; //index of crease and vertex which mouse clicked. ArrayList m_createdVertices; // new created vertices ArrayList m_createCreases; // new created creases - SlabShapeEditor m_slabShapeEditor; //object use to edit slab shape + private SlabShapeEditor m_slabShapeEditor; //object use to edit slab shape SlabShapeCrease m_selectedCrease; //selected crease, mouse clicked on SlabShapeVertex m_selectedVertex; //selected vertex, mouse clicked on EditorState editorState; //state of user's operation @@ -277,20 +277,22 @@ namespace Revit.SDK.Samples.SlabShapeEditing.CS /// event args private void UpdateButton_Click(object sender, EventArgs e) { - if (-1 == m_clickedIndex) { TaskDialog.Show("Revit", selectFirst); return; } + if (-1 == m_clickedIndex) { Autodesk.Revit.UI.TaskDialog.Show("Revit", selectFirst); return; } double moveDistance = 0; try { moveDistance = Convert.ToDouble(this.DistanceTextBox.Text); } - catch (Exception) { TaskDialog.Show("Revit", justNumber); return; } + catch (Exception) { Autodesk.Revit.UI.TaskDialog.Show("Revit", justNumber); return; } - Transaction transaction = new Transaction( - m_commandData.Application.ActiveUIDocument.Document, "Update"); - transaction.Start(); - if (null != m_selectedCrease) - { m_slabShapeEditor.ModifySubElement(m_selectedCrease, moveDistance); } - else if (null != m_selectedVertex) - { m_slabShapeEditor.ModifySubElement(m_selectedVertex, moveDistance); } - transaction.Commit(); + using (Transaction transaction = new Transaction( + m_commandData.Application.ActiveUIDocument.Document, "Update")) + { + transaction.Start(); + if (null != m_selectedCrease) + { m_slabShapeEditor.ModifySubElement(m_selectedCrease, moveDistance); } + else if (null != m_selectedVertex) + { m_slabShapeEditor.ModifySubElement(m_selectedVertex, moveDistance); } + transaction.Commit(); + } //re-calculate geometry info m_slabProfile.GetSlabProfileInfo(); this.SlabShapePictureBox.Refresh(); diff --git a/SDK/Samples/SolidSolidCut/CS/SolidSolidCut.csproj b/SDK/Samples/SolidSolidCut/CS/SolidSolidCut.csproj index 2c72c960..d11c0ab2 100644 --- a/SDK/Samples/SolidSolidCut/CS/SolidSolidCut.csproj +++ b/SDK/Samples/SolidSolidCut/CS/SolidSolidCut.csproj @@ -1,80 +1,17 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {60A5EA87-088C-47CD-9B0A-B9B62334B978} - Library - Properties Revit.SDK.Samples.SolidSolidCut.CS - SolidSolidCut - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset true - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/SpanDirection/CS/Command.cs b/SDK/Samples/SpanDirection/CS/Command.cs index c017ff3f..692c55b1 100644 --- a/SDK/Samples/SpanDirection/CS/Command.cs +++ b/SDK/Samples/SpanDirection/CS/Command.cs @@ -28,6 +28,7 @@ using Autodesk.Revit; using Autodesk.Revit.DB.Structure; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.SpanDirection.CS { diff --git a/SDK/Samples/SpanDirection/CS/SpanDirection.csproj b/SDK/Samples/SpanDirection/CS/SpanDirection.csproj index cb39af12..4abca3c6 100644 --- a/SDK/Samples/SpanDirection/CS/SpanDirection.csproj +++ b/SDK/Samples/SpanDirection/CS/SpanDirection.csproj @@ -1,79 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {EFACF01D-6DED-4191-90E8-07EA63506792} - Library - Properties Revit.SDK.Samples.SpanDirection.CS - SpanDirection - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/SpotDimension/CS/Properties/AssemblyInfo.cs b/SDK/Samples/SpotDimension/CS/Properties/AssemblyInfo.cs index b1db2610..3d48e07e 100644 --- a/SDK/Samples/SpotDimension/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/SpotDimension/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/SpotDimension/CS/SpotDimension.csproj b/SDK/Samples/SpotDimension/CS/SpotDimension.csproj index 8fdbc597..dc34d568 100644 --- a/SDK/Samples/SpotDimension/CS/SpotDimension.csproj +++ b/SDK/Samples/SpotDimension/CS/SpotDimension.csproj @@ -1,96 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {4B9E2FC9-BDDA-4434-8BFE-39E13A127049} - Library - Properties - SpotDimension - SpotDimension - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - SpotDimensionInfoDlg.cs - - - - - - - Designer - SpotDimensionInfoDlg.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/StairsAutomation/CS/StairsAutomation.csproj b/SDK/Samples/StairsAutomation/CS/StairsAutomation.csproj index 5990e43d..e83a865f 100644 --- a/SDK/Samples/StairsAutomation/CS/StairsAutomation.csproj +++ b/SDK/Samples/StairsAutomation/CS/StairsAutomation.csproj @@ -1,105 +1,18 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {3AFBB480-F48A-4E07-B20E-A776318404A6} - Library - Properties Revit.SDK.Samples.StairsAutomationSample.CS - StairsAutomation - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\StairsAutomation.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\StairsAutomation.xml true - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - - - - - - - - - - - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/StructSample/CS/Command.cs b/SDK/Samples/StructSample/CS/Command.cs index b846dc13..06b4147d 100644 --- a/SDK/Samples/StructSample/CS/Command.cs +++ b/SDK/Samples/StructSample/CS/Command.cs @@ -29,6 +29,7 @@ using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Structure; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.StructSample.CS { diff --git a/SDK/Samples/StructSample/CS/StructSample.csproj b/SDK/Samples/StructSample/CS/StructSample.csproj index 7a82f8dd..63d4eb33 100644 --- a/SDK/Samples/StructSample/CS/StructSample.csproj +++ b/SDK/Samples/StructSample/CS/StructSample.csproj @@ -1,79 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {30F00329-6D42-4F58-9B0E-7948C9323B3A} - Library - Properties Revit.SDK.Samples.StructSample.CS - StructSample - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/StructuralLayerFunction/CS/AssemblyInfo.cs b/SDK/Samples/StructuralLayerFunction/CS/AssemblyInfo.cs index b93a70f6..dfd67be8 100644 --- a/SDK/Samples/StructuralLayerFunction/CS/AssemblyInfo.cs +++ b/SDK/Samples/StructuralLayerFunction/CS/AssemblyInfo.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -34,7 +34,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -79,3 +79,4 @@ using System.Runtime.CompilerServices; [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/StructuralLayerFunction/CS/Command.cs b/SDK/Samples/StructuralLayerFunction/CS/Command.cs index 3db66aa4..6b6322a6 100644 --- a/SDK/Samples/StructuralLayerFunction/CS/Command.cs +++ b/SDK/Samples/StructuralLayerFunction/CS/Command.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, diff --git a/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunction.csproj b/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunction.csproj index 23916d33..7d9e44f2 100644 --- a/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunction.csproj +++ b/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunction.csproj @@ -1,144 +1,27 @@ - - + Local - 9.0.30729 - 2.0 - {8F378242-B7CE-4352-8D71-2F53535DE0A8} - Debug - AnyCPU - - - - - StructuralLayerFunction - - JScript Grid IE50 false - Library - StructuralLayerFunction - OnBuildSuccess - - - - - - - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - true - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - true - 4 - none - prompt + + false + - true - bin\x64\Debug\ - DEBUG;TRACE 285212672 4096 - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE 285212672 - true true 4096 - x64 - prompt MinimumRecommendedRules.ruleset + - OnOutputUpdated - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - Code - - - Code - - - Form - - - StructuralLayerFunctionForm.cs - - - - - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunctionForm.Designer.cs b/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunctionForm.Designer.cs new file mode 100644 index 00000000..52ce640f --- /dev/null +++ b/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunctionForm.Designer.cs @@ -0,0 +1,85 @@ +namespace Revit.SDK.Samples.StructuralLayerFunction.CS +{ + public partial class StructuralLayerFunctionForm + { + private System.ComponentModel.Container components = null; + + private System.Windows.Forms.ListBox functionListBox; + private System.Windows.Forms.GroupBox functionGroupBox; + private System.Windows.Forms.Button okButton; + + /// + /// Clean up any resources being used. + /// + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (null != components) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.functionListBox = new System.Windows.Forms.ListBox(); + this.functionGroupBox = new System.Windows.Forms.GroupBox(); + this.okButton = new System.Windows.Forms.Button(); + this.functionGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // functionListBox + // + this.functionListBox.Location = new System.Drawing.Point(6, 24); + this.functionListBox.Name = "functionListBox"; + this.functionListBox.Size = new System.Drawing.Size(189, 147); + this.functionListBox.TabIndex = 0; + // + // functionGroupBox + // + this.functionGroupBox.Controls.Add(this.functionListBox); + this.functionGroupBox.Location = new System.Drawing.Point(12, 12); + this.functionGroupBox.Name = "functionGroupBox"; + this.functionGroupBox.Size = new System.Drawing.Size(201, 184); + this.functionGroupBox.TabIndex = 1; + this.functionGroupBox.TabStop = false; + this.functionGroupBox.Text = "Layers Functions List"; + // + // okButton + // + this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.okButton.Location = new System.Drawing.Point(138, 202); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 2; + this.okButton.Text = "OK"; + // + // StructuralLayerFunctionForm + // + this.AcceptButton = this.okButton; + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.CancelButton = this.okButton; + this.ClientSize = new System.Drawing.Size(225, 236); + this.Controls.Add(this.okButton); + this.Controls.Add(this.functionGroupBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "StructuralLayerFunctionForm"; + this.ShowInTaskbar = false; + this.Text = "Structure Layers Function"; + this.functionGroupBox.ResumeLayout(false); + this.ResumeLayout(false); + + } + #endregion + } +} diff --git a/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunctionForm.cs b/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunctionForm.cs index 104db78f..99827b9a 100644 --- a/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunctionForm.cs +++ b/SDK/Samples/StructuralLayerFunction/CS/StructuralLayerFunctionForm.cs @@ -1,5 +1,5 @@ // -// (C) Copyright 2003-2019 by Autodesk, Inc. +// (C) Copyright 2003-2023 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, @@ -20,27 +20,13 @@ // (Rights in Technical Data and Computer Software), as applicable. // - -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; - namespace Revit.SDK.Samples.StructuralLayerFunction.CS { /// /// display the function of each of a select floor's structural layers /// - public class StructuralLayerFunctionForm : System.Windows.Forms.Form + public partial class StructuralLayerFunctionForm : System.Windows.Forms.Form { - private System.Windows.Forms.ListBox functionListBox; - private System.Windows.Forms.GroupBox functionGroupBox; - private System.Windows.Forms.Button okButton; - - private System.ComponentModel.Container components = null; - - /// /// Constructor of StructuralLayerFunctionForm /// @@ -53,81 +39,5 @@ namespace Revit.SDK.Samples.StructuralLayerFunction.CS // Set the data source of the ListBox control functionListBox.DataSource = dataBuffer.Functions; } - - - /// - /// Clean up any resources being used. - /// - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if(null != components ) - { - components.Dispose(); - } - } - base.Dispose( disposing ); - } - - - #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.functionListBox = new System.Windows.Forms.ListBox(); - this.functionGroupBox = new System.Windows.Forms.GroupBox(); - this.okButton = new System.Windows.Forms.Button(); - this.functionGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // functionListBox - // - this.functionListBox.Location = new System.Drawing.Point(6, 24); - this.functionListBox.Name = "functionListBox"; - this.functionListBox.Size = new System.Drawing.Size(189, 147); - this.functionListBox.TabIndex = 0; - // - // functionGroupBox - // - this.functionGroupBox.Controls.Add(this.functionListBox); - this.functionGroupBox.Location = new System.Drawing.Point(12, 12); - this.functionGroupBox.Name = "functionGroupBox"; - this.functionGroupBox.Size = new System.Drawing.Size(201, 184); - this.functionGroupBox.TabIndex = 1; - this.functionGroupBox.TabStop = false; - this.functionGroupBox.Text = "Layers Functions List"; - // - // okButton - // - this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.okButton.Location = new System.Drawing.Point(138, 202); - this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(75, 23); - this.okButton.TabIndex = 2; - this.okButton.Text = "OK"; - // - // StructuralLayerFunctionForm - // - this.AcceptButton = this.okButton; - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.CancelButton = this.okButton; - this.ClientSize = new System.Drawing.Size(225, 236); - this.Controls.Add(this.okButton); - this.Controls.Add(this.functionGroupBox); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "StructuralLayerFunctionForm"; - this.ShowInTaskbar = false; - this.Text = "Structure Layers Function"; - this.functionGroupBox.ResumeLayout(false); - this.ResumeLayout(false); - - } - #endregion } } diff --git a/SDK/Samples/StructuralLayerFunction/VB.NET/AssemblyInfo.vb b/SDK/Samples/StructuralLayerFunction/VB.NET/AssemblyInfo.vb index 7c9fe2cb..cc2d139d 100644 --- a/SDK/Samples/StructuralLayerFunction/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/StructuralLayerFunction/VB.NET/AssemblyInfo.vb @@ -52,4 +52,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/StructuralLayerFunction/VB.NET/StructuralLayerFunction.vbproj b/SDK/Samples/StructuralLayerFunction/VB.NET/StructuralLayerFunction.vbproj index 8366d4e9..218110ce 100644 --- a/SDK/Samples/StructuralLayerFunction/VB.NET/StructuralLayerFunction.vbproj +++ b/SDK/Samples/StructuralLayerFunction/VB.NET/StructuralLayerFunction.vbproj @@ -1,152 +1,27 @@ - - + Local - 9.0.30729 - 2.0 - {8FA11C47-D55E-4738-902C-86FF70207191} - Debug - AnyCPU - - - - - StructuralLayerFunction - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.StructuralLayerFunction.VB.NET Revit.SDK.Samples.StructuralLayerFunction.VB.NET.%28None%29 - - Windows - - - v4.8 - - - - bin\debug\ - - 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full - - - bin\ - - - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset + + false + true + true + - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - Code - - - Code - - - Form - - - StructuralLayerFunctionForm.vb - - - - - - + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/TagBeam/CS/Properties/AssemblyInfo.cs b/SDK/Samples/TagBeam/CS/Properties/AssemblyInfo.cs index d5c29aec..7b3cad58 100644 --- a/SDK/Samples/TagBeam/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/TagBeam/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/TagBeam/CS/TagBeam.csproj b/SDK/Samples/TagBeam/CS/TagBeam.csproj index d13965f1..a762ccdb 100644 --- a/SDK/Samples/TagBeam/CS/TagBeam.csproj +++ b/SDK/Samples/TagBeam/CS/TagBeam.csproj @@ -1,96 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {832CF83C-93D1-4250-8DE2-940E433F9FA3} - Library - Properties Revit.SDK.Samples.TagBeam.CS - TagBeam - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - true + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - Form - - - TagBeamForm.cs - - - - - - Designer - TagBeamForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/TagBeam/CS/TagBeamForm.cs b/SDK/Samples/TagBeam/CS/TagBeamForm.cs index a7e6eea6..fe3324d4 100644 --- a/SDK/Samples/TagBeam/CS/TagBeamForm.cs +++ b/SDK/Samples/TagBeam/CS/TagBeamForm.cs @@ -30,6 +30,7 @@ using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.TagBeam.CS { diff --git a/SDK/Samples/TestFloorThickness/VB.NET/TestFloorThickness.vbproj b/SDK/Samples/TestFloorThickness/VB.NET/TestFloorThickness.vbproj index a76ed312..c1bbe55f 100644 --- a/SDK/Samples/TestFloorThickness/VB.NET/TestFloorThickness.vbproj +++ b/SDK/Samples/TestFloorThickness/VB.NET/TestFloorThickness.vbproj @@ -1,89 +1,11 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {BEF05D6C-DCEB-4B70-A2E0-BD719F3455F2} - Library Revit.SDK.Samples.TestFloorThickness.VB.NET - TestFloorThickness Windows - v4.8 - - - - true - full - true - true - bin\Debug\ - - - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 true - - pdbonly - false - true - true - bin\Release\ - - - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - true - - - true - true - true - bin\Debug\ - true - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - true - true - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - pdbonly - x64 - MinimumRecommendedRules.ruleset - - - - - 3.5 - - - - - - - - - - - - - - - - - - + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/TestWallThickness/VB.NET/TestWallThickness.vbproj b/SDK/Samples/TestWallThickness/VB.NET/TestWallThickness.vbproj index 45c0a938..60052d75 100644 --- a/SDK/Samples/TestWallThickness/VB.NET/TestWallThickness.vbproj +++ b/SDK/Samples/TestWallThickness/VB.NET/TestWallThickness.vbproj @@ -1,89 +1,11 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {33676F33-06B5-44C1-9B42-5DA7B973E20B} - Library Revit.SDK.Samples.TestWallThickness.VB.NET - TestWallThickness Windows - v4.8 - - - - true - full - true - true - bin\Debug\ - - - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 true - - pdbonly - false - true - true - bin\Release\ - - - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - true - - - true - true - true - bin\Debug\ - true - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - true - true - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - pdbonly - x64 - MinimumRecommendedRules.ruleset - - - - - 3.5 - - - - - - - - - - - - - - - - - - + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Toposolid/CS/Command.cs b/SDK/Samples/Toposolid/CS/Command.cs index 86c1aba4..c09ce6f7 100644 --- a/SDK/Samples/Toposolid/CS/Command.cs +++ b/SDK/Samples/Toposolid/CS/Command.cs @@ -31,6 +31,7 @@ using System.Collections.Generic; using System.Windows.Forms; using System.Linq; using Autodesk.Revit.DB.Architecture; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Toposolid.CS { diff --git a/SDK/Samples/Toposolid/CS/Toposolid.csproj b/SDK/Samples/Toposolid/CS/Toposolid.csproj index 28a080ef..9baca26b 100644 --- a/SDK/Samples/Toposolid/CS/Toposolid.csproj +++ b/SDK/Samples/Toposolid/CS/Toposolid.csproj @@ -1,96 +1,16 @@ - - - - - None - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {C1F1D064-9582-4DD9-9D41-1197DF1EB5B2} - Library - Properties - Toposolid - Toposolid - v4.8 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\Toposolid.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\Toposolid.XML - + + - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 true bin\Debug\Toposolid.XML - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x64 true bin\Release\Toposolid.XML - - OnOutputUpdated - - - - - - - - - - 4.7 - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/TransactionControl/CS/CreateWallForm.cs b/SDK/Samples/TransactionControl/CS/CreateWallForm.cs index 4c17a360..04ed9ed6 100644 --- a/SDK/Samples/TransactionControl/CS/CreateWallForm.cs +++ b/SDK/Samples/TransactionControl/CS/CreateWallForm.cs @@ -31,6 +31,7 @@ using System.Windows.Forms; using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.TransactionControl.CS { diff --git a/SDK/Samples/TransactionControl/CS/Properties/AssemblyInfo.cs b/SDK/Samples/TransactionControl/CS/Properties/AssemblyInfo.cs index 35f1192d..b69da3b7 100644 --- a/SDK/Samples/TransactionControl/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/TransactionControl/CS/Properties/AssemblyInfo.cs @@ -33,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/TransactionControl/CS/TransactionControl.csproj b/SDK/Samples/TransactionControl/CS/TransactionControl.csproj index 012733b4..75a295a5 100644 --- a/SDK/Samples/TransactionControl/CS/TransactionControl.csproj +++ b/SDK/Samples/TransactionControl/CS/TransactionControl.csproj @@ -1,105 +1,11 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CABE1E71-BAD8-4B8F-9001-D9D2A484F146} - Library - Properties - TransactionControl - TransactionControl - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - Form - - - CreateWallForm.cs - - - - Form - - - TransactionForm.cs - - - - - Designer - CreateWallForm.cs - - - Designer - TransactionForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/TransactionControl/CS/TransactionForm.cs b/SDK/Samples/TransactionControl/CS/TransactionForm.cs index f7f25e3e..83419e2a 100644 --- a/SDK/Samples/TransactionControl/CS/TransactionForm.cs +++ b/SDK/Samples/TransactionControl/CS/TransactionForm.cs @@ -35,11 +35,12 @@ using Autodesk.Revit.UI; namespace Revit.SDK.Samples.TransactionControl.CS { using SystemColor = System.Drawing.Color; + using TaskDialog = Autodesk.Revit.UI.TaskDialog; - /// - /// A Form used to deal with transaction and create, move or delete a wall - /// - public partial class TransactionForm : System.Windows.Forms.Form + /// + /// A Form used to deal with transaction and create, move or delete a wall + /// + public partial class TransactionForm : System.Windows.Forms.Form { /// /// An enum used to indicate which operation is executed diff --git a/SDK/Samples/TraverseSystem/CS/Command.cs b/SDK/Samples/TraverseSystem/CS/Command.cs index accc1b9b..75413c47 100644 --- a/SDK/Samples/TraverseSystem/CS/Command.cs +++ b/SDK/Samples/TraverseSystem/CS/Command.cs @@ -34,6 +34,7 @@ using Autodesk.Revit.DB.Plumbing; using Autodesk.Revit.UI.Selection; using Application = Autodesk.Revit.ApplicationServices.Application; using Element = Autodesk.Revit.DB.Element; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.TraverseSystem.CS { diff --git a/SDK/Samples/TraverseSystem/CS/TraverseSystem.XML b/SDK/Samples/TraverseSystem/CS/TraverseSystem.XML deleted file mode 100644 index 12abc9f1..00000000 --- a/SDK/Samples/TraverseSystem/CS/TraverseSystem.XML +++ /dev/null @@ -1,210 +0,0 @@ - - - - TraverseSystem - - - - - Implements the Revit add-in interface IExternalCommand - - - - - Implement this method as an external command for Revit. - - An object that is passed to the external application - which contains data related to the command, - such as the application object and active view. - A message that can be set by the external application - which will be displayed if a failure or cancellation is returned by - the external command. - A set of elements to which the external application - can add elements that are to be highlighted in case of failure or cancellation. - Return the status of the external command. - A result of Succeeded means that the API external method functioned as expected. - Cancelled can be used to signify that the user cancelled the external operation - at some point. Failure should be returned if the application is unable to proceed with - the operation. - - - - Get the mechanical or piping system from selected element - - Selected element - The extracted mechanical or piping system. Null if no expected system is found. - - - - Get the mechanical or piping system from the connectors of selected element - - Connectors of selected element - The found mechanical or piping system - - - - A TreeNode object represents an element in the system - - - - - Id of the element - - - - - Flow direction of the node - For the starting element of the traversal, the direction will be the same as the connector - connected to its following element; Otherwise it will be the direction of the connector connected to - its previous element - - - - - The parent node of the current node. - - - - - The connector of the previous element to which current element is connected - - - - - The first-level child nodes of the current node - - - - - Active document of Revit - - - - - Id of the element - - - - - Flow direction of the node - - - - - Gets and sets the parent node of the current node. - - - - - Gets and sets the first-level child nodes of the current node - - - - - The connector of the previous element to which current element is connected - - - - - Constructor - - Revit document - Element's Id - - - - Get Element by its Id - - Element's Id - Element - - - - Dump the node into XML file - - XmlWriter object - - - - Data structure of the traversal - - - - - Constructor - - Revit document - The MEP system to traverse - - - - Traverse the system - - - - - Get the starting element node. - If the system has base equipment then get it; - Otherwise get the owner of the open connector in the system - - The starting element node - - - - Get the owner of the open connector as the starting element - - The owner - - - - Get the open connector of the system if the system has no base equipment - - An element in the system - The connector of the previous element - to which the element is connected - The found open connector - - - - Traverse the system recursively by analyzing each element - - The element to be analyzed - - - - Find all child nodes of the specified element node - - The specified element node to be analyzed - - - - Get the connected connector of one connector - - The connector to be analyzed - The connected connector - - - - Get element by its id - - - - - Dump the traversal into an XML file - - Name of the XML file - - - - Write basic information of the MEP system into the XML file - - XMLWriter object - - - - Write paths of the traversal into the XML file - - XMLWriter object - - - diff --git a/SDK/Samples/TraverseSystem/CS/TraverseSystem.csproj b/SDK/Samples/TraverseSystem/CS/TraverseSystem.csproj index cfae8b95..2a1ac16b 100644 --- a/SDK/Samples/TraverseSystem/CS/TraverseSystem.csproj +++ b/SDK/Samples/TraverseSystem/CS/TraverseSystem.csproj @@ -1,86 +1,14 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {0D4A84F6-2CC9-48D6-B3CE-7C5AF0E69F7B} - Library - Properties - TraverseSystem - TraverseSystem - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - TraverseSystem.XML - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - - - true + true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Truss/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Truss/CS/Properties/AssemblyInfo.cs index 3151929d..2153e3c9 100644 --- a/SDK/Samples/Truss/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Truss/CS/Properties/AssemblyInfo.cs @@ -54,3 +54,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/Truss/CS/Truss.csproj b/SDK/Samples/Truss/CS/Truss.csproj index 74e54abc..75a295a5 100644 --- a/SDK/Samples/Truss/CS/Truss.csproj +++ b/SDK/Samples/Truss/CS/Truss.csproj @@ -1,105 +1,11 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {1AB26248-7122-4FE0-9B02-2C14013B2CF2} - Library - Properties - Truss - Truss - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - - True - True - Resources.resx - - - Form - - - TrussForm.cs - - - - - - Designer - ResXFileCodeGenerator - Resources.Designer.cs - - - Designer - TrussForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Truss/CS/TrussForm.cs b/SDK/Samples/Truss/CS/TrussForm.cs index c51a3de4..df68dcca 100644 --- a/SDK/Samples/Truss/CS/TrussForm.cs +++ b/SDK/Samples/Truss/CS/TrussForm.cs @@ -34,6 +34,7 @@ using Autodesk.Revit.UI; using Autodesk.Revit.DB.Structure; using System.Drawing.Drawing2D; using System.Threading; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Truss.CS { diff --git a/SDK/Samples/Truss/CS/TrussGeometry.cs b/SDK/Samples/Truss/CS/TrussGeometry.cs index f8111563..ae19eba1 100644 --- a/SDK/Samples/Truss/CS/TrussGeometry.cs +++ b/SDK/Samples/Truss/CS/TrussGeometry.cs @@ -31,6 +31,7 @@ using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.DB.Structure; using Point = System.Drawing.Point; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Truss.CS { diff --git a/SDK/Samples/TypeSelector/VB.NET/AssemblyInfo.vb b/SDK/Samples/TypeSelector/VB.NET/AssemblyInfo.vb index f032f0e8..2d9f6249 100644 --- a/SDK/Samples/TypeSelector/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/TypeSelector/VB.NET/AssemblyInfo.vb @@ -51,4 +51,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/TypeSelector/VB.NET/TypeSelector.vbproj b/SDK/Samples/TypeSelector/VB.NET/TypeSelector.vbproj index 95276670..a124682d 100644 --- a/SDK/Samples/TypeSelector/VB.NET/TypeSelector.vbproj +++ b/SDK/Samples/TypeSelector/VB.NET/TypeSelector.vbproj @@ -1,152 +1,22 @@ - - + Local - 9.0.30729 - 2.0 - {3AF8FED9-7ADB-4797-AF29-D6C5509C1EC9} - Debug - AnyCPU - - - - - TypeSelector - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.TypeSelector.VB.NET - - - - Windows - - - v4.8 - - - - bin\ - - 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false + true + true - - bin\ - - - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - Form - - - TypeSelectorWindow.vb - Designer - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/UIAPI/CS/ExternalApplication.cs b/SDK/Samples/UIAPI/CS/ExternalApplication.cs index 74199e9c..126fb5ae 100644 --- a/SDK/Samples/UIAPI/CS/ExternalApplication.cs +++ b/SDK/Samples/UIAPI/CS/ExternalApplication.cs @@ -35,6 +35,7 @@ using System.Windows.Media.Imaging; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using RApplication = Autodesk.Revit.ApplicationServices.Application; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.UIAPI.CS { diff --git a/SDK/Samples/UIAPI/CS/PreviewControl/PreviewCommand.cs b/SDK/Samples/UIAPI/CS/PreviewControl/PreviewCommand.cs index 858372b3..c77939ca 100644 --- a/SDK/Samples/UIAPI/CS/PreviewControl/PreviewCommand.cs +++ b/SDK/Samples/UIAPI/CS/PreviewControl/PreviewCommand.cs @@ -65,9 +65,9 @@ namespace Revit.SDK.Samples.UIAPI.CS PreviewModel form = new PreviewModel(commandData.Application.Application, ElementId.InvalidElementId); form.ShowDialog(); } - catch (Exception e) + catch { - throw e; + throw; } finally { diff --git a/SDK/Samples/UIAPI/CS/PreviewControl/PreviewModel.Designer.cs b/SDK/Samples/UIAPI/CS/PreviewControl/PreviewModel.Designer.cs index e5110d01..9fcddce8 100644 --- a/SDK/Samples/UIAPI/CS/PreviewControl/PreviewModel.Designer.cs +++ b/SDK/Samples/UIAPI/CS/PreviewControl/PreviewModel.Designer.cs @@ -1,4 +1,6 @@ -namespace Revit.SDK.Samples.UIAPI.CS +using System; + +namespace Revit.SDK.Samples.UIAPI.CS { partial class PreviewModel { @@ -16,6 +18,9 @@ if (disposing && (components != null)) { components.Dispose(); + (_uiApplication as IDisposable)?.Dispose(); + (_dbDocument as IDisposable)?.Dispose(); + (_application as IDisposable)?.Dispose(); } base.Dispose(disposing); } diff --git a/SDK/Samples/UIAPI/CS/Properties/AssemblyInfo.cs b/SDK/Samples/UIAPI/CS/Properties/AssemblyInfo.cs index 37efb251..6960edc8 100644 --- a/SDK/Samples/UIAPI/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/UIAPI/CS/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("UIAPI")] -[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2014")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -21,6 +21,7 @@ using System.Runtime.InteropServices; // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("bae35eaf-9bd1-4add-b739-d1c1edf37c03")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] // Version information for an assembly consists of the following four values: // diff --git a/SDK/Samples/UIAPI/CS/UIAPI.csproj b/SDK/Samples/UIAPI/CS/UIAPI.csproj index 802c5a9a..ff9f87ab 100644 --- a/SDK/Samples/UIAPI/CS/UIAPI.csproj +++ b/SDK/Samples/UIAPI/CS/UIAPI.csproj @@ -1,41 +1,13 @@ - - + + - Debug - AnyCPU - 8.0.30703 + true 2.0 - {4B81280E-72CB-4414-A4F7-C2CAC7FEDBF5} - Library - Properties Revit.SDK.Samples.UIAPI.CS - UIAPI - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true true bin\x64\Debug\ - DEBUG;TRACE full x64 prompt @@ -44,7 +16,6 @@ bin\x64\Release\ - TRACE true true pdbonly @@ -52,113 +23,10 @@ prompt MinimumRecommendedRules.ruleset + OnOutputUpdated - - - - - - - - - - - - - - - - - - - - - - - Form - - - DragAndDrop.cs - - - - - Options.xaml - - - UserControl1.xaml - - - UserControl2.xaml - - - UserControl3.xaml - - - - Form - - - PreviewModel.cs - - - - True - True - Resources.resx - - - - - DragAndDrop.cs - - - PreviewModel.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - - - - None diff --git a/SDK/Samples/Units/CS/FormatForm.cs b/SDK/Samples/Units/CS/FormatForm.cs index 16ea7e4c..0593ca9c 100644 --- a/SDK/Samples/Units/CS/FormatForm.cs +++ b/SDK/Samples/Units/CS/FormatForm.cs @@ -30,6 +30,7 @@ using System.Text; using System.Windows.Forms; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Units.CS { diff --git a/SDK/Samples/Units/CS/Properties/AssemblyInfo.cs b/SDK/Samples/Units/CS/Properties/AssemblyInfo.cs index e5079492..89ed4f3a 100644 --- a/SDK/Samples/Units/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/Units/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/Units/CS/Units.csproj b/SDK/Samples/Units/CS/Units.csproj index 54f6d572..90be143e 100644 --- a/SDK/Samples/Units/CS/Units.csproj +++ b/SDK/Samples/Units/CS/Units.csproj @@ -1,107 +1,16 @@ - - + - Debug - AnyCPU - 9.0.30729 - 2.0 - {5FD97756-A1E4-493C-93B7-36D9A8F36839} - Library - Properties Revit.SDK.Samples.Units.CS - Units - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\Units.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE bin\Debug\Units.XML true - full - x64 - prompt - MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - - 3.5 - - - - - - Form - - - FormatForm.cs - - - Form - - - UnitsForm.cs - - - - - - FormatForm.cs - - - UnitsForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Units/CS/UnitsForm.cs b/SDK/Samples/Units/CS/UnitsForm.cs index cb71e416..50685c64 100644 --- a/SDK/Samples/Units/CS/UnitsForm.cs +++ b/SDK/Samples/Units/CS/UnitsForm.cs @@ -30,6 +30,7 @@ using System.Text; using System.Windows.Forms; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.Units.CS { diff --git a/SDK/Samples/VSProps/SDKSamples.CivilAlignments.Sdk.targets b/SDK/Samples/VSProps/SDKSamples.CivilAlignments.Sdk.targets new file mode 100644 index 00000000..1c884b90 --- /dev/null +++ b/SDK/Samples/VSProps/SDKSamples.CivilAlignments.Sdk.targets @@ -0,0 +1,41 @@ + + + + + 1607 + + + + Code + + + + + + False + C:\Program Files\Autodesk\Revit 2025\RevitAPI.dll + False + + + C:\Program Files\Autodesk\Revit 2025\RevitAPIUI.dll + False + + + False + C:\Program Files\Autodesk\Revit 2025\RevitAddInUtility.dll + False + + + C:\Program Files\Autodesk\Revit 2025\Addins\CivilAlignments\Autodesk.CivilAlignments.DBApplication.dll + False + + + \ No newline at end of file diff --git a/SDK/Samples/VSProps/SDKSamples.CivilAlignments.targets b/SDK/Samples/VSProps/SDKSamples.NewMacro.Sdk.targets similarity index 61% rename from SDK/Samples/VSProps/SDKSamples.CivilAlignments.targets rename to SDK/Samples/VSProps/SDKSamples.NewMacro.Sdk.targets index 1f520dd8..3206d3d5 100644 --- a/SDK/Samples/VSProps/SDKSamples.CivilAlignments.targets +++ b/SDK/Samples/VSProps/SDKSamples.NewMacro.Sdk.targets @@ -12,41 +12,38 @@ --> 1607 - - bin\Release\ - - - bin\Debug\ - Code - - $(MSBuildBinPath)\Microsoft.Csharp.targets - - + - + False - C:/Program Files/Autodesk/Revit 2024/RevitAPI.dll + C:\Program Files\Autodesk\Revit 2025\RevitAPIMacros.dll + False + + + False + C:\Program Files\Autodesk\Revit 2025\RevitAPIUIMacros.dll + False + + + False + C:\Program Files\Autodesk\Revit 2025\RevitAPI.dll False - C:/Program Files/Autodesk/Revit 2024/RevitAPIUI.dll + C:\Program Files\Autodesk\Revit 2025\RevitAPIUI.dll False False - C:/Program Files/Autodesk/Revit 2024/RevitAddInUtility.dll - False - - - C:/Program Files/Autodesk/Revit 2024/Addins\CivilAlignments\Autodesk.CivilAlignments.DBApplication.dll + C:\Program Files\Autodesk\Revit 2025\RevitAddInUtility.dll False - + \ No newline at end of file diff --git a/SDK/Samples/VSProps/SDKSamples.Sdk.props b/SDK/Samples/VSProps/SDKSamples.Sdk.props new file mode 100644 index 00000000..0dd71d4f --- /dev/null +++ b/SDK/Samples/VSProps/SDKSamples.Sdk.props @@ -0,0 +1,21 @@ + + + net8.0-windows + false + true + true + x64 + false + OnOutputUpdated + + + + + + + bin\Release\ + + + bin\Debug\ + + \ No newline at end of file diff --git a/SDK/Samples/VSProps/SDKSamples.Sdk.targets b/SDK/Samples/VSProps/SDKSamples.Sdk.targets new file mode 100644 index 00000000..89405830 --- /dev/null +++ b/SDK/Samples/VSProps/SDKSamples.Sdk.targets @@ -0,0 +1,37 @@ + + + + + 1607 + + + + Code + + + + + + False + C:\Program Files\Autodesk\Revit 2025\RevitAPI.dll + False + + + C:\Program Files\Autodesk\Revit 2025\RevitAPIUI.dll + False + + + False + C:\Program Files\Autodesk\Revit 2025\RevitAddInUtility.dll + False + + + \ No newline at end of file diff --git a/SDK/Samples/VSProps/SDKSamples.Steel.targets b/SDK/Samples/VSProps/SDKSamples.Steel.Sdk.targets similarity index 56% rename from SDK/Samples/VSProps/SDKSamples.Steel.targets rename to SDK/Samples/VSProps/SDKSamples.Steel.Sdk.targets index 830d9dc6..85d39c03 100644 --- a/SDK/Samples/VSProps/SDKSamples.Steel.targets +++ b/SDK/Samples/VSProps/SDKSamples.Steel.Sdk.targets @@ -2,7 +2,7 @@ - + 1607 - - bin\Release\ - - - bin\Debug\ - Code - + - - C:/Program Files/Autodesk/Revit 2024/Addins\SteelConnections\ASObjectsMgd.dll + + False + C:\Program Files\Autodesk\Revit 2025\RevitAPI.dll + False + + + C:\Program Files\Autodesk\Revit 2025\RevitAPIUI.dll + False + + + False + C:\Program Files\Autodesk\Revit 2025\RevitAddInUtility.dll + False + + + C:\Program Files\Autodesk\Revit 2025\Addins\SteelConnections\ASObjectsMgd.dll False - C:/Program Files/Autodesk/Revit 2024/Addins\SteelConnections\ASGeometryMgd.dll + C:\Program Files\Autodesk\Revit 2025\Addins\SteelConnections\ASGeometryMgd.dll False - C:/Program Files/Autodesk/Revit 2024/Addins\SteelConnections\ASCADLinkMgd.dll + C:\Program Files\Autodesk\Revit 2025\Addins\SteelConnections\ASCADLinkMgd.dll False - C:/Program Files/Autodesk/Revit 2024/Addins\SteelConnections\DotNetRoots.dll + C:\Program Files\Autodesk\Revit 2025\Addins\SteelConnections\DotNetRoots.dll False - C:/Program Files/Autodesk/Revit 2024/Addins\SteelConnections\Autodesk.SteelConnectionsDB.dll + C:\Program Files\Autodesk\Revit 2025\Addins\SteelConnections\Autodesk.SteelConnectionsDB.dll False - + \ No newline at end of file diff --git a/SDK/Samples/VSProps/SDKSamples.VB.Sdk.props b/SDK/Samples/VSProps/SDKSamples.VB.Sdk.props new file mode 100644 index 00000000..739b5ead --- /dev/null +++ b/SDK/Samples/VSProps/SDKSamples.VB.Sdk.props @@ -0,0 +1,11 @@ + + + net8.0-windows + false + x64 + + + + + + \ No newline at end of file diff --git a/SDK/Samples/VSProps/SDKSamples.VB.Sdk.targets b/SDK/Samples/VSProps/SDKSamples.VB.Sdk.targets new file mode 100644 index 00000000..11f14d81 --- /dev/null +++ b/SDK/Samples/VSProps/SDKSamples.VB.Sdk.targets @@ -0,0 +1,15 @@ + + + + + False + C:\Program Files\Autodesk\Revit 2025\RevitAPI.dll + False + + + False + C:\Program Files\Autodesk\Revit 2025\RevitAPIUI.dll + False + + + \ No newline at end of file diff --git a/SDK/Samples/VSProps/SDKSamples.VB.targets b/SDK/Samples/VSProps/SDKSamples.VB.targets index 6d33c8c1..d872c1a4 100644 --- a/SDK/Samples/VSProps/SDKSamples.VB.targets +++ b/SDK/Samples/VSProps/SDKSamples.VB.targets @@ -8,13 +8,13 @@ False - C:/Program Files/Autodesk/Revit 2024/RevitAPI.dll + C:\Program Files\Autodesk\Revit 2025\RevitAPI.dll False False - C:/Program Files/Autodesk/Revit 2024/RevitAPIUI.dll + C:\Program Files\Autodesk\Revit 2025\RevitAPIUI.dll False - + \ No newline at end of file diff --git a/SDK/Samples/VSProps/SDKSamples.targets b/SDK/Samples/VSProps/SDKSamples.targets index bc7f7c02..3537ae38 100644 --- a/SDK/Samples/VSProps/SDKSamples.targets +++ b/SDK/Samples/VSProps/SDKSamples.targets @@ -30,17 +30,17 @@ False - C:/Program Files/Autodesk/Revit 2024/RevitAPI.dll + C:\Program Files\Autodesk\Revit 2025\RevitAPI.dll False - C:/Program Files/Autodesk/Revit 2024/RevitAPIUI.dll + C:\Program Files\Autodesk\Revit 2025\RevitAPIUI.dll False False - C:/Program Files/Autodesk/Revit 2024/RevitAddInUtility.dll + C:\Program Files\Autodesk\Revit 2025\RevitAddInUtility.dll False - + \ No newline at end of file diff --git a/SDK/Samples/VersionChecking/CS/Properties/AssemblyInfo.cs b/SDK/Samples/VersionChecking/CS/Properties/AssemblyInfo.cs index 530cbffa..d4221a1d 100644 --- a/SDK/Samples/VersionChecking/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/VersionChecking/CS/Properties/AssemblyInfo.cs @@ -56,3 +56,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/VersionChecking/CS/VersionChecking.csproj b/SDK/Samples/VersionChecking/CS/VersionChecking.csproj index b1e7982b..dc34d568 100644 --- a/SDK/Samples/VersionChecking/CS/VersionChecking.csproj +++ b/SDK/Samples/VersionChecking/CS/VersionChecking.csproj @@ -1,100 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {3CB1D57A-C128-470A-A0AB-AFF25C573B79} - Library - Properties - VersionChecking - VersionChecking - - - - - - - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - VersionCheckingForm.cs - - - - - Designer - VersionCheckingForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ViewPrinter/CS/PrintMgr.cs b/SDK/Samples/ViewPrinter/CS/PrintMgr.cs index 2da222e0..ef314012 100644 --- a/SDK/Samples/ViewPrinter/CS/PrintMgr.cs +++ b/SDK/Samples/ViewPrinter/CS/PrintMgr.cs @@ -30,6 +30,7 @@ using System.Drawing.Printing; using Autodesk.Revit; using Autodesk.Revit.DB; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.ViewPrinter.CS { diff --git a/SDK/Samples/ViewPrinter/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ViewPrinter/CS/Properties/AssemblyInfo.cs index 648a84a3..954a551e 100644 --- a/SDK/Samples/ViewPrinter/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ViewPrinter/CS/Properties/AssemblyInfo.cs @@ -55,3 +55,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/ViewPrinter/CS/ViewPrinter.csproj b/SDK/Samples/ViewPrinter/CS/ViewPrinter.csproj index a4ec0dce..dc34d568 100644 --- a/SDK/Samples/ViewPrinter/CS/ViewPrinter.csproj +++ b/SDK/Samples/ViewPrinter/CS/ViewPrinter.csproj @@ -1,142 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {15D03F50-CF7C-4173-9577-A4B36012FF90} - Library - Properties - ViewPrinter - ViewPrinter - - - - - 2.0 - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - Form - - - PrintMgrForm.cs - - - - Form - - - PrintSetupForm.cs - - - - Form - - - ReNameForm.cs - - - Form - - - SaveAsForm.cs - - - - Form - - - ViewSheetSetForm.cs - - - - - Designer - PrintMgrForm.cs - - - Designer - PrintSetupForm.cs - - - Designer - ReNameForm.cs - - - Designer - SaveAsForm.cs - - - Designer - ViewSheetSetForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/ViewTemplateCreation/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ViewTemplateCreation/CS/Properties/AssemblyInfo.cs index 7f955bb8..072174d5 100644 --- a/SDK/Samples/ViewTemplateCreation/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/ViewTemplateCreation/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows7.0")] \ No newline at end of file diff --git a/SDK/Samples/ViewTemplateCreation/CS/ViewTemplateCreation.csproj b/SDK/Samples/ViewTemplateCreation/CS/ViewTemplateCreation.csproj index 5762c43a..bb6609a9 100644 --- a/SDK/Samples/ViewTemplateCreation/CS/ViewTemplateCreation.csproj +++ b/SDK/Samples/ViewTemplateCreation/CS/ViewTemplateCreation.csproj @@ -1,84 +1,11 @@ - - + - - None - - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C447128E-26AC-4552-8F17-B40B8DC6C3CC} - Library - Properties Revit.SDK.Samples.ViewTemplateCreation.CS - ViewTemplateCreation - - - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\ViewTemplateCreation.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - 4.7 - - - - - - Form - - - ViewTemplateCreationForm.cs - - - - - - - ViewTemplateCreationForm.cs - - - - - - OnOutputUpdated + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" - + \ No newline at end of file diff --git a/SDK/Samples/Viewers/AnalyticalViewer/VB.NET/AnalyticalViewer.vbproj b/SDK/Samples/Viewers/AnalyticalViewer/VB.NET/AnalyticalViewer.vbproj index a82a1229..3d137fbb 100644 --- a/SDK/Samples/Viewers/AnalyticalViewer/VB.NET/AnalyticalViewer.vbproj +++ b/SDK/Samples/Viewers/AnalyticalViewer/VB.NET/AnalyticalViewer.vbproj @@ -1,146 +1,23 @@ - - + Local - 9.0.30729 - 2.0 - {1ADAB5BD-80A9-46E4-8B57-AB6865A0AE07} - Debug - AnyCPU - - - - - AnalyticalViewer - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.AnalyticalViewer.VB.NET - - - - Windows - - - v4.8 - - - - bin\ - AnalyticalViewer.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full - - - bin\ - AnalyticalViewer.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - AnalyticalViewer.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - AnalyticalViewer.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset + + false + - - System - - - System.Data - - - - System.XML - - - 3.5 - + - - - - - - - - - - Code - - - Code - - - - - - - - {f2a04d84-b791-4738-a226-d38cdd8ebf87} - RevitViewer - - - + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Viewers/AnalyticalViewer/VB.NET/AssemblyInfo.vb b/SDK/Samples/Viewers/AnalyticalViewer/VB.NET/AssemblyInfo.vb index a18934da..5ea5aeb0 100644 --- a/SDK/Samples/Viewers/AnalyticalViewer/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/Viewers/AnalyticalViewer/VB.NET/AssemblyInfo.vb @@ -51,4 +51,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/Viewers/ElementViewer/VB.NET/AssemblyInfo.vb b/SDK/Samples/Viewers/ElementViewer/VB.NET/AssemblyInfo.vb index a9246170..280e4cc1 100644 --- a/SDK/Samples/Viewers/ElementViewer/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/Viewers/ElementViewer/VB.NET/AssemblyInfo.vb @@ -51,4 +51,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/Viewers/ElementViewer/VB.NET/ElementViewer.vbproj b/SDK/Samples/Viewers/ElementViewer/VB.NET/ElementViewer.vbproj index 08aad85f..2b45748e 100644 --- a/SDK/Samples/Viewers/ElementViewer/VB.NET/ElementViewer.vbproj +++ b/SDK/Samples/Viewers/ElementViewer/VB.NET/ElementViewer.vbproj @@ -1,146 +1,23 @@ - - + Local - 9.0.30729 - 2.0 - {0F4E2284-7141-43F7-8EE1-439DB0AE0075} - Debug - AnyCPU - - - - - ElementViewer - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.ElementViewer.VB.NET - - - - Windows - - - v4.8 - - - - bin\debug\ - ElementViewer.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full - - - bin\ - ElementViewer.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - ElementViewer.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - ElementViewer.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset + + false + - - System - - - System.Data - - - - System.XML - - - 3.5 - + - - - - - - - - - - Code - - - Code - - - - - {F2A04D84-B791-4738-A226-D38CDD8EBF87} - RevitViewer - - - - - - + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Viewers/RevitViewer/VB.NET/AssemblyInfo.vb b/SDK/Samples/Viewers/RevitViewer/VB.NET/AssemblyInfo.vb index bbc242f3..12d3d8d6 100644 --- a/SDK/Samples/Viewers/RevitViewer/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/Viewers/RevitViewer/VB.NET/AssemblyInfo.vb @@ -52,4 +52,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/Viewers/RevitViewer/VB.NET/RevitViewer.vbproj b/SDK/Samples/Viewers/RevitViewer/VB.NET/RevitViewer.vbproj index bf34beaa..4f510390 100644 --- a/SDK/Samples/Viewers/RevitViewer/VB.NET/RevitViewer.vbproj +++ b/SDK/Samples/Viewers/RevitViewer/VB.NET/RevitViewer.vbproj @@ -1,160 +1,22 @@ - - + Local - 9.0.30729 - 2.0 - {F2A04D84-B791-4738-A226-D38CDD8EBF87} - Debug - AnyCPU - - - - - RevitViewer - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.RevitViewer.VB.NET - - - - Windows - - - v4.8 - - - - bin\ - RevitViewer.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full + + false + true + true - - bin\ - RevitViewer.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - RevitViewer.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - RevitViewer.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - 3.5 - - - - - - - - - - - - Code - - - Code - - - Code - - - Code - - - Form - - - Code - - - ViewerWindow.vb - - - - - - + + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/Viewers/RoomViewer/VB.NET/AssemblyInfo.vb b/SDK/Samples/Viewers/RoomViewer/VB.NET/AssemblyInfo.vb index 7e029bef..e9ae00bc 100644 --- a/SDK/Samples/Viewers/RoomViewer/VB.NET/AssemblyInfo.vb +++ b/SDK/Samples/Viewers/RoomViewer/VB.NET/AssemblyInfo.vb @@ -51,4 +51,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - + + \ No newline at end of file diff --git a/SDK/Samples/Viewers/RoomViewer/VB.NET/RoomViewer.vbproj b/SDK/Samples/Viewers/RoomViewer/VB.NET/RoomViewer.vbproj index 57713c8b..0b2023e6 100644 --- a/SDK/Samples/Viewers/RoomViewer/VB.NET/RoomViewer.vbproj +++ b/SDK/Samples/Viewers/RoomViewer/VB.NET/RoomViewer.vbproj @@ -1,149 +1,26 @@ - - + Local - 9.0.30729 - 2.0 - {5E06B1F9-1B43-4667-908C-BFFCC7DE1588} - Debug - AnyCPU - - - - - RoomViewer - - None JScript Grid IE50 false - Library - Binary - On - Off Revit.SDK.Samples.RoomViewer.VB.NET - - - - Windows - - - v4.8 - - - - bin\ - RoomViewer.xml 285212672 - - - - - true - true - true - false - false - false - true - 1 - 42016,42017,42018,42019,42032 - full - - - bin\ - RoomViewer.xml - 285212672 - - - - - false - true - false - true - false - false - true - 1 - 42016,42017,42018,42019,42032 - none - - - true - true - true - bin\Debug\ - 285212672 - RoomViewer.xml - 1 - true - 42016,42017,42018,42019,42032 - full - x64 - MinimumRecommendedRules.ruleset - - - true - bin\Release\ - 285212672 - RoomViewer.xml - true - 1 - true - 42016,42017,42018,42019,42032 - x64 - MinimumRecommendedRules.ruleset + + false + Off - - System - - - System.Data - - - - System.XML - - - 3.5 - + - - - - - - - - - - Code - - - Code - - - - - {F2A04D84-B791-4738-A226-D38CDD8EBF87} - RevitViewer - - - - - - + - - set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/VisibilityControl/CS/Properties/AssemblyInfo.cs b/SDK/Samples/VisibilityControl/CS/Properties/AssemblyInfo.cs index 05288049..c2fc7a2b 100644 --- a/SDK/Samples/VisibilityControl/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/VisibilityControl/CS/Properties/AssemblyInfo.cs @@ -33,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/VisibilityControl/CS/VisibilityControl.csproj b/SDK/Samples/VisibilityControl/CS/VisibilityControl.csproj index f6734722..dc34d568 100644 --- a/SDK/Samples/VisibilityControl/CS/VisibilityControl.csproj +++ b/SDK/Samples/VisibilityControl/CS/VisibilityControl.csproj @@ -1,93 +1,13 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {6F7D3FF8-39DF-4053-B5BA-71804A673F30} - Library - Properties - VisibilityControl - VisibilityControl - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - + + - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - - 3.5 - - - - - - - - Form - - - VisibilityCtrlForm.cs - - - - - Designer - VisibilityCtrlForm.cs - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" diff --git a/SDK/Samples/VisibilityControl/CS/VisibilityCtrlForm.cs b/SDK/Samples/VisibilityControl/CS/VisibilityCtrlForm.cs index e71bf3d4..9513b5f6 100644 --- a/SDK/Samples/VisibilityControl/CS/VisibilityCtrlForm.cs +++ b/SDK/Samples/VisibilityControl/CS/VisibilityCtrlForm.cs @@ -30,6 +30,7 @@ using System.Windows.Forms; using Autodesk.Revit; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.VisibilityControl.CS { diff --git a/SDK/Samples/WinderStairs/CS/Forms/LWinderOptions.cs b/SDK/Samples/WinderStairs/CS/Forms/LWinderOptions.cs index 00f9bbc3..aed17c8e 100644 --- a/SDK/Samples/WinderStairs/CS/Forms/LWinderOptions.cs +++ b/SDK/Samples/WinderStairs/CS/Forms/LWinderOptions.cs @@ -24,6 +24,7 @@ using System; using System.Windows.Forms; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.WinderStairs.CS { diff --git a/SDK/Samples/WinderStairs/CS/Forms/UWinderOptions.cs b/SDK/Samples/WinderStairs/CS/Forms/UWinderOptions.cs index 284f47ca..92653538 100644 --- a/SDK/Samples/WinderStairs/CS/Forms/UWinderOptions.cs +++ b/SDK/Samples/WinderStairs/CS/Forms/UWinderOptions.cs @@ -24,6 +24,7 @@ using System; using System.Windows.Forms; using Autodesk.Revit.UI; +using TaskDialog = Autodesk.Revit.UI.TaskDialog; namespace Revit.SDK.Samples.WinderStairs.CS { diff --git a/SDK/Samples/WinderStairs/CS/Properties/AssemblyInfo.cs b/SDK/Samples/WinderStairs/CS/Properties/AssemblyInfo.cs index 66ea3326..2946fd68 100644 --- a/SDK/Samples/WinderStairs/CS/Properties/AssemblyInfo.cs +++ b/SDK/Samples/WinderStairs/CS/Properties/AssemblyInfo.cs @@ -53,3 +53,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("windows7.0")] diff --git a/SDK/Samples/WinderStairs/CS/WinderStairs.csproj b/SDK/Samples/WinderStairs/CS/WinderStairs.csproj index 319cdace..ef1f7d96 100644 --- a/SDK/Samples/WinderStairs/CS/WinderStairs.csproj +++ b/SDK/Samples/WinderStairs/CS/WinderStairs.csproj @@ -1,130 +1,17 @@ - - + - Debug - AnyCPU 9.0.30729 - 2.0 - {3DEDE48B-7FC9-4923-844C-3AE7A08D55E6} - Library - Properties Revit.SDK.Samples.WinderStairs.CS - WinderStairs - - - v4.8 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\WinderStairs.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true + - true - bin\x64\Debug\ - DEBUG;TRACE - bin\Debug\WinderStairs.XML true - full - x64 - prompt - MinimumRecommendedRules.ruleset + bin\Debug\WinderStairs.XML - bin\x64\Release\ - TRACE - true true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - OnOutputUpdated - - - - - - - - 3.5 - - - - - - - - - - - - True - True - Resources.resx - - - - - Form - - - UWinderOptions.cs - - - - Form - - - LWinderOptions.cs - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - LWinderOptions.cs - - - UWinderOptions.cs - - - - - - - - - - - + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.py" if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" @@ -132,4 +19,7 @@ if exist %25FILEFORSAMPLEREG%25 py -3 %25FILEFORSAMPLEREG%25 "$(ProjectPath)" " None + + + \ No newline at end of file diff --git a/SDK/Steel Connections SDK/Documentation/DatabasePatching.docx b/SDK/Steel Connections SDK/Documentation/DatabasePatching.docx index 0b3a4b59..2b3cbc1e 100644 Binary files a/SDK/Steel Connections SDK/Documentation/DatabasePatching.docx and b/SDK/Steel Connections SDK/Documentation/DatabasePatching.docx differ diff --git a/SDK/Steel Connections SDK/Documentation/Steel Connections .NET API Developer Training Guide.docx b/SDK/Steel Connections SDK/Documentation/Steel Connections .NET API Developer Training Guide.docx index 16cad322..802a6b50 100644 Binary files a/SDK/Steel Connections SDK/Documentation/Steel Connections .NET API Developer Training Guide.docx and b/SDK/Steel Connections SDK/Documentation/Steel Connections .NET API Developer Training Guide.docx differ diff --git a/SDK/Steel Connections SDK/Documentation/Steel Connections COM API Developer Training Guide.docx b/SDK/Steel Connections SDK/Documentation/Steel Connections COM API Developer Training Guide.docx index 7e099e45..79c0367e 100644 Binary files a/SDK/Steel Connections SDK/Documentation/Steel Connections COM API Developer Training Guide.docx and b/SDK/Steel Connections SDK/Documentation/Steel Connections COM API Developer Training Guide.docx differ diff --git a/SDK/Steel Connections SDK/Documentation/Steel Connections COM API Reference Guide.docx b/SDK/Steel Connections SDK/Documentation/Steel Connections COM API Reference Guide.docx index 54502a87..60704a90 100644 Binary files a/SDK/Steel Connections SDK/Documentation/Steel Connections COM API Reference Guide.docx and b/SDK/Steel Connections SDK/Documentation/Steel Connections COM API Reference Guide.docx differ diff --git a/SDK/Steel Connections SDK/ReadMeFirst.docx b/SDK/Steel Connections SDK/ReadMeFirst.docx index 26d94f97..4f96d07d 100644 Binary files a/SDK/Steel Connections SDK/ReadMeFirst.docx and b/SDK/Steel Connections SDK/ReadMeFirst.docx differ diff --git a/SDK/Steel Connections SDK/Samples/ReadMeFirst Samples.docx b/SDK/Steel Connections SDK/Samples/ReadMeFirst Samples.docx index b0850094..e38654fe 100644 Binary files a/SDK/Steel Connections SDK/Samples/ReadMeFirst Samples.docx and b/SDK/Steel Connections SDK/Samples/ReadMeFirst Samples.docx differ diff --git a/SDK/Steel Connections SDK/Samples/SampleClipAngle/SampleClipAngle.csproj b/SDK/Steel Connections SDK/Samples/SampleClipAngle/SampleClipAngle.csproj index 790d94c6..5117b13e 100644 --- a/SDK/Steel Connections SDK/Samples/SampleClipAngle/SampleClipAngle.csproj +++ b/SDK/Steel Connections SDK/Samples/SampleClipAngle/SampleClipAngle.csproj @@ -1,43 +1,9 @@ - - - + - - None - - - - - Debug x64 - {8CFF2BFD-0E4D-4A20-95F4-C1FD4BDF0703} - Library - Properties - SampleClipAngle - SampleClipAngle - v4.7.2 - 512 - true - - - true - full - false - ..\..\Binaries\ - DEBUG;TRACE - prompt - 4 - x64 - - - pdbonly - true - ..\..\Binaries\ - TRACE - prompt - 4 - x64 + true + False @@ -79,32 +45,6 @@ True $(ASInstallDir)\Interop.DSCRootsCOMLib.dll - - - - - - - - - - - - - - - Form - - - SampleClipUI.cs - - - - - SampleClipUI.cs - Designer - - - - + + \ No newline at end of file diff --git a/SDK/Steel Connections SDK/Samples/SampleClipAngleNative/SampleClipAngleNative.vcxproj b/SDK/Steel Connections SDK/Samples/SampleClipAngleNative/SampleClipAngleNative.vcxproj index 86962203..69e55ddf 100644 --- a/SDK/Steel Connections SDK/Samples/SampleClipAngleNative/SampleClipAngleNative.vcxproj +++ b/SDK/Steel Connections SDK/Samples/SampleClipAngleNative/SampleClipAngleNative.vcxproj @@ -83,11 +83,11 @@ true - ..\..\Binaries\ + ..\..\Binaries\Debug false - ..\..\Binaries\ + ..\..\Binaries\Release diff --git a/SDK/Steel Connections SDK/Samples/SampleDesign/SampleDesign.csproj b/SDK/Steel Connections SDK/Samples/SampleDesign/SampleDesign.csproj index 8ec5a618..bb0b8a63 100644 --- a/SDK/Steel Connections SDK/Samples/SampleDesign/SampleDesign.csproj +++ b/SDK/Steel Connections SDK/Samples/SampleDesign/SampleDesign.csproj @@ -1,49 +1,13 @@ - - - + - - None - - - - - Debug x64 - {9CE75523-141E-4F65-8F96-71E2A9C826E2} - Library - Properties - SampleDesign - SampleDesign - v4.8 - 512 SAK SAK SAK SAK - - - - true - full - false - ..\..\Binaries\ - DEBUG;TRACE - prompt - 4 - false - x64 - - - pdbonly - true - ..\..\Binaries\ - TRACE - prompt - 4 - false - x64 + true + False @@ -82,48 +46,17 @@ $(ASInstallDir)\JointDesignUtils.dll - - - - - - - - - - - - + UserControl - - Settings.cs - - + UserControl - - SimpleTorsors.cs - - + UserControl - - Torsors.cs - - - - - Settings.cs - - - SimpleTorsors.cs - - - Torsors.cs - @@ -136,12 +69,9 @@ True - - - + + + + + + \ No newline at end of file diff --git a/SDK/Steel Connections SDK/Samples/SampleJoint/SteelConnectionsJointExample.csproj b/SDK/Steel Connections SDK/Samples/SampleJoint/SteelConnectionsJointExample.csproj index 1da1ec99..424039f6 100644 --- a/SDK/Steel Connections SDK/Samples/SampleJoint/SteelConnectionsJointExample.csproj +++ b/SDK/Steel Connections SDK/Samples/SampleJoint/SteelConnectionsJointExample.csproj @@ -1,49 +1,9 @@ - - - + - - None - - - - - Debug x64 - {0D5537D0-19F6-40A0-B5C6-852210AE6983} - Library - Properties - SteelConnectionsJointExample - SteelConnectionsJointExample - v4.8 - 512 - SAK - SAK - SAK - SAK - - - - true - full - false - ..\..\Binaries\ - DEBUG;TRACE - prompt - 4 - false - x64 - - - pdbonly - true - ..\..\Binaries\ - TRACE - prompt - 4 - false - x64 + true + False @@ -65,41 +25,9 @@ $(ASInstallDir)\Interop.DSCODBCCOMLib.dll True - - - - - - - - - - - - - - Form - - - Page1.cs - - - - - Page1.cs - Designer - - - - - + + \ No newline at end of file diff --git a/SDK/Steel Connections SDK/Samples/SampleLapJoint/SampleLapJoint.csproj b/SDK/Steel Connections SDK/Samples/SampleLapJoint/SampleLapJoint.csproj index fecb91ff..73d3e009 100644 --- a/SDK/Steel Connections SDK/Samples/SampleLapJoint/SampleLapJoint.csproj +++ b/SDK/Steel Connections SDK/Samples/SampleLapJoint/SampleLapJoint.csproj @@ -1,42 +1,10 @@ - - + + + x64 + - - None - - - - - Debug - x64 - {C9172C84-3F14-4B43-8FD8-26BD93E27EFC} - Library - Properties - SampleLapJoint - SampleLapJoint - v4.8 - 512 - true - - - - true - ..\..\Binaries\ - DEBUG;TRACE - full - x64 - 7.3 - prompt - - - ..\..\Binaries\ - TRACE - true - pdbonly - x64 - 7.3 - prompt + false @@ -63,18 +31,6 @@ $(ASInstallDir)\DotNetRoots.dll False - - - - - - - - - - - - - - + + \ No newline at end of file diff --git a/SDK/Steel Connections SDK/Samples/SteelConnectionsNetJoints/SteelConnectionsDotNetJointExample.csproj b/SDK/Steel Connections SDK/Samples/SteelConnectionsNetJoints/SteelConnectionsDotNetJointExample.csproj index 261d43af..41408c17 100644 --- a/SDK/Steel Connections SDK/Samples/SteelConnectionsNetJoints/SteelConnectionsDotNetJointExample.csproj +++ b/SDK/Steel Connections SDK/Samples/SteelConnectionsNetJoints/SteelConnectionsDotNetJointExample.csproj @@ -1,50 +1,9 @@ - - - - + - - None - - - - - Debug x64 - {451F853E-613F-4C62-9B99-3A8BD58B8043} - Library - Properties - SteelConnectionsDotNetJointExample - SteelConnectionsDotNetJointExample - v4.8 - 512 - SAK - SAK - SAK - SAK - - - - true - full - false - ..\..\Binaries\ - DEBUG;TRACE - prompt - 4 - false - x64 - - - pdbonly - true - ..\..\Binaries\ - TRACE - prompt - 4 - false - x64 + true + False @@ -69,25 +28,6 @@ $(ASInstallDir)\DotNetRootsMgd.dll False - - - - - - - - - - - - - - - - - - - @@ -95,12 +35,5 @@ - - - + + \ No newline at end of file diff --git a/SDK/Steel Connections SDK/Samples/StructuralConnectionsSDKSamples.Common.props b/SDK/Steel Connections SDK/Samples/StructuralConnectionsSDKSamples.Common.props index e9a768f4..bc63c916 100644 --- a/SDK/Steel Connections SDK/Samples/StructuralConnectionsSDKSamples.Common.props +++ b/SDK/Steel Connections SDK/Samples/StructuralConnectionsSDKSamples.Common.props @@ -1,6 +1,45 @@  - C:\Program Files\Autodesk\Revit 2024\AddIns\SteelConnections\ - + C:\Program Files\Autodesk\Revit 2025\AddIns\SteelConnections\ + false + true + ..\..\Binaries\ + + + + x64 + Debug;Release + net8.0-windows + false + false + true + false + false + 512 + + + + true + full + false + ..\..\Binaries\Debug + DEBUG;TRACE + prompt + 4 + x64 + true + false + + + pdbonly + true + ..\..\Binaries\Release + + + prompt + 4 + x64 + false + \ No newline at end of file diff --git a/SDK/Structural Analysis SDK/Examples/ASCE-7-10/ASCE-7-10.csproj b/SDK/Structural Analysis SDK/Examples/ASCE-7-10/ASCE-7-10.csproj index cd7ed87c..cc943e41 100644 --- a/SDK/Structural Analysis SDK/Examples/ASCE-7-10/ASCE-7-10.csproj +++ b/SDK/Structural Analysis SDK/Examples/ASCE-7-10/ASCE-7-10.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -120,4 +114,4 @@ --> - + \ No newline at end of file diff --git a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/CodeCheckingConcreteExample.csproj b/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/CodeCheckingConcreteExample.csproj index 1957fa7b..17335442 100644 --- a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/CodeCheckingConcreteExample.csproj +++ b/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/CodeCheckingConcreteExample.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -242,4 +236,4 @@ --> - + \ No newline at end of file diff --git a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Concrete/InternalForcesSurface.cs b/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Concrete/InternalForcesSurface.cs deleted file mode 100644 index 78044583..00000000 --- a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Concrete/InternalForcesSurface.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// (C) Copyright 2003-2013 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Autodesk.Revit.DB.CodeChecking.Engineering; - -/// -namespace CodeCheckingConcreteExample.Concrete -{ - class InternalForcesSurface : InternalForcesBase - { - public InternalForcesSurface() - { - ForceFxx = 0.0; ForceFyy = 0.0; ForceFxy = 0.0; - MomentMxx = 0.0; MomentMyy = 0.0; MomentMxy = 0.0; - LimitState = ForceLimitState.Unknown; - ForceDescription = ""; - } - - public InternalForcesContainer Forces(ConcreteTypes.DimensioningDirection direction) - { - InternalForcesContainer forces = new InternalForcesContainer(); - - forces.CaseName = ForceDescription; - forces.LimitState = LimitState; - - if (direction == ConcreteTypes.DimensioningDirection.X) - { - forces.ForceFx = -ForceFxx; // Due to ResultBuilder conventions of the forces sign. - forces.MomentMy = -MomentMxx; // Due to ResultBuilder conventions of the forces sign. - forces.ForceFz = ForceQxx; - } - else - { - forces.ForceFx = -ForceFyy; // Due to ResultBuilder conventions of the forces sign. - forces.MomentMy = -MomentMyy; // Due to ResultBuilder conventions of the forces sign. - forces.ForceFz = ForceQyy; - } - - return forces; - } - - public double ForceFxx { get; set; } - public double ForceFyy { get; set; } - public double ForceFxy { get; set; } - public double MomentMxx { get; set; } - public double MomentMyy { get; set; } - public double MomentMxy { get; set; } - public double ForceQxx { get; set; } - public double ForceQyy { get; set; } - public ForceLimitState LimitState { get; set; } - public string ForceDescription { get; set; } - } -} -/// diff --git a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Main/Calculation/SurfaceSection.cs b/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Main/Calculation/SurfaceSection.cs deleted file mode 100644 index b044bc9d..00000000 --- a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Main/Calculation/SurfaceSection.cs +++ /dev/null @@ -1,135 +0,0 @@ -// -// (C) Copyright 2003-2013 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Autodesk.Revit.DB; -using Autodesk.Revit.DB.CodeChecking.Engineering; -using Autodesk.CodeChecking.Concrete; -using CodeCheckingConcreteExample.Engine; -using CodeCheckingConcreteExample.Concrete; -using CodeCheckingConcreteExample.Utility; -using CodeCheckingConcreteExample.ConcreteTypes; -using DD = CodeCheckingConcreteExample.ConcreteTypes.DimensioningDirection; -/// -namespace CodeCheckingConcreteExample.Main.Calculation -{ - class SurfaceSection : SectionDataBase - { - /// - /// Initializes a new instance of user's section object of linear element. - /// - /// Instance of base section object with predefined parameters to copy. - public SurfaceSection(SectionDataBase sectionDataBase) - : base(sectionDataBase) - { - DesignWarning = new Dictionary>() { { DD.X, new List() }, { DD.Y, new List() } }; - DesignInfo = new Dictionary>() { { DD.X, new List() }, { DD.Y, new List() } }; - DesignError = new Dictionary>() { { DD.X, new List() }, { DD.Y, new List() } }; - - } - - /// - /// Gets analitical results for RC surface elements (floor, slab, wall) - /// - /// Analitical results in the section. - public ResultInPointSurface GetCalcResultsInPt() - { - ResultInPointSurface resultInPoint = new ResultInPointSurface(); - List vForces = ListInternalForces; - - resultInPoint[ResultTypeSurface.X] = (CalcPoint as CalcPointSurface).Coord.X; - resultInPoint[ResultTypeSurface.Y] = (CalcPoint as CalcPointSurface).Coord.Y; - resultInPoint[ResultTypeSurface.Z] = (CalcPoint as CalcPointSurface).Coord.Z; - - IEnumerable vmxx = from ifo in vForces let mxx = (ifo as InternalForcesSurface).MomentMxx select mxx; - resultInPoint[ResultTypeSurface.MxxMax] = vmxx.Max(); - resultInPoint[ResultTypeSurface.MxxMin] = vmxx.Min(); - - IEnumerable vmyy = from ifo in vForces let myy = (ifo as InternalForcesSurface).MomentMyy select myy; - resultInPoint[ResultTypeSurface.MyyMax] = vmyy.Max(); - resultInPoint[ResultTypeSurface.MyyMin] = vmyy.Min(); - - IEnumerable vmxy = from ifo in vForces let mxy = (ifo as InternalForcesSurface).MomentMxy select mxy; - resultInPoint[ResultTypeSurface.MxyMax] = vmxy.Max(); - resultInPoint[ResultTypeSurface.MxyMin] = vmxy.Min(); - - IEnumerable fmxx = from ifo in vForces let fxx = (ifo as InternalForcesSurface).ForceFxx select fxx; - resultInPoint[ResultTypeSurface.FxxMax] = fmxx.Max(); - resultInPoint[ResultTypeSurface.FxxMin] = fmxx.Min(); - - IEnumerable fmyy = from ifo in vForces let fyy = (ifo as InternalForcesSurface).ForceFyy select fyy; - resultInPoint[ResultTypeSurface.FyyMax] = fmyy.Max(); - resultInPoint[ResultTypeSurface.FyyMin] = fmyy.Min(); - - IEnumerable fmxy = from ifo in vForces let fxy = (ifo as InternalForcesSurface).ForceFxy select fxy; - resultInPoint[ResultTypeSurface.FxyMax] = fmxy.Max(); - resultInPoint[ResultTypeSurface.FxyMin] = fmxy.Min(); - - IEnumerable qmxx = from ifo in vForces let qxx = (ifo as InternalForcesSurface).ForceQxx select qxx; - resultInPoint[ResultTypeSurface.QxxMax] = qmxx.Max(); - resultInPoint[ResultTypeSurface.QxxMin] = qmxx.Min(); - - IEnumerable qmyy = from ifo in vForces let qyy = (ifo as InternalForcesSurface).ForceQyy select qyy; - resultInPoint[ResultTypeSurface.QyyMax] = qmyy.Max(); - resultInPoint[ResultTypeSurface.QyyMin] = qmyy.Min(); - - resultInPoint[ResultTypeSurface.AxxBottom] = AsBottom[DD.X]; - resultInPoint[ResultTypeSurface.AxxTop] = AsTop[DD.X]; - - resultInPoint[ResultTypeSurface.AyyBottom] = AsBottom[DD.Y]; - resultInPoint[ResultTypeSurface.AyyTop] = AsTop[DD.Y]; - - return resultInPoint; - } - - public List ListInternalForces { get; set; } - public Geometry Geometry { get; set; } - public double Width { get; set; } - public double Height { get; set; } - - public Dictionary AsBottom = new Dictionary() { { DD.X, 0.00 }, { DD.Y, 0.00 } }; - public Dictionary AsTop = new Dictionary() { { DD.X, 0.00 }, { DD.Y, 0.00 } }; - public Dictionary MinStiffnes = new Dictionary() { { DD.X, 0.0 }, { DD.Y, 0.0 } }; - public Dictionary> LRebar = new Dictionary>() { { DD.X, null }, { DD.Y, null } }; - - /// - /// Gets and sets a list of texts with calculation warnings. - /// - public Dictionary> DesignWarning { get; set; } - /// - /// Gets and sets a list of texts with additional calculation information. - /// - public Dictionary> DesignInfo { get; set; } - /// - /// Gets and sets a list of texts with calculation errors. - /// - public Dictionary> DesignError { get; set; } - /// - /// Gets and sets cref="ElementInfo" object. - /// - public ElementInfo Info { get; set; } - } -} -/// diff --git a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Main/ResultSurfaceElement.cs b/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Main/ResultSurfaceElement.cs deleted file mode 100644 index 69c76770..00000000 --- a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Main/ResultSurfaceElement.cs +++ /dev/null @@ -1,130 +0,0 @@ -// -// (C) Copyright 2003-2013 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Autodesk.Revit.DB.ExtensibleStorage; -using Autodesk.Revit.DB; -using CodeCheckingConcreteExample.Utility; - -namespace CodeCheckingConcreteExample.Main -{ - /// - /// Container for surface element results data - /// - [Autodesk.Revit.DB.ExtensibleStorage.Framework.Attributes.Schema("ResultSurface", "37147943-1A9A-44E8-8BAC-20628BC26896")] - public class ResultSurfaceElement : Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass - { - /// - /// Collection of values representing element results in raw format - /// - [Autodesk.Revit.DB.ExtensibleStorage.Framework.Attributes.SchemaProperty(Unit = Autodesk.Revit.DB.UnitType.UT_Length, DisplayUnit = Autodesk.Revit.DB.DisplayUnitType.DUT_METERS)] - public List ValuesInPointsData { get; set; } - - /// - /// Information that the surface object is multilayer. - /// - [Autodesk.Revit.DB.ExtensibleStorage.Framework.Attributes.SchemaProperty()] - public bool MultiLayer { get; set; } - - /// - /// Collection of layer thickness - /// - [Autodesk.Revit.DB.ExtensibleStorage.Framework.Attributes.SchemaProperty(Unit = Autodesk.Revit.DB.UnitType.UT_Length, DisplayUnit = Autodesk.Revit.DB.DisplayUnitType.DUT_METERS)] - public List StructuralLayersThickness { get; set; } - - /// - /// Collection of layer materials name - /// - [Autodesk.Revit.DB.ExtensibleStorage.Framework.Attributes.SchemaProperty()] - public List StructuralLayersMaterialName { get; set; } - - /// - /// Informationa about structural layers for multilayers object - /// - /// List of names and thickness of structural layers - public List> GetStructuralLayers() - { - int numberOfLayers = StructuralLayersThickness.Count(); - if (numberOfLayers != StructuralLayersMaterialName.Count()) - throw new Exception("Invalid layers properties"); - - List> layers = new List>(); - for (int layersId = 0; layersId < numberOfLayers; layersId++) - { - layers.Add(new Tuple(StructuralLayersMaterialName[layersId],StructuralLayersThickness[layersId])); - } - return layers; - } - /// - /// Removing information about all structural layers - /// - public void ClearStructuralLayers() - { - StructuralLayersThickness.Clear(); - StructuralLayersMaterialName.Clear(); - } - /// - /// Adds new structural layer - /// - /// Material name for layer - /// Thickness of layer - public void AddStructuralLayer(string materialName, double thickness) - { - StructuralLayersThickness.Add(thickness); - StructuralLayersMaterialName.Add(materialName); - } - - /// - /// Gets results in point formatted as a list of ResultInPointSurface elements - /// - /// List of ResultInPointSurface - public List GetResultsInPointsCollection() - { - IEnumerable vType = Enum.GetValues(typeof(ResultTypeSurface)).OfType(); - - int numberOfValsInPoint = vType.Count(), - numberOfPoints = ValuesInPointsData.Count / numberOfValsInPoint; - - List resultsInPoints = new List(); - for (int ptId = 0; ptId < numberOfPoints; ptId++) - { - resultsInPoints.Add(new ResultInPointSurface(ValuesInPointsData.GetRange(ptId * numberOfValsInPoint, numberOfValsInPoint))); - } - - return resultsInPoints; - } - - /// - /// Creates default ResultSurfaceElement - /// - public ResultSurfaceElement() - { - ValuesInPointsData = new List(); - StructuralLayersThickness = new List(); - StructuralLayersMaterialName = new List(); - MultiLayer = false; - } - } -} diff --git a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Server/ServerResultsSurface.cs b/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Server/ServerResultsSurface.cs deleted file mode 100644 index c21c1a8c..00000000 --- a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Server/ServerResultsSurface.cs +++ /dev/null @@ -1,404 +0,0 @@ -// -// (C) Copyright 2003-2013 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Autodesk.Revit.DB.CodeChecking; -using Autodesk.Revit.DB.CodeChecking.Documentation; -using Autodesk.Revit.DB; -using Autodesk.Revit.DB.Structure; -using Autodesk.Revit.DB.ExtensibleStorage.Framework.Documentation; -using Autodesk.Revit.DB.ExtensibleStorage; -using Autodesk.Revit.DB.CodeChecking.Engineering; -using Autodesk.Revit.DB.CodeChecking.Engineering.Concrete; -using CodeCheckingConcreteExample.Utility; -using CodeCheckingConcreteExample.Main; -using CodeCheckingConcreteExample.Properties; -using Autodesk.Revit.DB.CodeChecking.Engineering.Tools; - - -/// -namespace CodeCheckingConcreteExample.Server -{ - public partial class Server : Autodesk.Revit.DB.CodeChecking.Documentation.MultiStructureServer - { - /// - /// Fills document body object with formatted reinforcement calculation results - /// - /// DocumentBody to be filled - /// Calculation results schema class - /// Active Revit document - /// Structural element - /// Typ of element - private void WriteResultsToNoteForSurfaceElements(DocumentBody body, ResultSurfaceElement resultSurfaceElement, Autodesk.Revit.DB.Document document, Element element,ElementType elementType) - { - - List resultsInPointsCollection = resultSurfaceElement.GetResultsInPointsCollection(); - - /////////////////////////// Basic Level /////////////////////////////////////// - - //////////////////// Summary - { - if (resultSurfaceElement.MultiLayer) - { - DocumentSection resultLeyerSection = new DocumentSection(Resources.ResourceManager.GetString("Layers"), 5); - resultLeyerSection.Level = DetailLevel.General; - List> structuralLayers = resultSurfaceElement.GetStructuralLayers(); - double calculationThickness = 0; - resultLeyerSection.Body.Elements.Add(new DocumentText(Resources.ResourceManager.GetString("LayerTakenIntoConsideration"),true)); - for (int layersId = 0; layersId < structuralLayers.Count(); layersId++) - { - resultLeyerSection.Body.Elements.Add((new DocumentValueWithName("- " + structuralLayers[layersId].Item1, structuralLayers[layersId].Item2, UnitsConverter.GetInternalUnit(UnitType.UT_Section_Dimension), UnitType.UT_Section_Dimension, document.GetUnits()))); - calculationThickness += structuralLayers[layersId].Item2; - } - resultLeyerSection.Body.Elements.Add((new DocumentValueWithName(Resources.ResourceManager.GetString("ThicknessTakenIntoConsideration"),calculationThickness, UnitsConverter.GetInternalUnit(UnitType.UT_Section_Dimension), UnitType.UT_Section_Dimension, document.GetUnits()))); - body.Elements.Add(resultLeyerSection); - } - - // Create document section - DocumentSection resultSummarySection = new DocumentSection(Resources.ResourceManager.GetString("Summary"), 5); - resultSummarySection.Level = DetailLevel.General; - - // Calculate mean and extreme values - IEnumerable primary = new List {ResultTypeSurface.AxxTop, ResultTypeSurface.AxxBottom}; - IEnumerable secondary = new List { ResultTypeSurface.AyyTop, ResultTypeSurface.AyyBottom }; - double meanPrimary = resultsInPointsCollection.Average(s => (primary.Sum(q => s[q]))), - meanSecondary = resultsInPointsCollection.Average(s => (secondary.Sum(q => s[q]))); - - // Add them to the section - string meanPrimaryString = elementType == ElementType.Floor ? "MeanPrimaryReinforcementDensity" : "MeanVerticallReinforcementDensity"; - string meanSecondaryString = elementType == ElementType.Floor ? "MeanSecondaryReinforcementDensity" : "MeanHorizontalReinforcementDensity"; - meanPrimaryString = Resources.ResourceManager.GetString(meanPrimaryString); - meanSecondaryString = Resources.ResourceManager.GetString(meanSecondaryString); - resultSummarySection.Body.Elements.Add((new DocumentValueWithName(meanPrimaryString, meanPrimary, UnitsConverter.GetInternalUnit(UnitType.UT_Reinforcement_Area_per_Unit_Length), UnitType.UT_Reinforcement_Area_per_Unit_Length, document.GetUnits()))); - resultSummarySection.Body.Elements.Add((new DocumentValueWithName(meanSecondaryString, meanSecondary, UnitsConverter.GetInternalUnit(UnitType.UT_Reinforcement_Area_per_Unit_Length), UnitType.UT_Reinforcement_Area_per_Unit_Length, document.GetUnits()))); - - - // Add extreme reinforcement table - resultSummarySection.Body.Elements.Add(new DocumentText(Resources.ResourceManager.GetString("ExtremeValuesOfReinforcement"))); - resultSummarySection.Body.Elements.Add(CreateExtremeResultTableForSurfaceElements(resultsInPointsCollection, new List() { ResultTypeSurface.AxxBottom, ResultTypeSurface.AxxTop, ResultTypeSurface.AyyBottom, ResultTypeSurface.AyyTop }, document, elementType)); - - - // Add section to the document body - body.Elements.Add(resultSummarySection); - } - /////////////////////////// Other levels /////////////////////////////////////// - - //////////////////// Reinforcement table - { - // Create document section - DocumentSection reinforcementTableSection = new DocumentSection(Resources.ResourceManager.GetString("Reinforcement"), 5); - reinforcementTableSection.Level = DetailLevel.Medium; - - // Add extreme reinforcement table - reinforcementTableSection.Body.Elements.Add(CreateResultTableForSurfaceElements(resultsInPointsCollection, new List() { ResultTypeSurface.AxxBottom, ResultTypeSurface.AxxTop, ResultTypeSurface.AyyBottom, ResultTypeSurface.AyyTop }, document, elementType)); - - // Add section to the document body - body.Elements.Add(reinforcementTableSection); - } - - //////////////////// Reinforcement maps - { - // Create document section - DocumentSection reinforcementMapsSection = new DocumentSection(Resources.ResourceManager.GetString("ReinforcementMaps"), 5); - reinforcementMapsSection.Level = DetailLevel.Detail; - - // Create and add reinforcement maps - ResultTypeSurface[] vForceType = { ResultTypeSurface.AxxBottom, ResultTypeSurface.AyyBottom, ResultTypeSurface.AxxTop, ResultTypeSurface.AyyTop }; - List vMap = CreateResultMapSeriesForSurfaceElements(element, resultsInPointsCollection, vForceType.Select(s => new Tuple(s, ResultDescription(elementType,s)))); - foreach (DocumentMap map in vMap) - { - reinforcementMapsSection.Body.Elements.Add(map); - } - // Add section to the document body - body.Elements.Add(reinforcementMapsSection); - } - - //////////////////// Extreme forces table - List nonZeroInternalForces = ResultTypeSurfaceHelper.InternalForcesResults.Where(s => resultsInPointsCollection.Any(r => Math.Abs(r[s]) > Double.Epsilon)).ToList(); - bool isNonZeroInternalForces = (nonZeroInternalForces.Count() > 0); - { - // Only for non-zero values - if (isNonZeroInternalForces) - { - // Create document section - DocumentSection extremeForcesTable = new DocumentSection(Resources.ResourceManager.GetString("ExtremeAxialForces"), 5); - extremeForcesTable.Level = DetailLevel.Medium; - - // Add extreme force table - extremeForcesTable.Body.Elements.Add(CreateExtremeResultTableForSurfaceElements(resultsInPointsCollection, ResultTypeSurfaceHelper.InternalForcesResults, document, elementType)); - - // Add section to the document body - body.Elements.Add(extremeForcesTable); - } - } - - //////////////////// Extreme moments table - List nonZeroInternalMoments = ResultTypeSurfaceHelper.InternalMomentsResults.Where(s => resultsInPointsCollection.Any(r => Math.Abs(r[s]) > Double.Epsilon)).ToList(); - bool isNonZeroInternalMoments = (nonZeroInternalMoments.Count() > 0); - { - // Only for non-zero values - if (isNonZeroInternalMoments) - { - // Create document section - DocumentSection extremeMomentsTable = new DocumentSection(Resources.ResourceManager.GetString("ExtremeBendingMoments"), 5); - extremeMomentsTable.Level = DetailLevel.Medium; - - // Add extreme moment table - extremeMomentsTable.Body.Elements.Add(CreateExtremeResultTableForSurfaceElements(resultsInPointsCollection, ResultTypeSurfaceHelper.InternalMomentsResults, document, elementType)); - - // Add section to the document body - body.Elements.Add(extremeMomentsTable); - } - } - - //////////////////// Force envelopes table - { - // Only for non-zero values - if (isNonZeroInternalForces) - { - // Create document section - DocumentSection forceEnvelopesTable = new DocumentSection(Resources.ResourceManager.GetString("EnvelopeF"), 5); - forceEnvelopesTable.Level = DetailLevel.Detail; - - // Add extreme force table - forceEnvelopesTable.Body.Elements.Add(CreateResultTableForSurfaceElements(resultsInPointsCollection, ResultTypeSurfaceHelper.InternalForcesResults, document, elementType)); - - // Add section to the document body - body.Elements.Add(forceEnvelopesTable); - } - } - - //////////////////// Moments envelopes table - { - // Only for non-zero values - if (isNonZeroInternalMoments) - { - // Create document section - DocumentSection momentEnvelopesTable = new DocumentSection(Resources.ResourceManager.GetString("EnvelopeM"), 5); - momentEnvelopesTable.Level = DetailLevel.Detail; - - // Add extreme force table - momentEnvelopesTable.Body.Elements.Add(CreateResultTableForSurfaceElements(resultsInPointsCollection, ResultTypeSurfaceHelper.InternalMomentsResults, document, elementType)); - - // Add section to the document body - body.Elements.Add(momentEnvelopesTable); - } - } - - } - /// - /// Returns UI descriptions depends to element type and results type. - /// - /// Typ of element - /// Results. - /// Description that can be displayed on the maps and in the table. - private string ResultDescription(ElementType elementType, ResultTypeSurface result) - { - string description = string.Empty; - switch (result) - { - case ResultTypeSurface.AxxBottom: - case ResultTypeSurface.AxxTop: - case ResultTypeSurface.AyyBottom: - case ResultTypeSurface.AyyTop: - description = Resources.ResourceManager.GetString(elementType.ToString() + result.ToString()); - break; - default: - description = Resources.ResourceManager.GetString(result.ToString()); - break; - } - if (null == description) - description = result.ToString(); - return description; - } - /// - /// Creates maps based on surface results. The maps can be displayed in the documentation. - /// - /// Revit element for which result document is built - /// Result in point collection - /// The type of results, values and description that can be displayed on the maps. - /// Returns list of documets maps based on results that can be displayed in the documentation - private List CreateResultMapSeriesForSurfaceElements(Element element, ICollection resultsInPoints, IEnumerable> resultTypes) - { - List vDocMap = new List(); - MapDataGenerator mapPoints = new MapDataGenerator(); - foreach (Tuple forceDesc in resultTypes) - { - List resData = resultsInPoints.Select(s => s[forceDesc.Item1]).ToList(); - if (resData.Max(s => (Math.Abs(s))) < 1.0e-8) - { - continue; - } - AnalyticalModel slab = element as AnalyticalModel; - DisplayUnit displayUnit = DisplayUnit.IMPERIAL; - if (Server.UnitSystem == Autodesk.Revit.DB.ResultsBuilder.UnitsSystem.Metric) - displayUnit = DisplayUnit.METRIC; - ElementAnalyser elementAnalyser = new ElementAnalyser(displayUnit); - ElementInfo info = elementAnalyser.Analyse(element); - XYZ xyz = new XYZ(); - if (info != null) - { - foreach (ResultInPointSurface resInPt in resultsInPoints) - { - mapPoints.AddPoint(new XYZ(resInPt[ResultTypeSurface.X], resInPt[ResultTypeSurface.Y], resInPt[ResultTypeSurface.Z]), resInPt[forceDesc.Item1]); - } - var contourAndHoles = getContourAndHolePoints(info); - contourAndHoles.Item1.ForEach( s=>mapPoints.AddPointToContour(s)); - contourAndHoles.Item2.ForEach( s=>mapPoints.AddHole(s)); - UnitType ut = forceDesc.Item1.GetUnitType(); - DocumentMap docMap = new DocumentMap(ut, UnitsConverter.GetInternalUnit(ut)); - docMap.Title = forceDesc.Item2; - int nofPoints = mapPoints.Count; - for (int ptId = 0; ptId < nofPoints; ptId++) - { - UV pt = mapPoints.GetPoint(ptId); - docMap.AddPoint(pt.U, pt.V, mapPoints.GetValue(ptId)); - } - List> holes = mapPoints.Holes; - foreach (List hole in holes) - { - docMap.AddHole(hole); - } - docMap.DefineContour(mapPoints.Contour); - vDocMap.Add(docMap); - } - mapPoints.Clear(); - } - return vDocMap; - } - - - private Tuple,List>> getContourAndHolePoints( ElementInfo info) - { - List contour = null; - List> holes = null; - - if( info.Type==Autodesk.Revit.DB.CodeChecking.Engineering.ElementType.Slab ) - { - contour = info.Slabs.AsElement.Contours.First(c=>c.ContourType==SlabContourType.Main).Edges.SelectMany( e=>e.Nodes.Select( n=>n.GetGlobalCoordinates())).ToList(); - holes = info.Slabs.AsElement.Contours.Where( c=>c.ContourType==SlabContourType.Hole).Select - ( hc=> hc.Edges.SelectMany( e=>e.Nodes.Select( n=>n.GetGlobalCoordinates())).ToList() ).ToList(); - } - else if (info.Type == Autodesk.Revit.DB.CodeChecking.Engineering.ElementType.Wall) - { - contour = info.Walls.AsElement.Transform.ManyPoints2Global( info.Walls.AsElement.Contour.Points ).ToList(); - holes = info.Walls.AsElement.Openings.Select(o => info.Walls.AsElement.Transform.ManyPoints2Global(o.Points).ToList()).ToList(); - } - return new Tuple, List>>(contour,holes); - } - - /// - /// Creates result table based on surface results. - /// - /// Result in point collection - /// The type of results, values and description to use in the table. - /// Revit document - /// Type of element - /// Document table containing surface results - private DocumentTable CreateResultTableForSurfaceElements(List resInPtCollection, IEnumerable resultTypes, Autodesk.Revit.DB.Document document, ElementType elementType) - { - // results table data - int rowsCount = 1 + resInPtCollection.Count(), - colsCount = (ElementType.Wall == elementType ? 3 : 2) + resultTypes.Count(); - - Units units = document.GetUnits(); - DocumentTable resultTable = new DocumentTable( rowsCount, colsCount); - resultTable.HeaderColumnsCount = ElementType.Wall == elementType ? 3 : 2; - resultTable.HeaderRowsCount = 1; - - // results table data - List typesToPresent = ElementType.Wall == elementType ? new List() { ResultTypeSurface.X, ResultTypeSurface.Y, ResultTypeSurface.Z } : new List() { ResultTypeSurface.X, ResultTypeSurface.Y }; - typesToPresent.AddRange(resultTypes); - - int colId = 0; - foreach (ResultTypeSurface resultType in typesToPresent) - { - resultTable[0, colId].Elements.Add(new DocumentText(ResultDescription(elementType,resultType))); - UnitType unitType = resultType.GetUnitType(); - DisplayUnitType displayUnitType = Utility.UnitsConverter.GetInternalUnit(unitType); - - int rowId = 1; - foreach (ResultInPointSurface resultInPoint in resInPtCollection) - { - if (DisplayUnitType.DUT_UNDEFINED != displayUnitType) - { - resultTable[rowId++, colId].Elements.Add(new DocumentValue(resultInPoint[resultType], displayUnitType, unitType, units)); - } - else - { - resultTable[rowId++, colId].Elements.Add(new DocumentText(resultInPoint[resultType].ToString())); - } - } - colId++; - } - - return resultTable; - } - - /// - /// Creates result table based on surface results that contains extreme values for specified result types. - /// - /// Result in point collection - /// The type of results, values and description to use in the table. - /// Revit document - /// Type of element - /// Document table containing surface results - private DocumentTable CreateExtremeResultTableForSurfaceElements(List resInPtCollection, IEnumerable resultTypes, Autodesk.Revit.DB.Document document, ElementType elementType) - { - IEnumerable> maxValues = resultTypes.Select(s => new Tuple(s, s.ToString().ToLower().Contains("min") ? resInPtCollection.Min(q => q[s]) : resInPtCollection.Max(q => q[s]))); - int rowsCount = 2, - colsCount = resultTypes.Count(); - - Units units = document.GetUnits(); - DocumentTable resultTable = new DocumentTable(rowsCount, colsCount); - resultTable.HeaderColumnsCount = 0; - resultTable.HeaderRowsCount = 1; - - // results table data - List typesToPresent = new List() { ResultTypeSurface.X, ResultTypeSurface.Y }; - typesToPresent.AddRange(resultTypes); - - int colId=0; - foreach (Tuple result in maxValues) - { - resultTable[0, colId].Elements.Add(new DocumentText(ResultDescription(elementType, result.Item1))); - UnitType unitType = result.Item1.GetUnitType(); - DisplayUnitType displayUnitType = Utility.UnitsConverter.GetInternalUnit(unitType); - if (DisplayUnitType.DUT_UNDEFINED != displayUnitType) - { - resultTable[1, colId].Elements.Add(new DocumentValue(result.Item2, displayUnitType, unitType, units)); - } - else - { - resultTable[1, colId].Elements.Add(new DocumentText(result.Item2.ToString())); - } - colId++; - } - - return resultTable; - } - } - /// -} diff --git a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Utility/ResultInPointSurface.cs b/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Utility/ResultInPointSurface.cs deleted file mode 100644 index cf2e0017..00000000 --- a/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Utility/ResultInPointSurface.cs +++ /dev/null @@ -1,356 +0,0 @@ -// -// (C) Copyright 2003-2013 by Autodesk, Inc. -// -// Permission to use, copy, modify, and distribute this software in -// object code form for any purpose and without fee is hereby granted, -// provided that the above copyright notice appears in all copies and -// that both that copyright notice and the limited warranty and -// restricted rights notice below appear in all supporting -// documentation. -// -// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. -// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF -// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. -// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE -// UNINTERRUPTED OR ERROR FREE. -// -// Use, duplication, or disclosure by the U.S. Government is subject to -// restrictions set forth in FAR 52.227-19 (Commercial Computer -// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) -// (Rights in Technical Data and Computer Software), as applicable. -// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Autodesk.Revit.DB; - -/// -namespace CodeCheckingConcreteExample.Utility -{ - /// - /// Type of results for rc section - /// - public enum ResultTypeSurface - { - /// - /// X position (absolute) - /// - X, - /// - /// Y position (absolute) - /// - Y, - /// - /// Z position (absolute) - /// - Z, - /// - /// Bending moment , x-axis, min value [moment per unit length] - /// - MxxMin, - /// - /// Bending moment , x-axis, max value [moment per unit length] - /// - MxxMax, - /// - /// Bending moment , y-axis, min value [moment per unit length] - /// - MyyMin, - /// - /// Bending moment , x-axis, min value [moment per unit length] - /// - MyyMax, - /// - /// Twisting moments, , x-axis/y-axis, min value [moment per unit length] - /// - MxyMin, - /// - /// Twisting moments, , x-axis/y-axis, min value [moment per unit length] - /// - MxyMax, - /// - /// In-plane forces tension/compresion , x-direction, max value [moment per unit length] - /// - FxxMin, - /// - /// In-plane forces tension/compresion, x-direction, min value [force per unit length] - /// - FxxMax, - /// - /// In-plane forces tension/compresion, y-direction, max value [force per unit length] - /// - FyyMin, - /// - /// In-plane forces tension/compresion, y-direction, min value [force per unit length] - /// - FyyMax, - /// - /// In-plane shear forces , y-direction, max value [force per unit length] - /// - FxyMin, - /// - /// In-plane shear forces , y-direction, min value [force per unit length] - /// - FxyMax, - /// - /// Shear forces , x-direction, max value [force per unit length] - /// - QxxMin, - /// - /// Shear forces , x-direction, min value [force per unit length] - /// - QxxMax, - /// - /// Shear forces , y-direction, max value [force per unit length] - /// - QyyMin, - /// - /// Shear forces , y-direction, max value [force per unit length] - /// - QyyMax, - /// - /// Longitudinal reinforcement, bottom [area per unit length], according to Mxx - /// - AxxBottom, - /// - /// Longitudinal reinforcement, top [area per unit length], according to Mxx - /// - AxxTop, - /// - /// Longitudinal reinforcement, bottom [area per unit length], according to Myy - /// - AyyBottom, - /// - /// Longitudinal reinforcement, top [area per unit length], according to Myy - /// - AyyTop, - /// - /// Deflection, z-direction, max value - /// - UzMax, - /// - /// Deflection, z-direction, min value - /// - UzMin, - /// - /// Calculated deflection, z-direction, min value - /// - UzRealMax, - /// - /// Calculated deflection, z-direction, max value - /// - UzRealMin, - } - static class ResultTypeSurfaceHelper - { - /// - /// Converts value from cref="ResultTypeSurface" into value from cref="ResultType". - /// - /// Type of force. - /// Type of result. - static public Autodesk.Revit.DB.CodeChecking.Engineering.ResultType GetResultType(this ResultTypeSurface forceType) - { - Autodesk.Revit.DB.CodeChecking.Engineering.ResultType resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.Unknown; - switch (forceType) - { - // reinforcement - case ResultTypeSurface.AxxBottom: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.AxxBottom; break; - case ResultTypeSurface.AxxTop: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.AxxTop; break; - case ResultTypeSurface.AyyBottom: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.AyyBottom; break; - case ResultTypeSurface.AyyTop: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.AyyTop; break; - // deflection - ///TMP - /// - /* - case ResultTypeSurface.UxRealMax: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.UxMax; break; - case ResultTypeSurface.UxRealMin: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.UxMin; break; - case ResultTypeSurface.UyRealMax: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.UyMax; break; - case ResultTypeSurface.UyRealMin: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.UyMin; break; - case ResultTypeSurface.UzRealMax: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.UzMax; break; - case ResultTypeSurface.UzRealMin: resultType = Autodesk.Revit.DB.CodeChecking.Engineering.ResultType.UzMin; break; - * */ - } - return resultType; - } - - /// - /// Gets unit for a specific Result type - /// - /// - /// - static public UnitType GetUnitType(this ResultTypeSurface forceType) - { - return ResultInPointSurface.ValueType[(int)forceType]; - } - - /// - /// Gets reinforcement result types - /// - static public List ReinforcementResults - { - get { return new List { ResultTypeSurface.AxxBottom, ResultTypeSurface.AxxTop, ResultTypeSurface.AyyBottom, ResultTypeSurface.AxxTop}; } - } - - /// - /// Gets displacement result types - /// - static public List DisplacementResults - { - get - { - return new List - { - ResultTypeSurface.UzMax, ResultTypeSurface.UzMin, - }; - } - } - /// - /// Gets real deflection result types - /// - static public List RealDeflectionResults - { - get - { - return new List - { - ResultTypeSurface.UzRealMax, ResultTypeSurface.UzRealMin, - }; - } - } - /// - /// Gets base internal forces result types - /// - static public List InternalForcesResults - { - get - { - return new List - { - ResultTypeSurface.FxxMin, ResultTypeSurface.FxxMax, ResultTypeSurface.FyyMin, ResultTypeSurface.FyyMax, - }; - } - } - /// - /// Gets all internal forces result types - /// - static public List InternalForcesResultsAll - { - get - { - return new List - { - ResultTypeSurface.FxxMin, ResultTypeSurface.FxxMax, ResultTypeSurface.FyyMin, ResultTypeSurface.FyyMax, ResultTypeSurface.FxyMin, ResultTypeSurface.FxyMax, - }; - } - } - /// - /// Gets base internal moments result types - /// - static public List InternalMomentsResults - { - get - { - return new List - { - ResultTypeSurface.MxxMin, ResultTypeSurface.MxxMax, ResultTypeSurface.MyyMin, ResultTypeSurface.MyyMax - }; - } - } - /// - /// Gets all internal moments result types - /// - static public List InternalMomentsResultsAll - { - get - { - return new List - { - ResultTypeSurface.MxxMin, ResultTypeSurface.MxxMax, ResultTypeSurface.MyyMin, ResultTypeSurface.MyyMax, ResultTypeSurface.MxyMin, ResultTypeSurface.MxyMax, - }; - } - } - } - /// - /// Container representing analitical results in RC surface section - /// Results are represented as numbers along with their respective units - /// - public class ResultInPointSurface - { - private double[] data = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; - static internal UnitType[] ValueType = new UnitType[] { UnitType.UT_Length, - UnitType.UT_Length, - UnitType.UT_Length, - UnitType.UT_LinearMoment, - UnitType.UT_LinearMoment, - UnitType.UT_LinearMoment, - UnitType.UT_LinearMoment, - UnitType.UT_LinearMoment, - UnitType.UT_LinearMoment, - UnitType.UT_LinearForce, - UnitType.UT_LinearForce, - UnitType.UT_LinearForce, - UnitType.UT_LinearForce, - UnitType.UT_LinearForce, - UnitType.UT_LinearForce, - UnitType.UT_LinearForce, - UnitType.UT_LinearForce, - UnitType.UT_LinearForce, - UnitType.UT_LinearForce, - UnitType.UT_Reinforcement_Area_per_Unit_Length, - UnitType.UT_Reinforcement_Area_per_Unit_Length, - UnitType.UT_Reinforcement_Area_per_Unit_Length, - UnitType.UT_Reinforcement_Area_per_Unit_Length, - UnitType.UT_Displacement_Deflection, - UnitType.UT_Displacement_Deflection, - UnitType.UT_Displacement_Deflection, - UnitType.UT_Displacement_Deflection}; - /// - /// Creates default ResultInPointSurface - /// - public ResultInPointSurface() { } - - /// - /// Creates default ResultInPointLinear - /// - /// List of result according to ResultTypeSurface order - public ResultInPointSurface(IEnumerable data) { DataRaw = data.ToArray(); } - - /// - /// Access to the raw format of surface section results - /// - public double[] DataRaw { - get { return data; } - set { - int reqSize = Enum.GetValues(typeof(ResultTypeSurface)).Length; - if (value.Count() != reqSize) - { - throw new ArgumentException("Value list lenght should be equal to " + reqSize); - } - else - { - data = value; - } - } - } - /// - /// Access to a specific result - /// - /// Result type - /// Formatted result value - public double this[ResultTypeSurface type] - { - get { return data[(int)type]; } - set - { - if (Double.IsNaN(value)) - { - throw new ArgumentOutOfRangeException(type.ToString() + "Cannot be NAN"); - } - data[(int)type] = value; - } - } - } -} -/// - diff --git a/SDK/Structural Analysis SDK/Examples/Concrete/ConcreteCalculationsExample/ConcreteCalculationsExample.csproj b/SDK/Structural Analysis SDK/Examples/Concrete/ConcreteCalculationsExample/ConcreteCalculationsExample.csproj index 38ed4b18..9831e542 100644 --- a/SDK/Structural Analysis SDK/Examples/Concrete/ConcreteCalculationsExample/ConcreteCalculationsExample.csproj +++ b/SDK/Structural Analysis SDK/Examples/Concrete/ConcreteCalculationsExample/ConcreteCalculationsExample.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug x86 @@ -143,4 +137,4 @@ --> - + \ No newline at end of file diff --git a/SDK/Structural Analysis SDK/Examples/ExtensibleStorageDocumentation/ExtensibleStorageDocumentation.csproj b/SDK/Structural Analysis SDK/Examples/ExtensibleStorageDocumentation/ExtensibleStorageDocumentation.csproj index c55b563d..2c8af268 100644 --- a/SDK/Structural Analysis SDK/Examples/ExtensibleStorageDocumentation/ExtensibleStorageDocumentation.csproj +++ b/SDK/Structural Analysis SDK/Examples/ExtensibleStorageDocumentation/ExtensibleStorageDocumentation.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -113,4 +107,4 @@ --> - + \ No newline at end of file diff --git a/SDK/Structural Analysis SDK/Examples/ExtensibleStorageUI/ExtensibleStorageUI.csproj b/SDK/Structural Analysis SDK/Examples/ExtensibleStorageUI/ExtensibleStorageUI.csproj index 757fd4a0..e41bbf57 100644 --- a/SDK/Structural Analysis SDK/Examples/ExtensibleStorageUI/ExtensibleStorageUI.csproj +++ b/SDK/Structural Analysis SDK/Examples/ExtensibleStorageUI/ExtensibleStorageUI.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -147,4 +141,4 @@ --> - + \ No newline at end of file diff --git a/SDK/Structural Analysis SDK/Examples/ResultsInRevit/QueryingResults/QueryingResults.csproj b/SDK/Structural Analysis SDK/Examples/ResultsInRevit/QueryingResults/QueryingResults.csproj index 8329fb20..fbee5d56 100644 --- a/SDK/Structural Analysis SDK/Examples/ResultsInRevit/QueryingResults/QueryingResults.csproj +++ b/SDK/Structural Analysis SDK/Examples/ResultsInRevit/QueryingResults/QueryingResults.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -79,4 +73,4 @@ --> - + \ No newline at end of file diff --git a/SDK/Structural Analysis SDK/Examples/ResultsInRevit/StoringResults/StoringResults.csproj b/SDK/Structural Analysis SDK/Examples/ResultsInRevit/StoringResults/StoringResults.csproj index f116d089..878a47f1 100644 --- a/SDK/Structural Analysis SDK/Examples/ResultsInRevit/StoringResults/StoringResults.csproj +++ b/SDK/Structural Analysis SDK/Examples/ResultsInRevit/StoringResults/StoringResults.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -79,4 +73,4 @@ --> - + \ No newline at end of file diff --git a/SDK/Structural Analysis SDK/Examples/SectionPropertiesExplorer/SectionPropertiesExplorer.csproj b/SDK/Structural Analysis SDK/Examples/SectionPropertiesExplorer/SectionPropertiesExplorer.csproj index 39c5ac13..923e8f2f 100644 --- a/SDK/Structural Analysis SDK/Examples/SectionPropertiesExplorer/SectionPropertiesExplorer.csproj +++ b/SDK/Structural Analysis SDK/Examples/SectionPropertiesExplorer/SectionPropertiesExplorer.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -170,4 +164,4 @@ --> - + \ No newline at end of file