GLORY Posted February 27, 2021 Share Posted February 27, 2021 Hello, I need help regarding to change the linetype scale of every line on a certain layer based on its individual length. Thank you. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 28, 2021 Share Posted February 28, 2021 Something like this. You will need to edit the values. (defun c:ltsc ( / lay ss obj x len) (setq lay (cdr (assoc 8 (entget (car (entsel "\pick line for layer")))))) (setq ss (ssget '((0 . "LINE")(cons 8 lay)))) (repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1))))) (setq len (vla-get-length obj)) (cond ((and (> len 0.0001)(<= len 100.0)) (vla-put-LinetypeScale obj 0.9)) ((and (> len 100.001)(<= len 200.0)) (vla-put-LinetypeScale obj 1.9)) ((and (> len 200.0001)(<= len 300.0)) (vla-put-LinetypeScale obj 2.9)) ((and (> len 300.0001)(<= len 400.0)) (vla-put-LinetypeScale obj 3.9)) ((and (> len 400.0001)(<= len 500.0)) (vla-put-LinetypeScale obj 4.9)) ) ) (princ) ) 1 Quote Link to comment Share on other sites More sharing options...
GLORY Posted March 26, 2021 Author Share Posted March 26, 2021 thank you BIGAL for your time. Quote Link to comment Share on other sites More sharing options...
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.