Revit API:找到轮廓族的路径

前言

以封檐板为例,介绍如何找到某个族中使用的轮廓族。

内容

如下图所示,这是在屋顶边缘家的封檐板:
在这里插入图片描述
封檐板的类型中有一个轮廓的属性:
在这里插入图片描述
如何通过 Revit API 去获取这个轮廓?

  1. 从封檐板获取类型
  2. 从类型参数中得到轮廓族

在这里插入图片描述
如何从轮廓得到里面具体的轮廓内容?

  1. FamilySymbol 的接口获得 Family
  2. Document::EditFamily来打开和编辑模型,从而得到一个族的 Document
  3. 从这个新的 Document 里面拿到具体的图元 Element

另一种获取各种类型轮廓的方法:

// namespace Autodesk.Revit.DB
// class FamilyUtils
public static ICollection<ElementId> GetProfileSymbols(Document document, ProfileFamilyUsage profileFamilyUsage, bool oneCurveLoopOnly);

可以获取的轮廓种类:

namespace Autodesk.Revit.DB
{
    
    
    public enum ProfileFamilyUsage
    {
    
    
        // 任意类型
        Any = 0,

        // 墙饰条
        WallSweep = 1,
        //
        // 墙分隔条
        Reveal = 2,

        // 封檐板
        Fascia = 3,

        // 檐槽
        Gutter = 4,

        // 楼板边缘
        SlabEdge = 5,

        // 扶手
        Railing = 6,

        // 楼梯前缘轮廓
        StairNosing = 7,

        // 竖梃
        Mullion = 8,
        //
        // 
        SlabMetalDeck = 9,
        //
        // 摘要:
        //     Continuous Footing.
        ContinuousFooting = 10,
        //
        // 摘要:
        //     Stair Tread.
        StairTread = 11,
        //
        // 摘要:
        //     Stair Riser.
        StairRiser = 12,
        //
        // 摘要:
        //     Stair Support.
        StairSupport = 13
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_44153630/article/details/121419067
今日推荐