Autodesk.Revit.DB.Architecture.StairsComponentConnection是Revit API中用于描述楼梯连接方式的类。
public StairsComponentConnection(StairsComponentConnectionType connectionType, int componentId, IList<int> supportedMultistoryIds)
创建一个新的StairsComponentConnection对象。
connectionType
(StairsComponentConnectionType): 连接类型,包括Top和Bottom。componentId
(int): 连接构件的Id。supportedMultistoryIds
(IList<int>): 与此连接相关的多层楼层Id列表。ConnectionType
(StairsComponentConnectionType): 获取或设置连接类型。ComponentId
(int): 获取或设置连接构件的Id。SupportedMultistoryIds
(IList<int>): 获取或设置与此连接相关的多层楼层Id列表。该类没有公共方法。
以下示例演示如何创建一个StairsComponentConnection对象并设置其属性:
// 创建连接构件
FamilyInstance connection = doc.Create.NewFamilyInstance(topRefPoint, connectionTypeSymbol, level, StructuralType.NonStructural);
// 创建StairsComponentConnection对象
StairsComponentConnection stairsConnection = new StairsComponentConnection(StairsComponentConnectionType.Top, connection.Id, new List<int> { level.Id });
// 设置StairsComponentConnection对象属性
stairsConnection.ConnectionType = StairsComponentConnectionType.Bottom;
stairsConnection.SupportedMultistoryIds = new List<int> { level.Id, upperLevel.Id };