Author Topic: How to get the point on the line from a getpoint  (Read 5719 times)

0 Members and 1 Guest are viewing this topic.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2149
  • class keyThumper<T>:ILazy<T>
Re: How to get the point on the line from a getpoint
« Reply #15 on: August 22, 2011, 06:51:57 PM »
> .. >
Alright, as I said, it's always worked for me, but I have modified the code above to us the OSNAP.

 just to reinforce the point ...
No ... It has NOT always worked, you just didn't know that it didn't work as you expected.

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: How to get the point on the line from a getpoint
« Reply #16 on: August 22, 2011, 06:59:23 PM »
> .. >
Alright, as I said, it's always worked for me, but I have modified the code above to us the OSNAP.

 just to reinforce the point ...
No ... It has NOT always worked, you just didn't know that it didn't work as you expected.
It's always worked in my routines, but in my cases close is good enough.

jaydee

  • Guest
Re: How to get the point on the line from a getpoint
« Reply #17 on: August 22, 2011, 07:59:13 PM »
Thankyou All who reponse to my post.
Lee's code might be what im after, need to incorporate see how it works.
As i mentioned on my post, the code only for demonstration purpose.
Its sometime quite hard to explain a small portion of code out of the overall codes.

I have this working function to break a MLINE and insert a block, but user require to pick (osnap nearest) the centre line of the MLINE.What i want is flexibility if user pick the outer edge of MLINE but still be able to insert the block at the centre line location.

The only user input is pick (osnap nearest) on the MLINE, (this will be the insertion point) the rest are all done by codes.
- convert Mline to Pline
- Break the Pline
- convert the 2 pline back to mline
- insert the block at pick location (only works if pick centre line of mline)

Its sometime quite difficult to pick the centre line of mline if this Mline consisted of even number of parallel lines (ie 4, 6, 8 paralell lines)
Thats why i need the point on the centre line if user pick the outer edge of Mline.

I thinks Lees code will work to transform the pick point onto the Polyline (after converting ML - PL)

Cheers
« Last Edit: August 22, 2011, 09:50:24 PM by jaydee »

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: How to get the point on the line from a getpoint
« Reply #18 on: August 22, 2011, 08:00:40 PM »
MLINE is a whole other story all together.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: How to get the point on the line from a getpoint
« Reply #19 on: August 23, 2011, 10:01:17 AM »
> .. >
Alright, as I said, it's always worked for me, but I have modified the code above to us the OSNAP.

 just to reinforce the point ...
No ... It has NOT always worked, you just didn't know that it didn't work as you expected.

X2  :lmao:  Now back to the regularly scheduled program.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

jaydee

  • Guest
Re: How to get the point on the line from a getpoint
« Reply #20 on: August 23, 2011, 06:52:04 PM »
Thankyou All
Lee's codes works great for me, and i could utilise efernal code as well.

Cheers