Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I am trying to create an arch and I am getting a circle.

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
barakSRXCH
183 Views, 6 Replies

I am trying to create an arch and I am getting a circle.

Hello,

I am trying to create an arch and I am getting a circle. what am I doing wrong?

 

the code:  arch = Arc.Create(
new XYZ(item.start[0] * Common.METER_TO_FEET + base_point.X, item.start[1] * Common.METER_TO_FEET + base_point.Y, 0),
new XYZ(item.end[0] * Common.METER_TO_FEET + base_point.X, item.end[1] * Common.METER_TO_FEET + base_point.Y, 0),
new XYZ(item.middle[0] * Common.METER_TO_FEET + base_point.X, item.middle[1] * Common.METER_TO_FEET + base_point.Y, 0));

 

w = Wall.Create(doc, arch, wall.Id, levelId, Common.WALL_HEIGHT * Common.METER_TO_FEET, 0.0, false, false);

 

thanks for your help!

 

6 REPLIES 6
Message 2 of 7
Yien_Chao
in reply to: barakSRXCH

Message 3 of 7
barakSRXCH
in reply to: barakSRXCH

I am sorry, I didn't understand. When I created the Arc, it wasn't supposed to be Arc.Create(end0, end1, pointOnCurve)?

 

Message 4 of 7
barakSRXCH
in reply to: Yien_Chao

What a, I suppose to do with the GetEndPoint(). I just started to work with Revit, so please be patient with me. 

can you give an actual example? 

Message 5 of 7
Yien_Chao
in reply to: barakSRXCH

my bad. i think the endpoint cant be set.

 

but you can create your arc at least with 3 methods 

https://www.revitapidocs.com/2022/37b85ab9-0840-97e9-31b4-a0699e99f132.htm

 

if you dont want a circle, try with : 

Create( XYZ end0, XYZ end1, XYZ pointOnArc

 

hope that could help

 

Message 6 of 7
barakSRXCH
in reply to: Yien_Chao

It is exactly what I used

Message 7 of 7
RPTHOMAS108
in reply to: barakSRXCH

Your first step is to look at the numbers for start/end/middle. No real point answering a question where the most likely error is the numbers you are not providing in the question (other than to say provide the numbers).

 

I prefer the other two overloads to be honest.

 

Would also do the conversion from m to ft elsewhere, likelihood is you have two points close together.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups


Rail Community