public Element create_rebar_label(string text) { //string[] lines = text.Split("\r\n"); //TextElement label = app.CreateTextElement1(null, text, app.Point3dZero(), app.Matrix3dZero()); //TextStyle ts = app.ActiveDesignFile.TextStyles["宋体"]; //label.TextStyle = ts; //TextNodeElement node = app.CreateTextNodeElement1(null, app.Point3dZero(), app.Matrix3dZero()); //node.AddTextLine(); //return label; string[] lines = text.Split("\r\n".ToCharArray()); TextNodeElement node = app.CreateTextNodeElement1(null, app.Point3dZero(), app.Matrix3dFromRotationBetweenVectors(app.Point3dFromXYZ(0, 1, 0), app.Point3dFromXYZ(0, 1, 0))); foreach (string line in lines) { node.AddTextLine(line); } return(node); }