簡體   English   中英

從牆的邊緣,開口的側面到牆的另一邊緣創建尺寸

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

一年的大部分時間里,我一直在努力解決這個問題。 就像標題所說,我希望從牆壁的一側到開口的兩側(門的開口)的尺寸,然后在牆壁的另一端(垂直和水平)終止。 我也希望了解所有隔離牆中的家庭,但是我已經能夠使用ScottWilson的voodo魔術助手類來完成此任務。 在這里找到: 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();
        }

問題在於確定對壁面的適當穩定參考。 我能夠找到牆上的所有面孔,但這使我可以分類100多個面孔。

如果有人可以幫助我,將不勝感激!

旁注:最接近的是通過面板投射光線軌跡,然后使用參考相交方法確定參考。 但是我真的很難實現: http : //thebuildingcoder.typepad.com/blog/2015/12/retrieving-wall-openings-and-sorting-points.html

這兩篇文章應該足以解決您的所有問題:

基本上,您需要獲取要附加尺寸標注的面或邊的參考。 這些參考可以通過幾種方式獲得。 兩種常見且簡單的方法是:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM