제가 쓰는 선 길이 구하는 리습입니다. 단위는 m단위이며
LL 입력후 구하고자하는 선을 클릭하면 길이가 구해집니다.
다만, 글자 크기가 뒤죽박죽입니다.
어느때엔 잘보이고, 어느때엔 너무 작고
글자 크기를 고정할수있을까요?
(defun c:LL ( / *error* _iscurveobject e )
(vl-load-com)
(defun *error* ( msg )
(or (wcmatch (strcase msg) “*BREAK,*CANCEL*,*EXIT*”)
(princ (strcat “n** Error: ” msg ” **”)))
(princ)
)
(defun _IsCurveObject ( entity / param )
(and
(not
(vl-catch-all-error-p
(setq param
(vl-catch-all-apply ‘vlax-curve-getendparam (list entity))
)
)
)
param
)
)
(if (= 4 (logand 4 (cdr (assoc 70 (tblsearch “LAYER” (getvar ‘CLAYER))))))
(princ “n–> Current Layer Locked.”)
(while
(progn (setvar ‘ERRNO 0) (setq e (car (entsel)))
(cond
(
(= 7 (getvar ‘ERRNO))
(princ “n–> Missed, Try again.”)
)
(
(eq ‘ENAME (type e))
(if (_iscurveobject e)
(LM:IntersectionLengths e)
(princ “n–> Invalid Object Selected.”)
)
t
)
)
)
)
)
(princ)
)
https://blog.naver.com/warfire114/222661080856
선, 폴리선, 원, 호 등 길이 합계 출력 ‘LNGT’ 명령어입니다 ^^