功能更新
This commit is contained in:
36
RevitAddins/BrowserFolderCmd.cs
Normal file
36
RevitAddins/BrowserFolderCmd.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Autodesk.Revit.Attributes;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
|
||||
namespace RevitAddins
|
||||
{
|
||||
/// <summary>
|
||||
/// Revit执行命令
|
||||
/// </summary>
|
||||
[Transaction(TransactionMode.Manual)]
|
||||
[Regeneration(RegenerationOption.Manual)]
|
||||
internal class BrowserFolderCmd : ExternalCommand
|
||||
{
|
||||
public override void Execute()
|
||||
{
|
||||
var path = Path.Combine(GlobalVariables.DirAssembly, "Templates");
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
Process.Start(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("错误", "指定文件夹不存在!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user