SIJU Posted October 7, 2020 Posted October 7, 2020 On 9/3/2019 at 11:25 AM, tombu said: ;|======================================================= Draw Line with Breakline Symbol to Dimscale Updated 6/2018 Replacement for BREAKLINE (Express Tool) that works in any direction and scales to Annotation Scale. BrkLnSym Breaks lines and inserts break-line symbol ^C^C^P(or C:BrkLnSym (load "BrkLnSym.lsp"));BrkLnSym Brkline5k-oie.png (load "BrkLnSym.lsp") BrkLnSym ; =======================================================|; (defun c:BrkLnSym (/ *error* p1 p2 p3 p4 p5) (setq vars (mapcar '(lambda (x) (cons x (getvar x))) '("osmode" "nomutt"))) (defun *error* (msg) ;; Reset variables (mapcar '(lambda (x) (setvar (car x) (cdr x))) vars) (grtext -1 "") ;CLEAR STATUS LINE (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")) (princ (strcat "\nError: " msg)) (princ) ) ) (setvar 'osmode 512) (cond ((= 1 (getvar "cvport"))(setq InsScale 0.1)) ((= 1 (getvar "TILEMODE"))(setq InsScale (/ 0.1 (getvar 'cannoscalevalue)))) (T(setq InsScale (caddr (trans '(0 0 0.1) 3 2)))) ) (setq p3 (getpoint "\nBreak Point: ") ss (ssget p3) obj (vlax-ename->vla-object (ssname ss 0)) ang (angle '(0. 0. 0.) (vlax-curve-getFirstDeriv obj (vlax-curve-getParamAtPoint obj p3))) p1 (polar p3 ang InsScale) p2 (polar p3 (+ (/ pi 3) ang) InsScale) p4 (polar p3 (+ (/ pi 3) (- ang pi)) InsScale) p5 (polar p3 (- ang pi) InsScale) ) (setvar "nomutt" 1) (command "_break" ss p1 p5 "pline" p1 p2 p3 p4 p5 "") (entupd (ssname ss 0)) (mapcar '(lambda (x) (setvar (car x) (cdr x))) vars) (princ) ) Should get you started, scaled to current Annotation Scale at picked point. Icon with transparent background attached. Expand Quote
SLW210 Posted October 7, 2020 Posted October 7, 2020 Did you have a question? All you posted was just a quoted post. 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.