Quantcast
Channel: RevitNetAddinWizard & NavisworksNetAddinWizard
Viewing all articles
Browse latest Browse all 872

Revit .NET Creations API: Create a Circular Floor

$
0
0

In Revit .NET API 2013, though the NewWall method has been moved to the Wall class itself, the NewFloor method has not. It is still in the Document.Create instance. Anyway, we figured where it is and were able to create some floors.

In this article, let’s see how to create a circular floor. Here is the code.

public void CreateFloor_Case1()
{
    Arc arc1 = CachedDoc.Application.Create.NewArc(new Plane(new XYZ(0, 0, 1), XYZ.Zero), 10, 0, Math.PI);
    Arc arc2 = CachedDoc.Application.Create.NewArc(new Plane(new XYZ(0, 0, 1), XYZ.Zero), 10, Math.PI, Math.PI * 2);
    CurveArray profile = new CurveArray();
    profile.Append(arc1);
    profile.Append(arc2);
   
    CachedDoc.Create.NewFloor(profile, false);
}

Here is what the circular floor looks like in Revit.
 Floor1

Revit Addin Wizard (RevitAddinWizard) provides various wizards, coders and widgets to help program Revit addins. It can be downloaded from the Download link at the bottom of the blog index page.


Viewing all articles
Browse latest Browse all 872

Latest Images

Trending Articles



Latest Images