((member (vla-get-objectname ent) '("AcDbLine" "AcDb3dPolyline" "AcDbPolyline")) (vlax-for ent (setq sel (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))) "LINE,POLYLINE,LWPOLYLINE,ARC,CIRCLE,ELLIPSE,SPLINE,MLINE,REGION,MPOLYGON"))) The routine scans this selection of objects and determines a total length value and displays it on the command line for reference.Ĭreate a new file in a text editing program like note pad and type in, or copy and paste, the following elements of code as shown below. ![]() This routine supports the selection of many different element types including lines, polylines, arcs, circles, ellipses, splines, multi-lines, regions and polygons. However, the full version of AutoCAD can make use of its programming environment and many free elements of Lisp code are available to download or write to perform this task instead. If this is attempted via conventional methods like the List command or Properties, the information returned will be limited due to the different parameters of the different selected object types.įor example, in the image above the properties dialogue displays a value of varies when selecting a series of lines, due to them possessing different lengths rather than a sum. ![]() On a recent training course, I was asked if AutoCAD could list the total length of a wide number of objects including lines, arcs, polylines, circles etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |