2024-09-22 11:05:41 +08:00
|
|
|
|
using Autodesk.Revit.DB;
|
|
|
|
|
|
|
|
|
|
|
|
using Nice3point.Revit.Toolkit.External;
|
|
|
|
|
|
|
2025-02-10 20:53:40 +08:00
|
|
|
|
namespace ShrlAlgo.RvKits.RvView;
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
|
|
|
|
|
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
|
|
|
|
|
public class SwitchBackgroundCmd : ExternalCommand
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Execute()
|
|
|
|
|
|
{
|
|
|
|
|
|
var col = Application.BackgroundColor;
|
2024-12-22 10:26:12 +08:00
|
|
|
|
Application.BackgroundColor = col.Red == 255 && col.Green == 255 && col.Blue == 255
|
|
|
|
|
|
? new Color(32, 40, 49)
|
|
|
|
|
|
: new Color(255, 255, 255);
|
2024-09-22 11:05:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|