1. Registered forum members do not see this ad.

Originally Posted by aaryan
@Mircea Thanks for the favor
No problem!

2. Originally Posted by aaryan
Thanks
I actually wanted you to modify your code and not me because you all are masters..
Master I'm not, but thats nice of you to say, you are too kind
But you know what? its all you Aaryan.. we're just here to assist and point you in the right direction.

Cheers

3. Thank You So much Mircea and pBe..

I've checked the code and its working perfectly even for the points selected outside of polyline, but if i pick a point (not on polyline) i am not getting the perpendicular distance. Can you check it please.

4. If the user did pick a poitn outisde the pline. it will give you intead the distance between the pick point and perpendicular to polyline? is that correct?

Code:
```(defun c:test3  ()
(setq a (car (entsel "\nSelect polyline:")))
(setq pt (getpoint "\nPick point:"))
(setq dist (if (vlax-curve-getDistAtPoint a pt)
(vlax-curve-getDistAtParam a
(vlax-curve-getParamAtPoint  a pt))
(distance (vlax-curve-getClosestPointTo  a pt) pt)))
(princ (strcat "\nKP on this point is: " (rtos dist 2 3)))
(princ)
)```

5. Not only the distance between a point picked and a point perpendicular to polyline but also the KP from a point which is perpendicular to polyline.

Like
Code:
`(princ (strcat "\nKp on this point is:" "xyz" "and offset from route is:abc"))`
and offset could be positive and negative that means if my point picked is on right side it would be positive offset and if it is on left side then it would be negative.

6. I think that you will get that result by combining the code examples given by pBe and me - it will be a good exercise for you.

7. Originally Posted by MSasu
I think that you will get that result by combining the code examples given by pBe and me - it will be a good exercise for you.
Thats not a bad idea. I concur.
Go for it Aaryan.

I need an aspirin

8. OK this will be my work...
anyways my problem is solved now.
I appreciate both of YOUR WORK and HELP for me.
I will come again with another question and another topic.

Thanks and Best Regards
Aaryan.

9. Originally Posted by aaryan
OK this will be my work...
anyways my problem is solved now.
Thanks and Best Regards
Aaryan.
If you dont mind, share youir code here when you're done Aaryan.

Keep on coding

10. Registered forum members do not see this ad.

I will definitely share here pBe.

Regards

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts