Edit closed views

Edit closed views

Anonymous
Not applicable
320 Views
1 Reply
Message 1 of 2

Edit closed views

Anonymous
Not applicable

Hello,

 

Im busy to change the location and shape of Detail lines in Section view. I have a problem if the view is close because I cant edit the detail line. Just it works if the view is open.

 

how can i solve this problem?

 

Regards,

 

Hossam

0 Likes
321 Views
1 Reply
Reply (1)
Message 2 of 2

FAIR59
Advisor
Advisor

My test (Revit 2016) works fine.

 

I suspect you use doc.ActiveView somewhere in your code. 

if so you'd have to use the Ownerview of the detailLine.

 

my testcode: 

 

            DetailCurve dc = doc.GetElement(new ElementId(2043213)) as DetailCurve;
                using (Transaction t = new Transaction(doc, "offset detailLine"))
                {
                    t.Start();
                    View view = doc.GetElement(dc.OwnerViewId) as View;
                    Plane pl = dc.SketchPlane.GetPlane();
                    dc.SetGeometryCurve( Line.CreateBound(pl.Origin,pl.Origin.Add(pl.XVec)),true);
                    t.Commit();
                }