RevitShell.cs 854 B

1234567891011121314151617181920212223242526272829303132
  1. /*-------------------------------------------------------------------------
  2. * 功能描述:RevitShell
  3. * 作者:xulisong
  4. * 创建时间: 2019/1/16 16:52:37
  5. * 版本号:v1.0
  6. * -------------------------------------------------------------------------*/
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Diagnostics;
  10. using System.IO;
  11. using System.Linq;
  12. using System.Text;
  13. using System.Threading.Tasks;
  14. using Autodesk.RevitAddIns;
  15. namespace RevitVersion
  16. {
  17. public class RevitShell
  18. {
  19. public static void Start(string path)
  20. {
  21. Process.Start(path);
  22. }
  23. public static void Start(RevitProduct revitProduct)
  24. {
  25. var directory = revitProduct.InstallLocation;
  26. var filePath = Path.Combine(directory, "Revit.exe");
  27. Start(filePath);
  28. }
  29. }
  30. }