![]() In particular, if each of your N polylines will have a different linetype, the use of this version of incr will contribute the time quadratic in N to the total execution time. we first write the simplest code which does the job. Feel free to change this number (setq ss (ssget (list (cons 0 'POLYLINE,LWPOLYLINE')))) (setq len 0. In developing the incr function we followed the principle of "correctness first, efficiency later" i.e. (setq obj (vlax-ename->vla-object (ssname ss (setq i (1- i))))) Now we can use it, (defun c:TEST (/ ss i obj key tbl) (T key is in the cdr of tbl - keep on searching key is in the car of tbl - increment the count Here is the code: (defun C:TLEN (/ ss tl ent) (setq ss (ssget ( (0. ![]() ![]() Yes, just create a little function for yourself, (defun incr (key tbl) The easy way to get the total length of multiple lines is to use lisp. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |