« NewLineLoad | Main | Revit Boot Camp on Mac »

July 21, 2009

Comments

Dear Jeremy,

A very Happy New Year to you and your team.

I am back with a query. I need to draw a single curve from two different curves.I am trying to do it with CurveArray. In this CurveArray, I am inserting the two different curves and now using this curveArray need to draw a third curve.say, I have two semi circles and need to draw it as one complete circle in document.
I am using the following code for it:

CurveArray newArray = new CurveArray();
newArray.Insert(arc.GeometryCurve, 0);
newArray.Insert(arc2.GeometryCurve, 1);

What should I do further or is this possible in api to draw a single curve using two or more curves?

Regards,
Shifali

Hi Jeremy,

I searched for it in Revit User Interface, in it we can draw circle from "Home -> Model Line -> Draw(choose Circle Option)" but I am not getting its option in RevitAPI with ModelLine if I have its radius and center.

Regards,
Shifali

Dear Jeremy,

Thank you for your support. Please ignore the above issue as I have resolved it with the help of Revit API chm.

Regards,
Shifali

Dear Shifali,

Way to go, man!

Congratulations, and Happy New Year to you too!

So what was the solution you found?

Cheers, Jeremy.

Dear Jeremy,

I have drawn the circle using Detail arc only with which i was drawing the semi circle on active document with some modifications. I am using the following method to draw complete circle with center and radius known:

XYZ norm = XYZ.BasisZ;
double startAngle = 0; // The unit is radian
double endAngle = 2 * Math.PI; //arc will be a circle
Autodesk.Revit.Geometry.Plane objPlane = new Plane(norm, centerPoint);

Arc arcCircle = revitApp.Create.NewArc(objPlane, radiusOfCircle, startAngle, endAngle);
DetailArc arcCircleDet = doc.Create.NewDetailCurve(doc.ActiveView, arcCircle) as DetailArc;

Dear Shifali,

Thank you for the code snippet, it looks just fine to me.

Cheers, Jeremy.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource