SLW210 Posted Thursday at 03:31 PM Posted Thursday at 03:31 PM Anyone have any hints on how to get Spline Leader lengths? Ultimately, I am looking to make several already drawn spline leaders the same length. Quote
BIGAL Posted Friday at 01:10 AM Posted Friday at 01:10 AM As a spline gives two answers the points answer and another with nodes. So any way if you explode the Mleader then you can get at the spline using this. Just need to check that the spline is last entity, tested in Bricscad. A disclaimer not sure if length is correct. I think it is short by length of arrow. Will try to find arrow length. Yep found it. (defun c:wow ( / plent pt len lenar) (setq plent (entsel "\nPick mleader ")) (setq lenar (cdr (assoc 140 (entget (car plent))))) (command "undo" "M") (command "explode" (car plent)) (setq ent (ssname (ssget "L") 0)) (setq len (getpropertyvalue ent "length")) (command "undo" "B") (alert (strcat "Total length is " (rtos (+ lenar len) 2 3))) (princ) ) (c:wow) I think you could do a "I want a length of 100 by drawing something close then move say arrow point till you get approx 100. Via lisp. It would be a two step process explode and move then undo and reset arrow head point. 1 Quote
SLW210 Posted Friday at 10:08 AM Author Posted Friday at 10:08 AM 17 hours ago, 1958 said: ml.LSP 1.41 kB · 5 downloads It would be nice if you could put the prompts and comments in English. I saw the Dogleglength when I did a dump on a Mleader. I'll see what I come up with. 8 hours ago, BIGAL said: As a spline gives two answers the points answer and another with nodes. So any way if you explode the Mleader then you can get at the spline using this. Just need to check that the spline is last entity, tested in Bricscad. A disclaimer not sure if length is correct. I think it is short by length of arrow. Will try to find arrow length. Yep found it. (defun c:wow ( / plent pt len lenar) (setq plent (entsel "\nPick mleader ")) (setq lenar (cdr (assoc 140 (entget (car plent))))) (command "undo" "M") (command "explode" (car plent)) (setq ent (ssname (ssget "L") 0)) (setq len (getpropertyvalue ent "length")) (command "undo" "B") (alert (strcat "Total length is " (rtos (+ lenar len) 2 3))) (princ) ) (c:wow) I think you could do a "I want a length of 100 by drawing something close then move say arrow point till you get approx 100. Via lisp. It would be a two step process explode and move then undo and reset arrow head point. I know how to get a Spline length, I don't want to explode the Mleaders, defeats the purpose. Quote
BIGAL Posted Saturday at 05:22 AM Posted Saturday at 05:22 AM (edited) The Undo un-explodes them though. On my phone. Will have a look at the lsp tomorrow. Edited Saturday at 05:23 AM by BIGAL Quote
SLW210 Posted 15 hours ago Author Posted 15 hours ago But wouldn't undo change it back to original length? Quote Ultimately, I am looking to make several already drawn spline leaders the same length. On 8/28/2025 at 12:45 PM, 1958 said: ml.LSP 1.41 kB · 7 downloads Still looking to decipher this one, probably tomorrow when I get back to work. Quote
BIGAL Posted 5 hours ago Posted 5 hours ago As I suggested can move the vertices and return the new length or say draw something and move say the first point keep repeating till it is the length you want. Will have a play. Quote
Tsuky Posted 3 hours ago Posted 3 hours ago @SLW210 Quote I saw the Dogleglength when I did a dump on a Mleader. I'll see what I come up with. You are rigth this is the good direction for your ask. Try this (defun c:length2lead ( / AcDoc Space ss dog_l n sel obj) (setq AcDoc (vla-get-ActiveDocument (vlax-get-acad-object)) Space (if (= 1 (getvar "CVPORT")) (vla-get-PaperSpace AcDoc) (vla-get-ModelSpace AcDoc) ) ) (vla-startundomark AcDoc) (princ "\nSelect mleader") (while (not (setq ss (ssget (list '(0 . "MULTILEADER") (cons 67 (if (eq (getvar "CVPORT") 1) 1 0)) (cons 410 (if (eq (getvar "CVPORT") 1) (getvar "CTAB") "Model")) ) ) ) ) ) (initget 7) (setq dog_l (getdist (getvar "VIEWCTR") "nNew length for multileader?: ")) (repeat (setq n (sslength ss)) (setq sel (ssname ss (setq n (1- n))) obj (vlax-ename->vla-object sel) ) (vla-put-DoglegLength obj dog_l) (vla-regen AcDoc acactiveviewport) ) (vla-endundomark AcDoc) (prin1) ) 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.