Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reactor to count pline's points

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
262 Views, 2 Replies

Reactor to count pline's points

Hi, I have a problem in counting the number of points in pline.

I have written a reactor which works when polylines attached to are modified. I also want to count the numbers of points in polyline. The program works ok when you modify polyline's point's positions. But when you add a point to polyline or merge polyline with other line or polyline (which increases the number of points), the program shows the old pline's points number (although the coordinates of points are updated). How can I write a program (or use another reactor) that counts the number of new pline's points?
2 REPLIES 2
Message 2 of 3
awerning
in reply to: Anonymous

Can you post the code that you are using currently to count the pline points?
Message 3 of 3
Kent1Cooper
in reply to: Anonymous

Without seeing your code, I'll throw in a guess....

If you're using something similar to:

(setq edata (entget ename))

to get the entity data, and reading the (assoc 90) value for the number of vertices, it may be only a matter of the reactor reading the old list, because the 'edata' saved in the variable is still the old information, because nothing has changed what's in that variable -- it won't update itself when the entity whose data were put in it is changed. If so, just do that same (setq) again to put data for the *revised* Polyline into the 'edata' list, and then read the (assoc 90) value again.

--
Kent Cooper
Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report