(alert (strcat "Total length of selected objects is " (rtos tl) ".")) Tl (+ (cond (tl) (0)) (vlax-curve-getDistAtParam ent (vlax-curve-getEndParam ent))) "LINE,ARC,CIRCLE,*POLYLINE,SPLINE,ELLIPSE")))) But there's a way to disallow those right in the selection, and a single AutoLisp function that can get the length from all eligible object types in the same way, which greatly reduces the code required. Some allow selection of things that don't have length at all, and either just pass them by in processing, or report on their invalidity. They derive the length of different kinds of objects by different kinds of calculations, or in some cases using an AREA command on them so they can extract the length from the PERIMETER System Variable. I notice that TLEN and some of the routines in the link in my first Reply go to more trouble than necessary.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |