Dynamo For Revit: ElevationMarker Nodes

前言

本文介绍 Revit 2021.1 新加的 ElevationMarker 节点以及相关概念。

内容

Dynamo Nodes

ElevationMarker Nodes 官方链接
共有 4 个节点:

  • ElevationMarker.ByViewTypeLocation 根据l立面视图标记类型和位置创建立面标记。
  • ElevationMarker.CreateElevationByMarkerIndex 根据索引号创建对应的立面视图。
  • ElevationMarker.CurrentViewCount 获取当前立面标记对应的视图数量。
  • ElevationMarker.GetView 根据输入的索引号,获取对应立面视图。

从 UI 创建 ElevationMarker,入口和创建出来的效果:
在这里插入图片描述
创建立面标记,通过这个节点创建之后,不会像 UI 那样默认创建一个视图,所以视图数量是 0。
在这里插入图片描述
通过里面标记,创建一个立面视图:
在这里插入图片描述

Revit API

下面列出对应的 API。

View Family Types

API 中确实有对应的类,可以得到视图的类型。

namespace Autodesk.Revit.DB
{
    
    
    public class ViewFamilyType : ElementType
    {
    
    
        public ViewFamily ViewFamily {
    
     get; }
        public ElementId DefaultTemplateId {
    
     get; set; }
        public PlanViewDirection PlanViewDirection {
    
     get; set; }
        public bool IsValidDefaultTemplate(ElementId templateId);
    }
}

在这里插入图片描述

ElevationMarker

暴露的节点和 API 对应关系:

  • ElevationMarker.ByViewTypeLocation >>> CreateElevationMarker
  • ElevationMarker.CreateElevationByMarkerIndex >>> CreateElevation
  • ElevationMarker.CurrentViewCount >>> CurrentViewCount
  • ElevationMarker.GetView >>> GetViewId
namespace Autodesk.Revit.DB
{
    
    
    public class ElevationMarker : Element
    {
    
    
        public bool IsReference {
    
     get; }
        public int MaximumViewCount {
    
     get; }
        public int CurrentViewCount {
    
     get; }
        public static ElevationMarker CreateElevationMarker(Document document, ElementId viewFamilyTypeId, XYZ origin, int initialViewScale);
        public static ElevationMarker CreateReferenceElevationMarker(Document document, ElementId viewFamilyTypeId, XYZ origin, ElementId viewPlanId);
        public ViewSection CreateElevation(Document document, ElementId viewPlanId, int index);
        public void CreateReferenceElevation(Document document, int index, ElementId viewIdToReference);
        public ElementId GetViewId(int index);
        public bool HasElevations();
        public bool IsAvailableIndex(int index);
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_44153630/article/details/108003409