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: 

Dimension rebars

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
michael
1808 Views, 3 Replies

Dimension rebars

Hello,

 

Is there a way to dimension the endpoints of a rebar horizontally and vertically? I can get the lines of the rabars with rebar.GetCenterlineCurves, but it seems that the endpoints of these lines cannot be referenced.

 

Can anyone help me?

 

Thanks

3 REPLIES 3
Message 2 of 4
Joe.Ye
in reply to: michael

 

You can read the geometry data from the rebar by Rebar.Geometry property. This property requires an Option argument. you need to set the option.CaculateReferences to  true.

Then read the edge of the rebar. and get the curve from the Edge object. Finally get the end point reference from the curve.

 

Hope this helps,

 

 


______________________________________________________________

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 3 of 4
rnowak
in reply to: Joe.Ye

Hi,

 

but this aproach dosen't give geometry of rebarsSet. There is nothing in collection. 

 

------

Options opt = new Options();
opt.DetailLevel = ViewDetailLevel.Fine;
opt.ComputeReferences = true;
opt.IncludeNonVisibleObjects = true;

GeometryElement ele = raber.get_Geometry(opt);

foreach (GeometryObject geomObj in ele)
{

...

}

-------

I even tried sth different, but got only one curve.

 

GeometryElement ele = doc.GetElement(reb.Id).get_Geometry(opt);

 

Could You help?

 

Message 4 of 4
benITs
in reply to: rnowak

Not sure whether you got the solution for what you were looking for. I was also looking for something similar and has posted it here. Please have a look.

 

https://forums.autodesk.com/t5/revit-api-forum/create-aligned-dimension-between-rebars/m-p/7083248/h...

 

Also, if you have any better solution let me know.

Thanks

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community