TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: MSTG007 on June 02, 2005, 10:29:10 AM
-
Anyone know of a lisp which gives the total length of lines which you select?
thanks!
-
Pretty simple. Modify this (http://www.theswamp.org/phpBB2/viewtopic.php?p=63821#63821) post to suit. Example --
(defun c:SumLen ( / getlen len ss i )
(defun getlen ( object / area )
(vl-catch-all-apply
'(lambda ()
(setq len
(vla-get-length
object
)
)
)
)
(if len len 0.0)
)
(cond
( (setq len 0.0 ss (ssget))
(repeat (setq i (sslength ss))
(setq len
(+ len
(getlen
(vlax-ename->vla-object
(ssname ss
(setq i (1- i))
)
)
)
)
)
)
)
)
(if len len 0.0)
)
If you feel more ambitious perhaps modify this (http://www.theswamp.org/phpBB2/viewtopic.php?t=1303) post to suit.
:)
-
You might also try putting it in the proper forum too. Oh! I did it for you.
-
Doh, missed that, thanks Daron.
-
Visit my homepage -> Free Stuff -> Free Programs and search for 'GetLength.lsp'
Cheers
-
See this (http://www.theswamp.org/phpBB2/viewtopic.php?t=5420) concurrent post.