my code: ref
http://thebuildingcoder.typepad.com/blog/2012/06/create-section-view-parallel-to-wall.html?cid=6a00e...
BoundingBoxXYZ bb = wall.get_BoundingBox(null);
double minZ = bb.Min.Z;
double maxZ = bb.Max.Z;
double w = v.GetLength();
double h = maxZ - minZ;
double d = wall.WallType.Width;
double offset = 0.1 * w;
XYZ min = new XYZ(-w, minZ - offset, -offset);
//XYZ max = new XYZ( w, maxZ + offset, 0 ); // section view dotted line in center of wall
XYZ max = new XYZ(w, maxZ + offset, offset); // section view dotted line offset from center of wall
XYZ midpoint = p + 0.5 * v;
XYZ walldir = v.Normalize();
XYZ up = XYZ.BasisZ;
XYZ viewdir = walldir.CrossProduct(up);
Transform t = Transform.Identity;
t.Origin = midpoint;
t.BasisX = walldir;
t.BasisY = up;
t.BasisZ = viewdir;
BoundingBoxXYZ sectionBox = new BoundingBoxXYZ();
sectionBox.Transform = t;
sectionBox.Min = min;
sectionBox.Max = max;
return sectionBox;