Revit API创建详图视图

start
//创建详图视图
Transaction ts = new Transaction(doc, "http://greatverve.cnblogs.com");
ts.Start();

Reference refElem = selection.PickObject(ObjectType.Element, "选择");
Element elem = doc.GetElement(refElem);
BoundingBoxXYZ bBox = elem.get_BoundingBox(doc.ActiveView);
ViewSection viewSection = doc.Create.NewViewSection(bBox);

ts.Commit();
uiDoc.ActiveView = viewSection;

Transform tf = Transform.Identity;
tf.BasisX = XYZ.BasisX;
tf.BasisY = XYZ.BasisZ;
tf.BasisZ = XYZ.BasisX;
end
posted @ 2014-03-02 08:46  大气象  阅读(2357)  评论(0编辑  收藏  举报
http://www.tianqiweiqi.com