symoin Posted September 5, 2020 Posted September 5, 2020 Hi All, Is there any lisp code to identify the smallest line and label its length from the selected lines. if you have come across any such code please let me know Thanks in advance. Quote
dlanorh Posted September 5, 2020 Posted September 5, 2020 5 hours ago, symoin said: Hi All, Is there any lisp code to identify the smallest line and label its length from the selected lines. if you have come across any such code please let me know Thanks in advance. Are you refering to just "LINE" lines or does this include arcs, circles, ellipses, lwpolylines, splines etc? Quote
BIGAL Posted September 5, 2020 Posted September 5, 2020 Like dlanorh just select objects and get the length and save object entity name in a varible if less than. *lines & arc vla-get-length Circle vla-get-circumference Quote
devitg Posted September 6, 2020 Posted September 6, 2020 please test it samllest + label lin.dwg SMALLEST LINE + LABEL.LSP Quote
symoin Posted September 6, 2020 Author Posted September 6, 2020 10 hours ago, dlanorh said: Are you refering to just "LINE" lines or does this include arcs, circles, ellipses, lwpolylines, splines etc? Mostly it will be lines and some times it will have lwpolylines along with the lines. Quote
symoin Posted September 6, 2020 Author Posted September 6, 2020 6 hours ago, devitg said: please test it samllest + label lin.dwg 50.68 kB · 1 download SMALLEST LINE + LABEL.LSP 1.66 kB · 3 downloads Thanks Devitg. for this excellent code. Yes this is what I was looking for the line. what if any lwpolyline is also there which has to be included. (only lwpolylines along with lines and no other type) Quote
devitg Posted September 6, 2020 Posted September 6, 2020 Please upload a sample dwg with such lwpolylines Quote
devitg Posted September 6, 2020 Posted September 6, 2020 as ask samllest-lline+plines + label lin.dwg SMALLEST LINE-and plines + LABEL.LSP Quote
symoin Posted September 6, 2020 Author Posted September 6, 2020 1 hour ago, devitg said: as ask samllest-lline+plines + label lin.dwg 49.97 kB · 0 downloads SMALLEST LINE-and plines + LABEL.LSP 1.66 kB · 0 downloads Thats Perfect, Thanks once again to you and all those who have given their time and efforts.. Quote
BIGAL Posted September 6, 2020 Posted September 6, 2020 Hi devitg no need for acdoc code (SETQ LENGTH+HANDLE-LIST ()) (repeat (setq x (sslength lines-ss)) (setq LINE-OBJ (vlax-ename->vla-object (ssname LINES-SS (setq x (- x 1))))) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.