RevitApiBaseDll.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* ==============================================================================
  2. * 功能描述:RevitApiBaseDll
  3. * 创 建 者:Garrett
  4. * 创建日期:2018/4/23 18:38:06
  5. * ==============================================================================*/
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using Autodesk.Revit.DB;
  12. namespace SAGA.RevitAPI
  13. {
  14. /// <summary>
  15. /// RevitApiBaseDll
  16. /// </summary>
  17. public static class RevitApiBaseDll
  18. {
  19. public static Plane NewPlane(XYZ norm,XYZ origin)
  20. {
  21. Plane plane = null;
  22. #if R16
  23. plane=new Plane(norm,origin);
  24. #else
  25. plane = Plane.CreateByNormalAndOrigin(norm,origin);
  26. #endif
  27. return plane;
  28. }
  29. public static Plane NewPlane(XYZ xVec,XYZ yVec,XYZ origin)
  30. {
  31. Plane plane = null;
  32. #if R16
  33. plane=new Plane(xVec,yVec,origin);
  34. #else
  35. plane = Plane.CreateByThreePoints(xVec, yVec, origin);
  36. #endif
  37. return plane;
  38. }
  39. }
  40. }