NO one??? out there??/
I think no need to use ractor for this cause
Easier way might be:
Menu->Insert->Fieldthen in dialog window select in
Field category:
Objectthen in
Object type box press button to select polyline
on screen
then in
Properties popup list select:
Lengthand in the
Format list choose what you need
then pick the starting or the ending point to add field
Voila!
Do not forget if you will stretch a polyline, the field
value will be changed after drawing regeneration only
(command "regen")
Or the same stuff but programmatically:
(defun C:PLB (/ acsp adoc label1 mtx pline_obj)
(vl-load-com)
(or adoc
(setq adoc
(vla-get-activedocument
(vlax-get-acad-object)
)
)
)
(if (and
(= (getvar "tilemode") 0)
(= (getvar "cvport") 1)
)
(setq acsp (vla-get-paperspace adoc))
(setq acsp (vla-get-modelspace adoc))
)
(setq pline_obj (vlax-ename->vla-object
(car (entsel "\n >> Select a polyline to labeling >>\n"))))
(setq label1
(strcat
"%<\\AcObjProp Object(%<\\_ObjId "
(itoa (vla-get-objectid pline_obj))
">%).Length \\f \"%lu2\">%"
)
)
(setq mtx (vlax-invoke acsp
'AddMText
(vlax-curve-getstartpoint pline_obj)
0.0
label1
)
)
(vl-catch-all-apply
(function (lambda ()
(progn
(vlax-release-object mtx)
(vlax-release-object pline_obj)
)
)
)
)
(vla-regen adoc acactiveviewport)
(princ)
)
(prompt "\n===========================\n")
(prompt "\n Type PLB to execute ... ")
(prompt "\n===========================\n")
(princ)
;(C:PLB);debug only
Hth
Fatty
~'J'~