Message 1 of 2
Get top and bottom for dimensions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
Trying to add dimensions to section view trough API
1) Dimension for with has been added. But how do i get the top face and bottom face to get a height dimension?
2) is it possible to add a second layer to show the location of the family on top of the beam? if yes, how do i snap the dim line to the family instance?
var selectedBeam = uidoc
.Selection
.GetElementIds()
.Select(doc.GetElement)
.OfType<FamilyInstance>()
.FirstOrDefault();
var beamFaces = GetSolids(selectedBeam)
.SelectMany(x => x.Faces.OfType<PlanarFace>())
.ToList();
var view = getview;
var leftFace = beamFaces
.FirstOrDefault(x => x.ComputeNormal(UV.Zero).IsAlmostEqualTo(-1 * view.RightDirection));
var rightFace = beamFaces
.FirstOrDefault(x => x.ComputeNormal(UV.Zero).IsAlmostEqualTo(view.RightDirection));