errorist Posted February 13, 2019 Posted February 13, 2019 Hi, I have Lee-Mac's Area Label lisp and I modified it to give lengths of the lines selected by simply replacing "areas"s in code with "length"s However it doesn't work with open lines. I guess the reason for that the code was designed to retreive areas of the selected objects must be closed (of course). So I looked up in the code to delete that option but I was not able to find anything about objects being closed except: (vlax-curve-isclosed x) but it can not be about this since it is about a curve, right? So anyone can help me about it please? Quote
dlanorh Posted February 13, 2019 Posted February 13, 2019 A line can be considered as a curve without curvature if that makes sense. Vlax-curve functions work on lines, polylines, arc etc; they don't have to curves. I don't think it is possible to adapt the code to work with open polylines. It would be better to find a seperate lisp that just reports the length of open polylines. Try this simple lisp . There is no testing to exclude non line entities or infinite line entities. If you wish to expand on it, be my guest. (defun c:LL ( / ) (setq ent (car (entsel "\nSelect Line Entity : "))) (setq len (vlax-curve-getdistatparam ent (vlax-curve-getendparam ent))) (alert (strcat "Length is : " (rtos len 2 3))) ) Quote
BIGAL Posted February 13, 2019 Posted February 13, 2019 (edited) An alternative is to look at object then retrieve the length using the correct variable value, then use a simple Cond ARC = arclength Line,pline = length Circle = circumference vla-get-length Also lee-mac totallength.lsp Edited February 13, 2019 by BIGAL Quote
Matheus Suss Posted September 16, 2021 Posted September 16, 2021 Do any of you have this modifed lisp that does the same thing that Lee-Mac's Area Label lisp does but with lenghts? Quote
BIGAL Posted September 17, 2021 Posted September 17, 2021 Watch this space doing something at moment. Length, Area and block count. 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.