You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,16 +17,20 @@ This project was generated by the [AppLoader](https://ricaun.com/apploader/) Rev
17
17
* Compile multiple `IExternalCommand` at once with Revit opened.
18
18
* Generate `PushButton` with the compiled `IExternalCommand` with `IExternalCommandAvailability`.
19
19
* AutoUpdate plugin using [ricaun.Revit.Github](https://github.com/ricaun-io/ricaun.Revit.Github).
20
+
*`Gist` link downloads the content and compiles each file.
20
21
21
-
## Limitations
22
+
## Compiler Limitations
22
23
23
-
In Revit 2021+ the `CodeDom.Compiler` uses the [Roslyn](https://github.com/aspnet/RoslynCodeDomProvider) version compiler.
24
-
The Roslyn compiler is a new compiler that supports C# version 6 and above.
25
-
26
-
`CodeDom.Compiler` only work with C# compiler version `v4.0` maximum, the following features do not work in C# version 4.
24
+
Revit 2017 to 2020 the `CodeDom.Compiler` only work with C# compiler version `v4.0` maximum, the following features do not work in C# version 4.
27
25
* Async Features (C# version 5)
28
26
* String interpolation (C# version 6)
29
27
28
+
Revit 2021 to 2024 the `CodeDom.Compiler` uses the [Roslyn](https://github.com/aspnet/RoslynCodeDomProvider) version compiler. The Roslyn compiler is a new compiler that supports C# version 6 and above.
29
+
30
+
Revit 2025+ the `CodeDom.Compiler` uses the [Microsoft.CodeAnalysis.CSharp](https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp/) to work with NET Core.
31
+
32
+
The [RevitAddin.CommandLoader.Tests](RevitAddin.CommandLoader.Tests) have some tests to make sure the compiler works in Net Framework and Net Core.
33
+
30
34
## Customize `IExternalCommand`
31
35
32
36
Using `System.ComponentModel` attributes is possible to customize the `IExternalCommand` that is generated in the Revit ribbon.
@@ -39,6 +43,8 @@ If `IExternalCommandAvailability` is added in the same `IExternalCommand` class
39
43
40
44
### Example
41
45
46
+
The command below show the version of Revit in a `MessageBox`.
47
+
42
48
```c#
43
49
usingSystem;
44
50
usingSystem.ComponentModel;
@@ -68,7 +74,17 @@ namespace RevitAddin
68
74
}
69
75
```
70
76
77
+
### Gist Example
78
+
79
+
The `RevitAddin.CommandLoader` have the feature to download `gist` files from GitHub and compile the `IExternalCommand` with the `gist` file.
80
+
81
+
Just copy the `gist` link in the `RevitAddin.CommandLoader` compiler and execute.
82
+
83
+
*[CommandVersion](https://gist.github.com/ricaun/200a576c3baa45cba034ceedac1e708e) - File with Revit defines.
84
+
*[CommandCreate](https://gist.github.com/ricaun/4f62b8650d29f1ff837e7e77f9e8b552) - Multiple file each with a `IExternalCommand`.
0 commit comments