//创建详图视图
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;
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;