How to draw Detail Line by capturing its points until cancelling

How to draw Detail Line by capturing its points until cancelling

kite15
Advocate Advocate
467 Views
1 Reply
Message 1 of 2

How to draw Detail Line by capturing its points until cancelling

kite15
Advocate
Advocate

Hi,

I am trying to draw a detail line through C# code as it was in Revit default. Mainly, Wants to capture the start point and end point from the picked points until the user not cancelling the event.

The user can see the drawn lines from the current view by picking two points and all snaps, extensions etc.

 

Can you help how this can be performed ?

 

Thanks in advance

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

jeremy_tammik
Alumni
Alumni

You can start an infinite loop, prompt the user to select the next point, create a new detail line and regenerate the model until the user cancels the point selection. However, it may be that Revit will not update the screen graphics until the command has been terminated. In that case, a more complex solution might be feasible: terminate your external command after creating each detail line segment to regenerate the model and call PostCommand to re-launch the same external command again immediately after terminating it. Please let us know how you end up solving this. Thank you.

 

Cheers,

 

Jeremy

  

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