简体   繁体   English

从墙的边缘,开口的侧面到墙的另一边缘创建尺寸

[英]Create Dimensions from edge of wall, to sides of openings, to other edge of wall

I've been struggling with this issue off and on for the better part of a year. 一年的大部分时间里,我一直在努力解决这个问题。 As the title says, i wish to dimension from one side of a wall, to both sides of openings (door openings), then terminate at the other end of the wall (vertically and horizontally). 就像标题所说,我希望从墙壁的一侧到开口的两侧(门的开口)的尺寸,然后在墙壁的另一端(垂直和水平)终止。 I also wish to dimension to all families hosted in the wall, but i have been able to accomplish this using ScottWilson's voodo magic helper class. 我也希望了解所有隔离墙中的家庭,但是我已经能够使用ScottWilson的voodo魔术助手类来完成此任务。 Found Here: http://thebuildingcoder.typepad.com/blog/2016/04/stable-reference-string-magic-voodoo.html 在这里找到: http : //thebuildingcoder.typepad.com/blog/2016/04/stable-reference-string-magic-voodoo.html

foreach (ElementId ele in selSet) {
            FamilyInstance fi = doc.GetElement(ele) as FamilyInstance;
            Reference reference = ScottWilsonVoodooMagic.GetSpecialFamilyReference(fi,ScottWilsonVoodooMagic.SpecialReferenceType.CenterLR,doc);
            refs.Append(reference);
            pts[i] = ( fi.Location as LocationPoint ).Point;
            i++;
        }

        XYZ offset = new XYZ(0,0,4);
        Line line = Line.CreateBound( pts[0]+offset, pts[selSet.Count - 1]+offset );


        using( Transaction t = new Transaction( doc ) )
        {
            t.Start( "dimension embeds" );
            Dimension dim = doc.Create.NewDimension(doc.ActiveView, line, refs );
            t.Commit();
        }

The problem lies in determining the appropriate stable references to the wall faces. 问题在于确定对壁面的适当稳定参考。 I am able to find all faces on a wall, but this gives me 100+ faces to sort through. 我能够找到墙上的所有面孔,但这使我可以分类100多个面孔。

If anyone can help me it would be greatly appreciated! 如果有人可以帮助我,将不胜感激!

Side note: The closest of gotten is using a casting a ray trace through my panel, then using a reference intersector method to determine references. 旁注:最接近的是通过面板投射光线轨迹,然后使用参考相交方法确定参考。 But i'm really struggling with implementation: http://thebuildingcoder.typepad.com/blog/2015/12/retrieving-wall-openings-and-sorting-points.html 但是我真的很难实现: http : //thebuildingcoder.typepad.com/blog/2015/12/retrieving-wall-openings-and-sorting-points.html

These two posts should provide more than enough to solve all your issues: 这两篇文章应该足以解决您的所有问题:

Basically, you need to obtain references to the faces or edges that you wish to attach the dimensioning to. 基本上,您需要获取要附加尺寸标注的面或边的参考。 These references can be obtained in several ways. 这些参考可以通过几种方式获得。 Two common and easy approaches are: 两种常见且简单的方法是:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM