xml.Revit.Toolkit 2018.7.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package xml.Revit.Toolkit --version 2018.7.0                
NuGet\Install-Package xml.Revit.Toolkit -Version 2018.7.0                
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="2018.7.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add xml.Revit.Toolkit --version 2018.7.0                
#r "nuget: xml.Revit.Toolkit, 2018.7.0"                
#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=2018.7.0

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

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.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 Framework net48 is compatible.  net481 was computed. 
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.0 70 10/29/2024
2025.7.4 67 10/29/2024
2025.7.3 77 10/29/2024
2025.7.2 77 10/28/2024
2025.7.1 83 10/17/2024
2025.7.0 68 10/17/2024
2025.6.11 90 10/16/2024
2025.6.10 79 10/16/2024
2025.6.9 90 10/3/2024
2025.6.8 107 9/11/2024
2025.6.7 88 8/5/2024
2025.6.6 118 7/4/2024
2025.6.5 96 7/4/2024
2025.6.4 101 6/29/2024
2025.6.3 112 6/27/2024
2025.6.2 89 6/25/2024
2025.6.1 100 6/23/2024
2025.6.0 93 6/23/2024
2025.5.16 114 6/16/2024
2025.5.15 114 6/16/2024
2025.5.14 98 6/15/2024
2025.5.13 100 6/15/2024
2025.5.12 102 6/12/2024
2025.5.11 95 6/12/2024
2025.5.10 89 6/12/2024
2025.5.9 93 6/12/2024
2025.5.8 78 6/12/2024
2025.5.7 85 6/12/2024
2025.5.6 86 6/11/2024
2025.5.5 88 6/11/2024
2025.5.4 108 6/7/2024
2025.5.3 104 6/3/2024
2025.5.2 123 6/3/2024
2025.5.1 98 6/3/2024
2025.5.0 111 6/2/2024
2025.4.7 110 6/2/2024
2025.4.6 103 6/2/2024
2025.4.5 108 6/2/2024
2025.4.4 111 6/1/2024
2025.4.3 89 5/31/2024
2025.4.2 108 5/29/2024
2025.4.1 101 5/26/2024
2025.3.7 109 5/26/2024
2025.3.6 105 5/26/2024
2025.3.5 113 5/26/2024
2025.3.4 114 5/26/2024
2025.3.3 124 5/25/2024
2025.3.2 112 4/19/2024
2025.3.1 139 4/9/2024
2025.3.0 127 4/7/2024
2025.2.16 121 4/7/2024
2025.2.15 117 4/7/2024
2024.8.0 60 10/29/2024
2024.7.4 61 10/29/2024
2024.7.3 61 10/29/2024
2024.7.2 66 10/28/2024
2024.7.1 68 10/17/2024
2024.7.0 65 10/17/2024
2024.6.11 69 10/16/2024
2024.6.10 69 10/16/2024
2024.6.9 85 10/3/2024
2024.6.8 103 9/11/2024
2024.6.7 67 8/5/2024
2024.6.6 96 7/4/2024
2024.6.5 101 7/4/2024
2024.6.4 94 6/29/2024
2024.6.3 116 6/27/2024
2024.6.2 84 6/25/2024
2024.6.1 101 6/23/2024
2024.6.0 93 6/23/2024
2024.5.16 104 6/16/2024
2024.5.15 92 6/16/2024
2024.5.14 93 6/15/2024
2024.5.13 109 6/15/2024
2024.5.12 109 6/12/2024
2024.5.11 86 6/12/2024
2024.5.10 89 6/12/2024
2024.5.9 76 6/12/2024
2024.5.8 81 6/12/2024
2024.5.7 79 6/12/2024
2024.5.6 104 6/11/2024
2024.5.5 90 6/11/2024
2024.5.4 89 6/7/2024
2024.5.3 106 6/3/2024
2024.5.2 102 6/3/2024
2024.5.1 89 6/3/2024
2024.5.0 94 6/2/2024
2024.4.7 99 6/2/2024
2024.4.6 97 6/2/2024
2024.4.5 99 6/2/2024
2024.4.4 92 6/1/2024
2024.4.3 80 5/31/2024
2024.4.2 120 5/29/2024
2024.4.1 110 5/26/2024
2024.3.7 123 5/26/2024
2024.3.6 99 5/26/2024
2024.3.5 103 5/26/2024
2024.3.4 100 5/26/2024
2024.3.3 106 5/25/2024
2024.3.2 96 4/19/2024
2024.3.1 110 4/9/2024
2024.3.0 119 4/7/2024
2024.2.16 124 4/7/2024
2024.2.15 105 4/3/2024
2024.2.14 143 3/31/2024
2024.2.13 143 3/28/2024
2024.2.12 143 3/23/2024
2024.2.11 155 3/23/2024
2024.2.10 190 3/9/2024
2024.2.9 198 3/7/2024
2024.2.8 232 3/3/2024
2024.2.7 262 3/3/2024
2024.2.0 243 2/16/2024
2023.8.0 65 10/29/2024
2023.7.4 61 10/29/2024
2023.7.3 62 10/29/2024
2023.7.2 73 10/28/2024
2023.7.1 67 10/17/2024
2023.7.0 62 10/17/2024
2023.6.11 71 10/16/2024
2023.6.10 69 10/16/2024
2023.6.9 84 10/3/2024
2023.6.8 107 9/11/2024
2023.6.7 75 8/5/2024
2023.6.6 94 7/4/2024
2023.6.5 117 7/4/2024
2023.6.4 95 6/29/2024
2023.6.3 100 6/27/2024
2023.6.2 83 6/25/2024
2023.6.1 90 6/23/2024
2023.6.0 94 6/23/2024
2023.5.16 98 6/16/2024
2023.5.15 102 6/16/2024
2023.5.14 104 6/15/2024
2023.5.13 101 6/15/2024
2023.5.12 100 6/12/2024
2023.5.11 79 6/12/2024
2023.5.10 92 6/12/2024
2023.5.9 74 6/12/2024
2023.5.8 94 6/12/2024
2023.5.7 90 6/12/2024
2023.5.6 82 6/11/2024
2023.5.5 86 6/11/2024
2023.5.4 92 6/7/2024
2023.5.3 112 6/3/2024
2023.5.2 103 6/3/2024
2023.5.1 89 6/3/2024
2023.5.0 128 6/2/2024
2023.4.7 98 6/2/2024
2023.4.6 97 6/2/2024
2023.4.5 112 6/2/2024
2023.4.4 87 6/1/2024
2023.4.3 77 5/31/2024
2023.4.2 93 5/29/2024
2023.4.1 102 5/26/2024
2023.3.7 98 5/26/2024
2023.3.6 101 5/26/2024
2023.3.5 108 5/26/2024
2023.3.4 96 5/26/2024
2023.3.3 102 5/25/2024
2023.3.2 98 4/19/2024
2023.3.1 113 4/9/2024
2023.3.0 107 4/7/2024
2023.2.16 113 4/7/2024
2023.2.15 124 4/3/2024
2023.2.14 123 3/31/2024
2023.2.13 153 3/28/2024
2023.2.12 137 3/23/2024
2023.2.11 148 3/23/2024
2023.2.10 194 3/9/2024
2023.2.9 181 3/7/2024
2023.2.8 205 3/3/2024
2023.2.7 184 3/3/2024
2023.2.6 202 3/2/2024
2023.2.5 210 2/24/2024
2023.2.4 235 2/24/2024
2023.2.3 211 2/19/2024
2023.2.2 239 2/19/2024
2023.2.1 223 2/19/2024
2023.2.0 245 2/16/2024
2022.8.0 57 10/29/2024
2022.7.4 59 10/29/2024
2022.7.3 59 10/29/2024
2022.7.2 64 10/28/2024
2022.7.1 68 10/17/2024
2022.7.0 68 10/17/2024
2022.6.11 71 10/16/2024
2022.6.10 66 10/16/2024
2022.6.9 82 10/3/2024
2022.6.8 109 9/11/2024
2022.6.7 69 8/5/2024
2022.6.6 96 7/4/2024
2022.6.5 86 7/4/2024
2022.6.4 94 6/29/2024
2022.6.3 108 6/27/2024
2022.6.2 83 6/25/2024
2022.6.1 91 6/23/2024
2022.6.0 91 6/23/2024
2022.5.16 93 6/16/2024
2022.5.15 104 6/16/2024
2022.5.14 98 6/15/2024
2022.5.13 94 6/15/2024
2022.5.12 86 6/12/2024
2022.5.11 86 6/12/2024
2022.5.10 85 6/12/2024
2022.5.9 86 6/12/2024
2022.5.8 76 6/12/2024
2022.5.7 80 6/12/2024
2022.5.6 80 6/11/2024
2022.5.5 85 6/11/2024
2022.5.4 91 6/7/2024
2022.5.3 95 6/3/2024
2022.5.2 92 6/3/2024
2022.5.1 111 6/3/2024
2022.5.0 124 6/2/2024
2022.4.7 106 6/2/2024
2022.4.6 93 6/2/2024
2022.4.5 95 6/2/2024
2022.4.4 90 6/1/2024
2022.4.3 85 5/31/2024
2022.4.2 109 5/29/2024
2022.4.1 103 5/26/2024
2022.3.7 112 5/26/2024
2022.3.6 105 5/26/2024
2022.3.5 103 5/26/2024
2022.3.4 96 5/26/2024
2022.3.3 98 5/25/2024
2022.3.2 93 4/19/2024
2022.3.1 126 4/9/2024
2022.3.0 116 4/7/2024
2022.2.16 110 4/7/2024
2022.2.15 110 4/3/2024
2022.2.14 136 3/31/2024
2022.2.13 136 3/28/2024
2022.2.12 155 3/23/2024
2022.2.11 166 3/23/2024
2022.2.10 187 3/9/2024
2022.2.9 189 3/7/2024
2022.2.8 199 3/3/2024
2022.2.7 212 3/3/2024
2022.2.6 210 3/2/2024
2022.2.5 222 2/24/2024
2022.2.4 231 2/24/2024
2022.2.3 210 2/19/2024
2022.2.2 243 2/19/2024
2022.2.1 239 2/19/2024
2022.2.0 223 2/16/2024
2021.8.0 58 10/29/2024
2021.7.4 62 10/29/2024
2021.7.3 58 10/29/2024
2021.7.2 66 10/28/2024
2021.7.1 67 10/17/2024
2021.7.0 71 10/17/2024
2021.6.11 78 10/16/2024
2021.6.10 75 10/16/2024
2021.6.9 81 10/3/2024
2021.6.8 105 9/11/2024
2021.6.7 68 8/5/2024
2021.6.6 100 7/4/2024
2021.6.5 99 7/4/2024
2021.6.4 106 6/29/2024
2021.6.3 93 6/27/2024
2021.6.2 84 6/25/2024
2021.6.1 104 6/23/2024
2021.6.0 91 6/23/2024
2021.5.16 108 6/16/2024
2021.5.15 99 6/16/2024
2021.5.14 96 6/15/2024
2021.5.13 96 6/15/2024
2021.5.12 92 6/12/2024
2021.5.11 82 6/12/2024
2021.5.10 101 6/12/2024
2021.5.9 97 6/12/2024
2021.5.8 78 6/12/2024
2021.5.7 82 6/12/2024
2021.5.6 80 6/11/2024
2021.5.5 94 6/11/2024
2021.5.4 87 6/7/2024
2021.5.3 96 6/3/2024
2021.5.2 102 6/3/2024
2021.5.1 98 6/3/2024
2021.5.0 108 6/2/2024
2021.4.7 106 6/2/2024
2021.4.6 113 6/2/2024
2021.4.5 97 6/2/2024
2021.4.4 105 6/1/2024
2021.4.3 78 5/31/2024
2021.4.2 91 5/29/2024
2021.4.1 104 5/26/2024
2021.3.7 103 5/26/2024
2021.3.6 105 5/26/2024
2021.3.5 100 5/26/2024
2021.3.4 105 5/26/2024
2021.3.3 100 5/25/2024
2021.3.2 113 4/19/2024
2021.3.1 115 4/9/2024
2021.3.0 111 4/7/2024
2021.2.16 112 4/7/2024
2021.2.15 107 4/3/2024
2021.2.14 133 3/31/2024
2021.2.13 138 3/28/2024
2021.2.12 136 3/23/2024
2021.2.11 148 3/23/2024
2021.2.10 188 3/9/2024
2021.2.9 176 3/7/2024
2021.2.8 206 3/3/2024
2021.2.7 204 3/3/2024
2021.2.6 198 3/2/2024
2021.2.5 206 2/24/2024
2021.2.4 231 2/24/2024
2021.2.3 223 2/19/2024
2021.2.2 228 2/19/2024
2021.2.1 239 2/19/2024
2021.2.0 218 2/16/2024
2020.8.0 58 10/29/2024
2020.7.4 66 10/29/2024
2020.7.3 58 10/29/2024
2020.7.2 66 10/28/2024
2020.7.1 72 10/17/2024
2020.7.0 66 10/17/2024
2020.6.11 79 10/16/2024
2020.6.10 65 10/16/2024
2020.6.9 82 10/3/2024
2020.6.8 101 9/11/2024
2020.6.7 69 8/5/2024
2020.6.6 95 7/4/2024
2020.6.5 87 7/4/2024
2020.6.4 96 6/29/2024
2020.6.3 104 6/27/2024
2020.6.2 83 6/25/2024
2020.6.1 92 6/23/2024
2020.6.0 118 6/23/2024
2020.5.16 106 6/16/2024
2020.5.15 97 6/16/2024
2020.5.14 98 6/15/2024
2020.5.13 103 6/15/2024
2020.5.12 97 6/12/2024
2020.5.11 86 6/12/2024
2020.5.10 89 6/12/2024
2020.5.9 86 6/12/2024
2020.5.8 81 6/12/2024
2020.5.7 85 6/12/2024
2020.5.6 81 6/11/2024
2020.5.5 82 6/11/2024
2020.5.4 90 6/7/2024
2020.5.3 118 6/3/2024
2020.5.2 91 6/3/2024
2020.5.1 109 6/3/2024
2020.5.0 98 6/2/2024
2020.4.7 105 6/2/2024
2020.4.6 105 6/2/2024
2020.4.5 96 6/2/2024
2020.4.4 96 6/1/2024
2020.4.3 83 5/31/2024
2020.4.2 95 5/29/2024
2020.4.1 95 5/26/2024
2020.3.7 102 5/26/2024
2020.3.6 108 5/26/2024
2020.3.5 97 5/26/2024
2020.3.4 103 5/26/2024
2020.3.3 108 5/25/2024
2020.3.2 108 4/19/2024
2020.3.1 134 4/9/2024
2020.3.0 116 4/7/2024
2020.2.16 118 4/7/2024
2020.2.15 112 4/3/2024
2020.2.14 133 3/31/2024
2020.2.13 138 3/28/2024
2020.2.12 132 3/23/2024
2020.2.11 148 3/23/2024
2020.2.10 181 3/9/2024
2020.2.9 170 3/7/2024
2020.2.8 197 3/3/2024
2020.2.7 212 3/3/2024
2020.2.6 225 3/2/2024
2020.2.5 213 2/24/2024
2020.2.4 224 2/24/2024
2020.2.3 246 2/19/2024
2020.2.2 237 2/19/2024
2020.2.1 225 2/19/2024
2020.2.0 240 2/16/2024
2019.8.0 58 10/29/2024
2019.7.4 60 10/29/2024
2019.7.3 66 10/29/2024
2019.7.2 63 10/28/2024
2019.7.1 67 10/17/2024
2019.7.0 64 10/17/2024
2019.6.11 78 10/16/2024
2018.8.0 59 10/29/2024
2018.7.4 62 10/29/2024
2018.7.3 58 10/29/2024
2018.7.2 70 10/28/2024
2018.7.1 67 10/17/2024
2018.7.0 63 10/17/2024
2018.6.11 73 10/16/2024