私は、この問題に 1 年のほとんどの間、断続的に取り組んできました。タイトルが示すように、壁の片側から開口部 (ドア開口部) の両側まで寸法を記入し、壁のもう一方の端 (垂直および水平) で終了したいと考えています。また、壁にホストされているすべてのファミリに寸法を記入したいと考えていますが、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/retrifying-wall-openings-and-sorting-points.html