Dimension rebars

Dimension rebars

michael
Participant Participant
2,278 Views
3 Replies
Message 1 of 4

Dimension rebars

michael
Participant
Participant

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

0 Likes
Accepted solutions (1)
2,279 Views
3 Replies
Replies (3)
Message 2 of 4

Joe.Ye
Alumni
Alumni
Accepted solution

 

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
Explorer
Explorer

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?

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

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

0 Likes