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: 

Any tool or method to find Structural Framing's Bearing length (Column)

14 REPLIES 14
SOLVED
Reply
Message 1 of 15
Arciviz
1642 Views, 14 Replies

Any tool or method to find Structural Framing's Bearing length (Column)

Total Length = Bearing Length Left/Top of Column + Cut Length of Structural Framing + Bearing Length Right/bottom of Column.

How to find Bearing Length Left/Top of Column / Bearing Length Right/bottom of Column.

1'6" & 9" are bearing length as shown in the attachment.

14 REPLIES 14
Message 2 of 15
jeremytammik
in reply to: Arciviz

Please explain how you determine these through the user interface.

 

I suggest you start by exploring how to achieve what you are trying to do manually through the user interface.

 

If that is possible, it is probably possible programmatically as well.

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 15
Arciviz
in reply to: jeremytammik

I have to rebar for Str.Columns, Str.Frames & Slabs using Revit API.  Our company has our own shape code & tag style.

Now I want to find beam's both side bearing length (Please refer extension - Reinforcement - "beam.png").

Also refer our "LSD - Beam.png".

Any method to find easily. or Having any existing code to find bearing.

Message 4 of 15
jeremytammik
in reply to: Arciviz

I have no idea off-hand, so I forwarded the question to the development team for you.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 15
Arciviz
in reply to: jeremytammik

Hi Mr.Jeremy,

Thanks for your valuable replay.

Regards,

Sudhan

Message 6 of 15
dragos.turmac
in reply to: Arciviz

Hi @Arciviz,

 

I am not exactly sure what are you looking after. Do you mean the size(length) of the volume in which the beam intersects a column?



Turmac Dragos
Pr. SW. Engineer
Message 7 of 15
jeremytammik
in reply to: Arciviz

Is this what you mean?

 

A beam may rest on two columns.

 

The columns may have sticky out bits supporting the beam.

 

How long are the sticky out bits?

 

Or, alternatively, how long is the bearing length of the beam, the unsupported length?

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 8 of 15
Arciviz
in reply to: dragos.turmac

Yes

Message 9 of 15
Arciviz
in reply to: jeremytammik

Sorry, I am little Poor in English.

A beam may rest on two columns.

1. Intersection length of Endpoint(0) of beam & Column 

2. Intersection length of Endpoint(1) of beam & Column 

any method to get Length?

 

Message 10 of 15
Arciviz
in reply to: dragos.turmac

Intersection Length. Column's Width or breath.  Example - 1'3" is bearing length  (refer attachment LSD Beam.Png)

Message 11 of 15
dragos.turmac
in reply to: Arciviz

I see, so my assumption so correct. Now, the next question is more specific:

do you want the code to work only in the case of rectangular beam/column that are intersecting in 90 degrees angle?

Because there are a plethora of other situations that can't be defined in the same code and they can be vastly more complicated to detect (circular column + rectangular beam = variable length, rectangular beam + rectangular column at a non 90 degree angle from X axis = variable length, etc.)



Turmac Dragos
Pr. SW. Engineer
Message 12 of 15
jeremytammik
in reply to: Arciviz

You could use one of the numerous methods to determine the columns supporting a beam listed here:

 

http://thebuildingcoder.typepad.com/blog/2013/03/supporting-columns.html#2

 

Once you have the beam and supporting columns, retrieve their geometry, and determine the distance between the two closest vertices with each vertex belonging to a separate column.

 

You could also use the ReferenceIntersector to shoot a ray parallel to the beam location line, offset just below the bottom of the beam.

 

That would return the two closest column faces.

 

Cf.:

 

 

The Revit SDK sample FindColumns demonstrates how to find columns that are embedded in walls using the ReferenceIntersector.

 

You could use a very similar approach to determine the columns located just below the beam.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 13 of 15
Arciviz
in reply to: jeremytammik

Smiley Happy

Super Dear Jeremy.

Thanks lot.

Regards,

Sudhan

Message 14 of 15
Arciviz
in reply to: jeremytammik

I Have try it. Some case it work. Some case it leaves nearest column and rays next column.

 

View CurView = ui_doc.ActiveView;
IList<Element> elems = KJU.CategoryNameFilterByRectangle(ui_doc , "Structural Framing");
Element elem = doc.GetElement(elems.FirstOrDefault().Id);

 

List<double> dists = new List<double>();
Curve curve = (elem.Location as LocationCurve).Curve;
if(curve is Line)
{
FilteredElementCollector collector = new FilteredElementCollector(doc);
Func<View3D , bool> isNotTemplate = v3 => !(v3.IsTemplate);
View3D view3D = collector.OfClass(typeof(View3D)).Cast<View3D>().First<View3D>(isNotTemplate);
ElementId bm_symID;

bm_symID = elem.GetTypeId();
Element Symele = doc.GetElement(bm_symID);
string Z_just = elem.get_Parameter(BuiltInParameter.Z_JUSTIFICATION).AsValueString();
double Z_just_ofs = elem.get_Parameter(BuiltInParameter.Z_OFFSET_VALUE).AsDouble(),
Bm_depth = Symele.GetParameters("Beam Depth")[0].AsDouble(),
Bm_Top_Level = 0, bm_center_lvl = 0,
Bm_Z_locationLevel = curve.GetEndPoint(0).Z;
if(Z_just.Equals("Top"))
{
Bm_Top_Level = Bm_Z_locationLevel + Z_just_ofs;
}
else if(Z_just.Equals("Bottom"))
{
Bm_Top_Level = Bm_Z_locationLevel + Z_just_ofs + Bm_depth;
}
else if(Z_just.Equals("Center"))
{
Bm_Top_Level = Bm_Z_locationLevel + Z_just_ofs + Bm_depth * 0.5;
}
else
{
Bm_Top_Level = Bm_Z_locationLevel + Z_just_ofs;
}
bm_center_lvl = Bm_Top_Level - 0.5 * Bm_depth;
XYZ cur_mid_point = curve.Evaluate(0.5 , true),
Bm_center_point = new XYZ(cur_mid_point.X , cur_mid_point.Y , bm_center_lvl);
//DrawCircle(ui_doc , Bm_center_point , 0.25 , new XYZ(0 , 0 , 1));

XYZ dir_st2end = curve.GetEndPoint(1) - curve.GetEndPoint(0),
dir_end2st = curve.GetEndPoint(0) - curve.GetEndPoint(1);

// Filtering StructuralColumns
ElementClassFilter filter1 = new ElementClassFilter(typeof(FamilyInstance));
ElementCategoryFilter filter2 = new ElementCategoryFilter(BuiltInCategory.OST_StructuralColumns);
LogicalAndFilter filter = new LogicalAndFilter(filter1 , filter2);
ReferenceIntersector refIntersector = new ReferenceIntersector(filter , FindReferenceTarget.Face , view3D);
IList<ReferenceWithContext> referenceWithContext1 = refIntersector.Find(Bm_center_point , dir_st2end);
XYZ refp2 = referenceWithContext1[1].GetReference().GlobalPoint,
refp1 = referenceWithContext1[0].GetReference().GlobalPoint;
Double Bearing_End = refp1.DistanceTo(refp2);
IList<ReferenceWithContext> referenceWithContext2 = refIntersector.Find(Bm_center_point , dir_end2st);
Double Bearing_start = referenceWithContext2[0].GetReference().GlobalPoint.DistanceTo(referenceWithContext2[1].GetReference().GlobalPoint);
TaskDialog.Show("Angle of Curve , Start Bearing, End Bearing" ,
"Frame Rotation angle in degree = " + KJU.GetAngleinDegree(curve.GetEndPoint(0) , curve.GetEndPoint(1)) +
"\n Column Support Bearing @ Start Point = " + KJU.Feet2FeetandInches(Bearing_start) +
"\n Column Support Bearing @ End Point = " + KJU.Feet2FeetandInches(Bearing_End));
dists.Add(Bearing_start); dists.Add(Bearing_End);

}
if(curve is Arc)
{
}

Message 15 of 15
Arciviz
in reply to: Arciviz

Bugs are corrected  myself.

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

Post to forums  

Autodesk Design & Make Report