- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a ViewSectrion that I want to draw a filled region at the bottom boundary of the viewsection boundary, as a start I tried to create a line diagonally across the min, max corners and only get a null return value. I have also tried using the UV values of the UVboundingbox of the view and would get line is not on plane error. Do I need to perform a transform as I have accessed corner points and placed detail components in elevation views in the past without any error.
BoundingBoxXYZ cropBox = viewSection.CropBox;
XYZ point0 = new XYZ(cropBox.Min.X, cropBox.Min.Y, 0.0);
XYZ point1 = new XYZ(cropBox.Max.X, cropBox.Max.Y, 0.0);
Line line = Line.CreateBound(point0, point1);
//Plane plane = Plane.CreateByNormalAndOrigin(viewSection.ViewDirection.Normalize(), viewSection.Origin);
using (Transaction t = new Transaction(doc, "Create Line"))
{
t.Start();
try
{
//SketchPlane sketch = SketchPlane.Create(doc, plane);
DetailCurve detailLine = UiDoc.Document.Create.NewDetailCurve(viewSection, line);
Solved! Go to Solution.