miki969696

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();                
    }            
}

 

posted on 2025-10-31 01:51  盛书伟  阅读(1)  评论(0)    收藏  举报

导航