Detail Line by Points

Detail Line by Points

Anonymous
Not applicable
457 Views
1 Reply
Message 1 of 2

Detail Line by Points

Anonymous
Not applicable

How can I draw the Detail Line to let the information of direction and angle emerge before finishing the command?

UIDocument uidoc = commandData.Application.ActiveUIDocument;
Document doc = uidoc.Document;
View view = doc.ActiveView;

List<XYZ> listPoint = new List<XYZ>();
int i = 0;
while (true)
{
try
{
ObjectSnapTypes snapTypeA = ObjectSnapTypes.Endpoints | ObjectSnapTypes.Intersections;
XYZ A = uidoc.Selection.PickPoint(snapTypeA, "Select an end point or intersection");
listPoint.Add(A);
}
catch (Exception)

{
break;
}

i++;
}
using (Transaction tx = new Transaction(doc))
{
tx.Start("Create Detail Line");

for (int a = 0; a < listPoint.Count-1; a++)
{
Line geomLine = Line.CreateBound(listPoint[a], listPoint[a+1]);
DetailLine line = doc.Create.NewDetailCurve(view, geomLine) as DetailLine;
}

tx.Commit();
}
return Result.Succeeded;


Capture.PNGCapture2.PNG

0 Likes
Accepted solutions (1)
458 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni
Accepted solution

This is a duplicate of your subsequent question that I already answered just now:

 

https://forums.autodesk.com/t5/revit-api-forum/how-can-i-draw-the-detail-line-to-let-the-information...

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes