
Originally Posted by
milivojekrstanovic
Can anyone please help me. I am trying to find a lisp which could help me with making of the bbs (bar bending schedule). It means that I want to export my polyline dimensions from autocad drawing to excel file. Every dimension should be in its separate column. Thanks.
You mean the length of the polyline?
Columns? 15 polylines 15 columns?
Will there be a test for equal length and a row for quantity?
Would it be better if Rows for length and colums for quantity?
Retriving the length is fairly easy
Code:
(defun c:test ( / aDoc ss )
(vl-load-com)
(setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object)))
(if (ssget '((0 . "LWPOLYLINE")))
(progn
(vlax-for itm (setq ss (vla-get-ActiveSelectionSet aDoc))
(princ (strcat "\nPolyline length :\t"
(rtos (vlax-curve-getDistAtParam
itm
(vlax-curve-getEndParam
itm
)
) 2 2)
)
)
)
(vla-delete ss)
)
)(princ)
)