45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|