Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/05/2021 in all areas

  1. REPLACE THIS (setq di (vlax-curve-getdistatpoint s p)) WITH THIS (setq di (vlax-curve-getdistatpoint s c))
    1 point
  2. @BIGAL No need to convert the entity to an object, the curve functions are actually faster with enames. (vlax-curve-getdistatpoint (car ent) pt) _$ Benchmarking ....................Elapsed milliseconds / relative speed for 131072 iteration(s): (vlax-curve-getDistAtPoint E P)..............1656 / 4.43 <fastest> (vlax-curve-getDistAtPoint (vlax-ena...).....7344 / 1.00 <slowest> ; 1 form loaded from #<editor "<Untitled-0> loading..."> _$
    1 point
  3. It is very easy there is a vl function note though it will be always from start of pline. A quicky effort (defun c:getdist ( / oldsnap pt ent) (setq oldsnap (getvar 'osmode)) (setvar 'osmode 512) (setq ent (entsel "Pick obj")) (while (setq pt (getpoint "\nPick point Enter to exit")) (princ (vlax-curve-getdistatpoint (vlax-ename->vla-object (car ent)) pt)) ) (setvar 'osmode oldsnap) (princ) )
    1 point
×
×
  • Create New...