/// <summary>
/// 创建标注
/// </summary>
private void CreateTag()
{
View view = document.ActiveView;
Element element = document.GetElement(new ElementId(335945));
using (Transaction transaction = new Transaction(document, "创建标注"))
{
transaction.Start();
XYZ point = XYZ.Zero;
//创建标注
IndependentTag independentTag = IndependentTag.Create(document, view.Id, new Reference(element), true, TagMode.TM_ADDBY_CATEGORY, TagOrientation.Horizontal, XYZ.Zero);
//设置标签引线的肘部位置。
independentTag.LeaderElbow = new XYZ(2,2,0);
transaction.Commit();
}
}
revit二次开发 创建标注标记
于 2021-12-24 09:31:22 首次发布