Ok guys i know i am doing something wrong here. I have been trying to get the length of the lines and polylines to a setq. Every time i add a line to get the length it seems to make the lisp fail. Right now it works the way i want it to,but then stops working when i add some lines in for lengths. I have looked at all types of lisp trying to add something in this to work. I looked at stuff from Lee MAc, afralisp, jefferypsanders, ect... I tried not to come here and ask y'all for help and do this one on my own, but just can't figure out what i am doing wrong.
This is pretty obvious problem, need to make two defuns lines and plines use a cond to check, pity no VL in 2006 ? so much easier for length, startpoint & endpoint, I have somewhere I think at home a do total lengths that has the two or 3 options in it.
(defun get-all-len (/ selset) (if (= (type (setq selset (vl-catch-all-apply (function (lambda () (ssget "_:L" '((0 . "*LINE")))))))) 'pickset ) ;_ end of = (apply '+ (mapcar (function (lambda (ent) (vlax-curve-getdistatpoint ent (vlax-curve-getendpoint ent)))) (vl-remove-if 'listp (mapcar 'cadr (ssnamex selset))) ) ;_ end of mapcar ) ;_ end of apply ) ;_ end of if ) ;_ end of defun
Bigal,
So take this defun imbed it in the main lisp? I should do the same for the line info as well? Then bring all this together to make it work? I think I get. I will play with this idea this weekend. Thank you!
test.dwg