AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to trace multiple connected lines on mouse move to draw new line

1 REPLY 1
Reply
Message 1 of 2
giskumar
599 Views, 1 Reply

how to trace multiple connected lines on mouse move to draw new line

I am having multiple pieces of connected lines available. Now I want to draw a new line (a portion from the connected small lines) exactly on top of connected lines by using mouse. The placement process should follow below steps.

1. click the start point on one of the connected lines

2. Drag the mouse along with the connected lines till you reach the required end point

3. click the end point on one of the connected lines

4. A new line should be drawn from start point to end point by following the mouse trace.

 

Any existing functionality or C# code will be helpful.

 

1 REPLY 1
Message 2 of 2
norman.yuan
in reply to: giskumar

I have an article posted years ago about trace a single polyline with mouse move:

 

https://drive-cad-with-code.blogspot.com/2014/09/moving-mouse-cursor-to-trace-polyline.html 

 

Sorry for the video clip in the article not working because of modern browser no longer support flash video. But the code is actually rather easy to read/follow for you to get an idea.

 

Of course, you need to add extra code to extend the tracing drawable for the Transient Graphic for multiple connected curve (polyline, or line) and handle the situation of how they connected: end-to-end, one-cross-the-other, end-to-middle (branch).... The code would get complicated quickly as you can see.

 

Norman Yuan

Drive CAD With Code

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


AutoCAD Beta