添加项目文件。
This commit is contained in:
44
CDMUtil/ToRevit/RevitWall.cs
Normal file
44
CDMUtil/ToRevit/RevitWall.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CDM.Interop.Revit.RevitCompoent
|
||||
{
|
||||
class RevitWall
|
||||
{
|
||||
public string StrBaseElev { get; set; }
|
||||
public string StrTopElev { get; set; }
|
||||
public string StrBasePoint { get; set; }
|
||||
public string Thickness { get; set; }
|
||||
public string StrExtendPoint { get; set; }
|
||||
|
||||
public double Height => Convert.ToDouble(StrTopElev) - Convert.ToDouble(StrBaseElev);
|
||||
public XYZ BasePoint
|
||||
{
|
||||
get
|
||||
{
|
||||
char[] separator = { '(', ',', ')' };
|
||||
string[] arr = StrBasePoint.Split(separator);
|
||||
double x = Convert.ToDouble(arr[1]) /304.8;
|
||||
double y = Convert.ToDouble(arr[2]) /304.8;
|
||||
//double z = Convert.ToDouble(StrBaseElev) ;
|
||||
return new XYZ(x, y, 0);
|
||||
}
|
||||
}
|
||||
public XYZ ExtendPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
char[] separator = { '(', ',', ')' };
|
||||
string[] arr = StrExtendPoint.Split(separator);
|
||||
double x = Convert.ToDouble(arr[1]) / 304.8;
|
||||
double y = Convert.ToDouble(arr[2]) /304.8;
|
||||
//double z = Convert.ToDouble(StrTopElev);
|
||||
return new XYZ(x, y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user