ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

revit api创建参考线

2026/8/7 10:51:27 拓冰建站 浏览量
revit api创建参考线

revit api创建参考线

参考线可以用modelcurve转化而来

public void ChangeModelCurveToReferenceLine()
{            
    Document doc = this.ActiveUIDocument.Document;    
    ModelCurve modelCurve = doc.GetElement(new ElementId(2910)) as ModelCurve;
    using(Transaction transaction = new Transaction(doc, "Change model curve to reference line."))
    {
        transaction.Start();
        modelCurve.ChangeToReferenceLine();
        transaction.Commit();                
    }            
}