Results 1 to 1 of 1

Thread: Weld symbol lisp _ need help

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2009-12
    Location
    Mobile Alabama
    Posts
    1
    Login to Give a bone
    0

    Default Weld symbol lisp _ need help

    Here is a weld symbol lisp my company uses. It places several different types of weld symbols by using blocks (WW1 thru WW85 (30 total blocks)) from our blocks library to construct the symbol. These blocks include attributed text for weld size and other notation used in the symbol. The text is set-up per our company standard (3/32" height .9 width).

    My question is: How do I put in a function at the start or end of this lisp to ask: (S) 3/32" or (L) 1/8". I need a function to scale the entire weld symbol up 1.3333 times to make text size 1/8". Currently, all drafters are placing symbol and then scaling it up to make text 1/8". I thought I could add this function to the lisp? default placement would be as created w/3/32" text.

    Any help appreciated.

    Code:
    (defun C:N-WELDS (X)
      (setvar "cmdecho" 0)
      (setq DIM (getvar "DIMSCALE"))
      (setq STAG_ NIL)
      (setq XX X)
      (cond ((= XX "WWLD1") (WWLD1))
            ((= XX "WWLD2") (WWLD2))
            ((= XX "WWLD3") (WWLD3))
            ((= XX "WWLD5") (WWLD5))
            ((= XX "WWLD6") (WWLD6))
            ((= XX "WWLD7") (WWLD7))
      ) ;_ cond
    ) ;_ defun
    
       ;FILLET
    
    (defun WWLD1 ()
      (WWLD_SIZE "WW1" "WW2")
      (princ)
    ) ;_ defun
    
       ;WELD 2
    (defun WWLD2 ()
      (WWLD_SIZE "WW10" "WW20")
      (princ)
    ) ;_ defun
    
    
       ;WELD 3
    (defun WWLD3 ()
      (WWLD_SIZE "WW30" "WW40")
      (princ)
    ) ;_ defun
    
       ;WELD 5
    (defun WWLD5 ()
      (setq STAG_ 't)
      (WWLD_SIZE "WW50" "WW60")
      (setq STAG_ NIL)
      (princ)
    ) ;_ defun
    
       ;WELD 6
    (defun WWLD6 ()
      (WWLD_SIZE "WW75" "WW85")
      (princ)
    ) ;_ defun
    
       ;WELD 7
    (defun WWLD7 ()
      (WWLD_SIZE "WW70" "WW80")
      (princ)
    ) ;_ defun
    
    (defun INI_WWLD ()
      (setq ATTDIA (getvar "ATTDIA"))
      (setq ATTREQ (getvar "ATTREQ"))
      (setvar "cmdecho" 0)
      (setq CLAYER (getvar "clayer"))
        ;;(command "layer" "s" "s-anno-dims" "")
      (command "ortho" "off")
      (setq PNT1 (getpoint "\nWhere to Weld...? "))
      (setq PNT2 (getpoint PNT1 "\nSecond Point...  "))
      (command "ortho" "on")
      (setq PNT3 (getpoint PNT2 "\nThird Point...  "))
      (setq A (angle PNT1 PNT2))
      (setq A (+ (/ (* 180.0 A) pi) 180.0))
      (setq A2 (angle PNT2 PNT3))
      (setq A1 (/ (* 180.0 A2) pi))
      (setq J1 (getvar "dimscale"))
      (setq FF (* 0.125 J1))
      (setq PNT4 (polar PNT2 A2 J1))
      (RK_WWLD)
    ) ;_ defun
    
    (defun RK_WWLD ()
      (setq PNT2A (polar PNT2 A2 (/ 0.0625 2.0)))
      (setq PNT2B (polar PNT2 A2 0.0625))
      (command "leader" PNT1 PNT2 PNT2A PNT2B "" "" "" "x" "") ;rk 04/27/11
      (entdel (entlast)) ;rk 04/27/11
      (command "line" PNT2 PNT4 "")
      (setq A1 (angle PNT2 PNT3))
      (setq A1 (/ (* 180.0 A1) pi))
    ) ;_ defun
    
    (defun ATTTOG (TOG)
      (if TOG
        (progn
          (setvar "attreq" 1)
          (setvar "attdia" 0)
        ) ;progn
        (progn
          (setvar "attreq" ATTREQ)
          (setvar "attdia" ATTDIA)
        ) ;progn
      ) ;if
    ) ;_ defun
    
    (defun WWLD_SIZE (WWLD:SIZE:1 WWLD:SIZE:2)
      (INI_WWLD)
      (setq WSIZE (getstring "\nWeld Size...? "))
    
      (if STAG_
        (setq STAG (getstring "\nStagger Space...? "))
      ) ;_ if
    
      (setq WW1 WWLD:SIZE:1)
      (setq WW2 WWLD:SIZE:2)
    
      (setq S1 (getstring "\n(S)hop weld ... or <Field weld>  "))
      (setq S1 (strcase S1))
      (if (= S1 "S")
        (progn
          (setq WW1 (strcat WW1 "a"))
          (setq WW2 (strcat WW2 "a"))
        ) ;_ progn
      ) ;_ if
      (if (>= A1 0.0)
        (setq INSERT WW1)
      ) ;_ if
      (if (> A1 90.0)
        (setq INSERT WW2)
      ) ;_ if
      (if (> A1 270.0)
        (setq INSERT WW1)
      ) ;_ if
      (ATTTOG 't)
      (if STAG_
        (command "insert" INSERT PNT2 J1 J1 A1 WSIZE STAG)
        (command "insert" INSERT PNT2 J1 J1 A1 WSIZE)
      ) ;if
      (ATTTOG NIL)
      (WWLD_WAA)
    ) ;_ defun
    
    (defun WWLD_WAA ()
      (setq S2 (getstring "\nWeld All Around (Y) or <N>  "))
      (setq S2 (strcase S2))
      (if (= S2 "Y")
        (progn (setq J2 (/ J1 8)) (command "circle" PNT2 "d" J2)) ;_ progn
      ) ;_ if
      (WWLD_TAIL)
    ) ;_ defun
    
    
    (defun WWLD_TAIL ()
      (setq W-TAIL1 "w-tail1")
      (setq W-TAIL1A "w-tail1a")
      (setq S3 (getstring "\nTYP? (Y) or <N>  "))
      (setq S3 (strcase S3))
      (if (= S3 "Y")
        (progn (if (>= A1 0.0)
                 (setq WT W-TAIL1)
               ) ;_ if
               (if (> A1 90.0)
                 (setq WT W-TAIL1A)
               ) ;_ if
               (if (> A1 270.0)
                 (setq WT W-TAIL1)
               ) ;_ if
               (ATTTOG 't)
               (command "insert" WT PNT4 J1 J1 A1 "TYP")
               (ATTTOG NIL)
        ) ;_ progn
      ) ;_ if
      ;;(setq S3 (getstring "\nOTHER TAIL TAG? (Y) or <N>  "))
      (setq S3 (strcase S3))
      (if (= S3 "Y")
        (progn ;;(setq TAG (getstring "\nWHAT IS IT?......." t))
               (if (>= A1 0.0)
                 (setq WT W-TAIL1)
               ) ;_ if
               (if (> A1 90.0)
                 (setq WT W-TAIL1A)
               ) ;_ if
               (if (> A1 270.0)
                 (setq WT W-TAIL1)
               ) ;_ if
               (ATTTOG 't)
               (command "insert" WT PNT4 J1 J1 A1 TAG)
        ) ;_ progn
        (ATTTOG NIL)
      ) ;_ if
    ) ;_ defun
    
    (defun C:LDWE () (load "n-welds") (princ))
    
    (defun C:WL ()
      (initget "1 2 3 5 6 7")
      (setq WLN (getkword "\n[ 1 2 3 5 6 7 ]: "))
      (setq WLDCMD (strcat "(wwld" WLN ")"))
      (eval (read WLDCMD))
    ) ;_ defun
    
    (PRINC)
    Last edited by kdiamond.238264; 2019-01-22 at 09:51 PM. Reason: added more description of needs

Similar Threads

  1. Looking for weld symbol lisp
    By Borgster in forum AutoLISP
    Replies: 3
    Last Post: 2013-11-11, 05:55 PM
  2. New Weld Symbol
    By djn in forum Revit Structure - Families
    Replies: 13
    Last Post: 2013-04-16, 09:56 PM
  3. Weld symbol gap
    By matt__w in forum Revit Structure - General
    Replies: 1
    Last Post: 2010-07-26, 02:02 PM
  4. Help with weld symbol
    By REVIT_MONKEY in forum Revit Structure - Families
    Replies: 4
    Last Post: 2010-05-06, 09:49 PM
  5. Weld Symbol - Bottom Contour Symbol
    By kcooper.190440 in forum Revit Structure - Families
    Replies: 4
    Last Post: 2008-10-07, 07:21 PM

Posting Permissions

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