欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

【Revit API】FamilyInstance、FamilySymbol、Family的寻找关系

程序员文章站 2022-05-13 21:51:58
话不多说,做个笔记 ......

话不多说,做个笔记

FamilyInstance instance;  
var typeid = instance.GetTypeId();  
var symbol = RevitDoc.GetElement(typeid) as FamilySymbol;  
var familyName = symbol.FamilyName; 


var defaultFamilySymbolID = family.GetFamilySymbolIds().ToList()[familySymbolIndex];
var symbol =  doc.GetElement(defaultFamilySymbolID) as FamilySymbol;
if (!symbol.IsActive)
{
    symbol.Activate();
}