How to get seperated polyline segment in selected polyline

How to get seperated polyline segment in selected polyline

MarkJamesRogolino
Advocate Advocate
723 Views
4 Replies
Message 1 of 5

How to get seperated polyline segment in selected polyline

MarkJamesRogolino
Advocate
Advocate

Hello, everyone. Now I am making a small plugin with .NET.

I have already received a lot of help from elite members such as _gile.

I have to get seperated polyline segment in selected polyline and change color that segment.

How can I solve this problem. I think someone can help me. Thanks in advance.

I attached a sample video.

0 Likes
Accepted solutions (1)
724 Views
4 Replies
Replies (4)
Message 2 of 5

norman.yuan
Mentor
Mentor

You need to provide more details about what you intend to do: select a segment of a poly line is easy, but you cannot change a polyline’s color per segment, unless you break the polyline. So, what is the purpose of your requirement? Do you want to break the polyline into multiple ones upon user selecting segments? Or you simply want to provide a visual hint to show which segment is selected so that user knows the following operation from your code would depend on the selected segment?

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 5

MarkJamesRogolino
Advocate
Advocate

Hi, norman. Thanks for your reply. I mean only visual hint. I hope your help. 

0 Likes
Message 4 of 5

norman.yuan
Mentor
Mentor

I wrote some code published in my blog with companion video clip here:

 

https://drive-cad-with-code.blogspot.com/2022/09/selecting-segment-of-polyline-visually.html 

 

It may not be exactly what you want, but should clearly show a quite simple way to do it.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 5 of 5

MarkJamesRogolino
Advocate
Advocate
Accepted solution

Hi, norman, Thanks for your hint. This was very helpful. Thanks again.

0 Likes