Increase Floor Size

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to increase the size of floor, how I increase the size of floor? I written code for it but it does not increase the size of a floor but it transform from one location to another.
This is my code:-
List<ModelLine> mLines = new List<ModelLine>();
using (Transaction t = new Transaction(doc, "DrawBeam"))
{
t.Start();
FilteredElementCollector floor =new FilteredElementCollector(doc,doc.ActiveView.Id);
floor.OfClass(typeof(Floor));
foreach(Floor f in floor)
{
BoundingBoxXYZ bb=f.get_BoundingBox(null);
if (f is ModelLine)
{
mLines.Add(bb as ModelLine);
}
}
foreach (ModelLine mline in mLines)
{
LocationCurve lCurve = mline.Location as LocationCurve;
Line c = lCurve.Curve as Line;
XYZ pt1 = c.GetEndPoint(0);
XYZ pt2 = c.GetEndPoint(1);
XYZ xyz=new XYZ(5,5,5);
XYZ pt1New =xyz+pt1;
XYZ pt2New = xyz+pt2;
Line newLine = Line.CreateBound(pt1, pt2);
lCurve.Curve = newLine;
}