xml.Revit.Toolkit 2025.3.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package xml.Revit.Toolkit --version 2025.3.3                
NuGet\Install-Package xml.Revit.Toolkit -Version 2025.3.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="xml.Revit.Toolkit" Version="2025.3.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add xml.Revit.Toolkit --version 2025.3.3                
#r "nuget: xml.Revit.Toolkit, 2025.3.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install xml.Revit.Toolkit as a Cake Addin
#addin nuget:?package=xml.Revit.Toolkit&version=2025.3.3

// Install xml.Revit.Toolkit as a Cake Tool
#tool nuget:?package=xml.Revit.Toolkit&version=2025.3.3                

xml.Revit.Toolkit

Autodesk Revit 2020 - 2024

Install

安装 2024 <PackageReference Include="xml.Revit.Toolkit" Version="2024.*-*" />

安装 2023 <PackageReference Include="xml.Revit.Toolkit" Version="2023.*-*" />

安装 2022 <PackageReference Include="xml.Revit.Toolkit" Version="2022.*-*" />

安装 2021 <PackageReference Include="xml.Revit.Toolkit" Version="2021.*-*" />

安装 2020 <PackageReference Include="xml.Revit.Toolkit" Version="2020.*-*" />

Technologies Used

  • C# 12
  • .NET Framework 4.8
  • .NET 8
RevitTask

可使用取消任务令牌 CancellationTokenSource

/* 作    者: xml
** 创建时间: 2024/2/16 20:26:06
**
** Copyright 2024 by zedmoster
** 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.
*/

using System.Diagnostics;
using Autodesk.Revit.DB;
using xml.Revit.Toolkit.Attributes;
using xml.Revit.Toolkit.Extensions;
using xml.Revit.Toolkit.Utils;

namespace xml.Revit.Dev
{
    [Xml("TaskRevit", "测试 TaskRevit")]
    [Transaction(TransactionMode.Manual)]
    public class Cmd : XmlExternalCommand
    {
        protected override void Execute(ref string message, ElementSet elements)
        {
            Task.Run(async () =>
            {
                var source = new CancellationTokenSource(80);
                var token = source.Token;
                try
                {
                    await XmlDoc.Instance.RevitTask.RunAsync(
                        () =>
                        {
                            var doc = uidoc.Document;
                            doc.Transaction(
                                t =>
                                {
                                    for (int i = 0; i < 100; i++)
                                    {
                                        if (token.IsCancellationRequested)
                                            return;
                                        var detailArc = doc.CreateDetailArc(XYZ.BasisX * i);
                                        Debug.Write(detailArc.Id);
                                    }
                                },
                                "Task token"
                            );
                        },
                        token
                    );
                }
                finally
                {
                    source.Dispose();
                }
            });
        }
    }
}

ProgressBarWindow

如何使用简单的任务进度条

/* 作    者: xml
** 创建时间: 2024/4/19 20:26:06
**
** Copyright 2024 by zedmoster
** 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.
*/

using Autodesk.Revit.DB;
using xml.Revit.Toolkit.Attributes;
using xml.Revit.Toolkit.Extensions;
using xml.Revit.Toolkit.Utils;
using xml.Revit.Toolkit.Views;

namespace xml.Revit.Dev
{
    [Xml("测试进度条")]
    [Transaction(TransactionMode.Manual)]
    public sealed class Cmd : XmlExternalCommand
    {
        protected override void Execute(ref string message, ElementSet elements)
        {
            var doc = uidoc.Document;

            using var progressBarView = new ProgressBarWindow();
            doc.TransactionGroup(tg =>
            {
                progressBarView.Run(
                    Enumerable.Range(0, 100),
                    i =>
                    {
                        var pnt = XYZ.BasisX * i;
                        doc.Transaction(t => doc.CreateDetailArc(pnt));
                        Thread.Sleep(50);
                    }
                );
            });
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2025.8.7 13 11/16/2024
2025.8.6 26 11/16/2024
2025.8.5 70 11/12/2024
2025.8.4 71 11/10/2024
2025.8.3 69 11/10/2024
2025.8.2 82 11/4/2024
2025.8.1 83 11/3/2024
2025.8.0 75 10/29/2024
2025.7.4 72 10/29/2024
2025.7.3 81 10/29/2024
2025.7.2 81 10/28/2024
2025.7.1 85 10/17/2024
2025.7.0 70 10/17/2024
2025.6.11 92 10/16/2024
2025.6.10 81 10/16/2024
2025.6.9 92 10/3/2024
2025.6.8 109 9/11/2024
2025.6.7 89 8/5/2024
2025.6.6 119 7/4/2024
2025.6.5 97 7/4/2024
2025.6.4 102 6/29/2024
2025.6.3 113 6/27/2024
2025.6.2 90 6/25/2024
2025.6.1 101 6/23/2024
2025.6.0 94 6/23/2024
2025.5.16 115 6/16/2024
2025.5.15 115 6/16/2024
2025.5.14 99 6/15/2024
2025.5.13 101 6/15/2024
2025.5.12 103 6/12/2024
2025.5.11 96 6/12/2024
2025.5.10 90 6/12/2024
2025.5.9 94 6/12/2024
2025.5.8 79 6/12/2024
2025.5.7 86 6/12/2024
2025.5.6 87 6/11/2024
2025.5.5 89 6/11/2024
2025.5.4 109 6/7/2024
2025.5.3 105 6/3/2024
2025.5.2 124 6/3/2024
2025.5.1 99 6/3/2024
2025.5.0 112 6/2/2024
2025.4.7 111 6/2/2024
2025.4.6 104 6/2/2024
2025.4.5 109 6/2/2024
2025.4.4 112 6/1/2024
2025.4.3 90 5/31/2024
2025.4.2 109 5/29/2024
2025.4.1 102 5/26/2024
2025.3.7 110 5/26/2024
2025.3.6 106 5/26/2024
2025.3.5 114 5/26/2024
2025.3.4 115 5/26/2024
2025.3.3 125 5/25/2024
2025.3.2 113 4/19/2024
2025.3.1 140 4/9/2024
2025.3.0 128 4/7/2024
2025.2.16 122 4/7/2024
2025.2.15 118 4/7/2024
2024.8.7 5 11/16/2024
2024.8.6 19 11/16/2024
2024.8.5 67 11/12/2024
2024.8.4 60 11/10/2024
2024.8.3 62 11/10/2024
2024.8.2 64 11/4/2024
2024.8.1 71 11/3/2024
2024.8.0 65 10/29/2024
2024.7.4 66 10/29/2024
2024.7.3 65 10/29/2024
2024.7.2 70 10/28/2024
2024.7.1 70 10/17/2024
2024.7.0 67 10/17/2024
2024.6.11 71 10/16/2024
2024.6.10 71 10/16/2024
2024.6.9 88 10/3/2024
2024.6.8 105 9/11/2024
2024.6.7 68 8/5/2024
2024.6.6 97 7/4/2024
2024.6.5 102 7/4/2024
2024.6.4 95 6/29/2024
2024.6.3 117 6/27/2024
2024.6.2 85 6/25/2024
2024.6.1 102 6/23/2024
2024.6.0 94 6/23/2024
2024.5.16 105 6/16/2024
2024.5.15 93 6/16/2024
2024.5.14 94 6/15/2024
2024.5.13 110 6/15/2024
2024.5.12 110 6/12/2024
2024.5.11 87 6/12/2024
2024.5.10 90 6/12/2024
2024.5.9 77 6/12/2024
2024.5.8 82 6/12/2024
2024.5.7 80 6/12/2024
2024.5.6 105 6/11/2024
2024.5.5 91 6/11/2024
2024.5.4 90 6/7/2024
2024.5.3 107 6/3/2024
2024.5.2 103 6/3/2024
2024.5.1 90 6/3/2024
2024.5.0 95 6/2/2024
2024.4.7 100 6/2/2024
2024.4.6 98 6/2/2024
2024.4.5 100 6/2/2024
2024.4.4 93 6/1/2024
2024.4.3 81 5/31/2024
2024.4.2 121 5/29/2024
2024.4.1 111 5/26/2024
2024.3.7 124 5/26/2024
2024.3.6 100 5/26/2024
2024.3.5 104 5/26/2024
2024.3.4 101 5/26/2024
2024.3.3 107 5/25/2024
2024.3.2 97 4/19/2024
2024.3.1 111 4/9/2024
2024.3.0 120 4/7/2024
2024.2.16 125 4/7/2024
2024.2.15 106 4/3/2024
2024.2.14 144 3/31/2024
2024.2.13 144 3/28/2024
2024.2.12 144 3/23/2024
2024.2.11 156 3/23/2024
2024.2.10 191 3/9/2024
2024.2.9 199 3/7/2024
2024.2.8 233 3/3/2024
2024.2.7 263 3/3/2024
2024.2.0 244 2/16/2024
2023.8.7 5 11/16/2024
2023.8.6 19 11/16/2024
2023.8.5 56 11/12/2024
2023.8.4 62 11/10/2024
2023.8.3 62 11/10/2024
2023.8.2 64 11/4/2024
2023.8.1 60 11/3/2024
2023.8.0 70 10/29/2024
2023.7.4 66 10/29/2024
2023.7.3 66 10/29/2024
2023.7.2 77 10/28/2024
2023.7.1 69 10/17/2024
2023.7.0 64 10/17/2024
2023.6.11 73 10/16/2024
2023.6.10 71 10/16/2024
2023.6.9 86 10/3/2024
2023.6.8 109 9/11/2024
2023.6.7 76 8/5/2024
2023.6.6 95 7/4/2024
2023.6.5 118 7/4/2024
2023.6.4 96 6/29/2024
2023.6.3 101 6/27/2024
2023.6.2 84 6/25/2024
2023.6.1 91 6/23/2024
2023.6.0 95 6/23/2024
2023.5.16 99 6/16/2024
2023.5.15 103 6/16/2024
2023.5.14 122 6/15/2024
2023.5.13 102 6/15/2024
2023.5.12 101 6/12/2024
2023.5.11 80 6/12/2024
2023.5.10 93 6/12/2024
2023.5.9 75 6/12/2024
2023.5.8 96 6/12/2024
2023.5.7 91 6/12/2024
2023.5.6 83 6/11/2024
2023.5.5 87 6/11/2024
2023.5.4 93 6/7/2024
2023.5.3 113 6/3/2024
2023.5.2 104 6/3/2024
2023.5.1 90 6/3/2024
2023.5.0 129 6/2/2024
2023.4.7 99 6/2/2024
2023.4.6 98 6/2/2024
2023.4.5 113 6/2/2024
2023.4.4 88 6/1/2024
2023.4.3 78 5/31/2024
2023.4.2 94 5/29/2024
2023.4.1 103 5/26/2024
2023.3.7 99 5/26/2024
2023.3.6 102 5/26/2024
2023.3.5 109 5/26/2024
2023.3.4 97 5/26/2024
2023.3.3 103 5/25/2024
2023.3.2 99 4/19/2024
2023.3.1 114 4/9/2024
2023.3.0 110 4/7/2024
2023.2.16 114 4/7/2024
2023.2.15 125 4/3/2024
2023.2.14 124 3/31/2024
2023.2.13 154 3/28/2024
2023.2.12 138 3/23/2024
2023.2.11 149 3/23/2024
2023.2.10 212 3/9/2024
2023.2.9 182 3/7/2024
2023.2.8 206 3/3/2024
2023.2.7 185 3/3/2024
2023.2.6 203 3/2/2024
2023.2.5 211 2/24/2024
2023.2.4 236 2/24/2024
2023.2.3 212 2/19/2024
2023.2.2 240 2/19/2024
2023.2.1 224 2/19/2024
2023.2.0 246 2/16/2024
2022.8.7 5 11/16/2024
2022.8.6 19 11/16/2024
2022.8.5 57 11/12/2024
2022.8.4 65 11/10/2024
2022.8.3 58 11/10/2024
2022.8.2 68 11/4/2024
2022.8.1 68 11/3/2024
2022.8.0 62 10/29/2024
2022.7.4 64 10/29/2024
2022.7.3 63 10/29/2024
2022.7.2 68 10/28/2024
2022.7.1 70 10/17/2024
2022.7.0 70 10/17/2024
2022.6.11 73 10/16/2024
2022.6.10 68 10/16/2024
2022.6.9 84 10/3/2024
2022.6.8 111 9/11/2024
2022.6.7 70 8/5/2024
2022.6.6 97 7/4/2024
2022.6.5 87 7/4/2024
2022.6.4 95 6/29/2024
2022.6.3 109 6/27/2024
2022.6.2 84 6/25/2024
2022.6.1 92 6/23/2024
2022.6.0 92 6/23/2024
2022.5.16 94 6/16/2024
2022.5.15 105 6/16/2024
2022.5.14 99 6/15/2024
2022.5.13 95 6/15/2024
2022.5.12 87 6/12/2024
2022.5.11 87 6/12/2024
2022.5.10 86 6/12/2024
2022.5.9 87 6/12/2024
2022.5.8 77 6/12/2024
2022.5.7 81 6/12/2024
2022.5.6 81 6/11/2024
2022.5.5 86 6/11/2024
2022.5.4 92 6/7/2024
2022.5.3 96 6/3/2024
2022.5.2 93 6/3/2024
2022.5.1 112 6/3/2024
2022.5.0 125 6/2/2024
2022.4.7 107 6/2/2024
2022.4.6 94 6/2/2024
2022.4.5 96 6/2/2024
2022.4.4 91 6/1/2024
2022.4.3 86 5/31/2024
2022.4.2 110 5/29/2024
2022.4.1 104 5/26/2024
2022.3.7 113 5/26/2024
2022.3.6 106 5/26/2024
2022.3.5 104 5/26/2024
2022.3.4 97 5/26/2024
2022.3.3 99 5/25/2024
2022.3.2 94 4/19/2024
2022.3.1 127 4/9/2024
2022.3.0 117 4/7/2024
2022.2.16 111 4/7/2024
2022.2.15 111 4/3/2024
2022.2.14 137 3/31/2024
2022.2.13 137 3/28/2024
2022.2.12 156 3/23/2024
2022.2.11 167 3/23/2024
2022.2.10 190 3/9/2024
2022.2.9 190 3/7/2024
2022.2.8 200 3/3/2024
2022.2.7 213 3/3/2024
2022.2.6 211 3/2/2024
2022.2.5 223 2/24/2024
2022.2.4 234 2/24/2024
2022.2.3 211 2/19/2024
2022.2.2 244 2/19/2024
2022.2.1 242 2/19/2024
2022.2.0 224 2/16/2024
2021.8.7 5 11/16/2024
2021.8.6 19 11/16/2024
2021.8.5 68 11/12/2024
2021.8.4 65 11/10/2024
2021.8.3 71 11/10/2024
2021.8.2 67 11/4/2024
2021.8.1 71 11/3/2024
2021.8.0 63 10/29/2024
2021.7.4 67 10/29/2024
2021.7.3 62 10/29/2024
2021.7.2 70 10/28/2024
2021.7.1 69 10/17/2024
2021.7.0 73 10/17/2024
2021.6.11 80 10/16/2024
2021.6.10 77 10/16/2024
2021.6.9 83 10/3/2024
2021.6.8 107 9/11/2024
2021.6.7 69 8/5/2024
2021.6.6 118 7/4/2024
2021.6.5 100 7/4/2024
2021.6.4 107 6/29/2024
2021.6.3 94 6/27/2024
2021.6.2 85 6/25/2024
2021.6.1 105 6/23/2024
2021.6.0 92 6/23/2024
2021.5.16 109 6/16/2024
2021.5.15 100 6/16/2024
2021.5.14 97 6/15/2024
2021.5.13 97 6/15/2024
2021.5.12 93 6/12/2024
2021.5.11 83 6/12/2024
2021.5.10 102 6/12/2024
2021.5.9 98 6/12/2024
2021.5.8 79 6/12/2024
2021.5.7 83 6/12/2024
2021.5.6 81 6/11/2024
2021.5.5 95 6/11/2024
2021.5.4 88 6/7/2024
2021.5.3 97 6/3/2024
2021.5.2 103 6/3/2024
2021.5.1 99 6/3/2024
2021.5.0 109 6/2/2024
2021.4.7 107 6/2/2024
2021.4.6 114 6/2/2024
2021.4.5 98 6/2/2024
2021.4.4 106 6/1/2024
2021.4.3 79 5/31/2024
2021.4.2 92 5/29/2024
2021.4.1 105 5/26/2024
2021.3.7 104 5/26/2024
2021.3.6 106 5/26/2024
2021.3.5 101 5/26/2024
2021.3.4 106 5/26/2024
2021.3.3 101 5/25/2024
2021.3.2 131 4/19/2024
2021.3.1 116 4/9/2024
2021.3.0 112 4/7/2024
2021.2.16 113 4/7/2024
2021.2.15 108 4/3/2024
2021.2.14 134 3/31/2024
2021.2.13 139 3/28/2024
2021.2.12 137 3/23/2024
2021.2.11 149 3/23/2024
2021.2.10 189 3/9/2024
2021.2.9 177 3/7/2024
2021.2.8 207 3/3/2024
2021.2.7 207 3/3/2024
2021.2.6 199 3/2/2024
2021.2.5 207 2/24/2024
2021.2.4 232 2/24/2024
2021.2.3 224 2/19/2024
2021.2.2 229 2/19/2024
2021.2.1 240 2/19/2024
2021.2.0 219 2/16/2024
2020.8.7 5 11/16/2024
2020.8.6 20 11/16/2024
2020.8.5 68 11/12/2024
2020.8.4 72 11/10/2024
2020.8.3 65 11/10/2024
2020.8.2 66 11/4/2024
2020.8.1 68 11/3/2024
2020.8.0 63 10/29/2024
2020.7.4 71 10/29/2024
2020.7.3 62 10/29/2024
2020.7.2 70 10/28/2024
2020.7.1 74 10/17/2024
2020.7.0 68 10/17/2024
2020.6.11 81 10/16/2024
2020.6.10 67 10/16/2024
2020.6.9 84 10/3/2024
2020.6.8 103 9/11/2024
2020.6.7 70 8/5/2024
2020.6.6 96 7/4/2024
2020.6.5 88 7/4/2024
2020.6.4 97 6/29/2024
2020.6.3 105 6/27/2024
2020.6.2 84 6/25/2024
2020.6.1 93 6/23/2024
2020.6.0 119 6/23/2024
2020.5.16 107 6/16/2024
2020.5.15 98 6/16/2024
2020.5.14 99 6/15/2024
2020.5.13 104 6/15/2024
2020.5.12 98 6/12/2024
2020.5.11 87 6/12/2024
2020.5.10 90 6/12/2024
2020.5.9 88 6/12/2024
2020.5.8 82 6/12/2024
2020.5.7 86 6/12/2024
2020.5.6 82 6/11/2024
2020.5.5 83 6/11/2024
2020.5.4 91 6/7/2024
2020.5.3 119 6/3/2024
2020.5.2 92 6/3/2024
2020.5.1 110 6/3/2024
2020.5.0 99 6/2/2024
2020.4.7 106 6/2/2024
2020.4.6 106 6/2/2024
2020.4.5 97 6/2/2024
2020.4.4 97 6/1/2024
2020.4.3 84 5/31/2024
2020.4.2 96 5/29/2024
2020.4.1 96 5/26/2024
2020.3.7 103 5/26/2024
2020.3.6 126 5/26/2024
2020.3.5 98 5/26/2024
2020.3.4 104 5/26/2024
2020.3.3 110 5/25/2024
2020.3.2 109 4/19/2024
2020.3.1 135 4/9/2024
2020.3.0 117 4/7/2024
2020.2.16 119 4/7/2024
2020.2.15 113 4/3/2024
2020.2.14 134 3/31/2024
2020.2.13 139 3/28/2024
2020.2.12 133 3/23/2024
2020.2.11 149 3/23/2024
2020.2.10 182 3/9/2024
2020.2.9 171 3/7/2024
2020.2.8 198 3/3/2024
2020.2.7 213 3/3/2024
2020.2.6 226 3/2/2024
2020.2.5 216 2/24/2024
2020.2.4 227 2/24/2024
2020.2.3 251 2/19/2024
2020.2.2 238 2/19/2024
2020.2.1 226 2/19/2024
2020.2.0 241 2/16/2024
2019.8.7 5 11/16/2024
2019.8.6 18 11/16/2024
2019.8.5 55 11/12/2024
2019.8.4 60 11/10/2024
2019.8.3 63 11/10/2024
2019.8.2 68 11/4/2024
2019.8.1 70 11/3/2024
2019.8.0 63 10/29/2024
2019.7.4 65 10/29/2024
2019.7.3 70 10/29/2024
2019.7.2 67 10/28/2024
2019.7.1 69 10/17/2024
2019.7.0 66 10/17/2024
2019.6.11 80 10/16/2024
2018.8.7 5 11/16/2024
2018.8.6 19 11/16/2024
2018.8.5 56 11/12/2024
2018.8.4 62 11/10/2024
2018.8.3 67 11/10/2024
2018.8.2 70 11/4/2024
2018.8.1 70 11/3/2024
2018.8.0 64 10/29/2024
2018.7.4 67 10/29/2024
2018.7.3 62 10/29/2024
2018.7.2 74 10/28/2024
2018.7.1 69 10/17/2024
2018.7.0 65 10/17/2024
2018.6.11 75 10/16/2024