See the top rated post in this thread. Click here

Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Cut Line with Tilde Symbol

  1. #11
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,100
    Login to Give a bone
    1

    Default Re: Cut Line with Tilde Symbol

    Thanks for posting a link to the original discussion. That could have been helpful in this thread, however, the issues remain regarding the running osnaps.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  2. #12
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,665
    Login to Give a bone
    2

    Default Re: Cut Line with Tilde Symbol

    Modified version any direction curves or lines with Tilde scaled to Current Annotation Scale:
    Code:
    ; http://forums.augi.com/showthread.php?171905-Line-Cut-with-Symbol-(Tilde)&p=1336016#post1336016
    ;^C^C^P(or C:tildebreak (load "tildebreak.lsp"));tildebreak
    ;(load "tildebreak.lsp") tildebreak ;
    (defun c:tildebreak (/ vars *error* p1 p2 InsScale ss obj)
      (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)
      (setq p1(getpoint "\nFirst breakpoint: ")
            p2 (getpoint "\nSecond breakpoint: ")
            ss (ssget p1)
            obj (vlax-ename->vla-object (ssname ss 0))
            ang1 (/(*(angle '(0. 0. 0.) (vlax-curve-getFirstDeriv obj (vlax-curve-getParamAtPoint obj p1)))180)pi)
            ang2 (- ang1 180)
      )
      (cond
    	((= 1 (getvar "cvport"))(setq InsScale 1.0))
    	((= 1 (getvar "TILEMODE"))(setq InsScale (/ 1 (getvar 'cannoscalevalue))))
    	(T(setq InsScale (caddr (trans '(0 0 1) 3 2))))
      )
      (setvar "nomutt" 1)
      (command "_break" ss p1 p2 "_-insert" "Tilde" p1 InsScale ang1 "_-insert" "Tilde" p2 InsScale ang2 "_regen")
      (entupd (ssname ss 0))
      (mapcar '(lambda (x) (setvar (car x) (cdr x))) vars)
      (princ)
    )
    Last edited by Tom Beauford; 2018-06-05 at 12:37 PM. Reason: Cleaned up.

  3. #13
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,665
    Login to Give a bone
    2

    Default Re: Cut Line with Tilde Symbol

    Another option:
    Code:
    ;=======================================================
    ;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.
    ;^C^C^P(or C:br (load "br.lsp"));br
    ; (load "br.lsp") br ;
    ;=======================================================
    (defun c:br (/ *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)
    )
    Last edited by Tom Beauford; 2018-06-05 at 12:38 PM. Reason: Localized the variables, cleaned it up & reset osmode system variable. Thanks Opie, kinda threw that up too quickly.

  4. #14
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,100
    Login to Give a bone
    1

    Default Re: Cut Line with Tilde Symbol

    Tom,

    Are you going to localize your variables to the c:br routine? Looks like you initially did that, but made them global for testing purposes.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Page 2 of 2 FirstFirst 12

Similar Threads

  1. 2013: Text within line (symbol line), opaque background not printing
    By tace86152814 in forum Revit Architecture - Families
    Replies: 4
    Last Post: 2013-09-17, 05:33 AM
  2. I wish I could create custom line patterns with symbol/letters in the line pattern.
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 2
    Last Post: 2010-11-13, 12:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •