connect 3 lines lisp

connect 3 lines lisp

nychoe1
Advocate Advocate
924 Views
4 Replies
Message 1 of 5

connect 3 lines lisp

nychoe1
Advocate
Advocate

thank you guys for help always.

this is one thing I need. 3 line connecting. attached pic file

if possible it will help me a lot

thank you guys

0 Likes
925 Views
4 Replies
Replies (4)
Message 2 of 5

hak_vz
Advisor
Advisor

Please attach a sample drawing to help us solve this without to many quastions.

Presumption is that you have a drawing full of this joint positions and that you want to create them all at once by selecting all line objects within a layer. If you want to create them separately, one at a time, then solution is to create dynamic block. I'm using older version of cad so please provide version 2014 if possible.

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 3 of 5

dlanorh
Advisor
Advisor
0 Likes
Message 4 of 5

nychoe1
Advocate
Advocate

thank you your answer.  but  it's  a bit different than what i want

I found it lsp. i want to fix a little

attached pic file. thank you always

;;; CADALYST 09/08  www.cadalyst.com/CADtips
;;; Duct_Trans.LSP Duct Transition  (c) 2008 Shawn Evjen
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                                                         ;;;
;;; Duct_Trans - Duct transition from one size to another                   ;;;
;;;   draws polyline transition symbol for multiple duct sizes              ;;;
;;;                                                                         ;;;
;;; Copyright Notice:                                                       ;;;
;;;    Copyright (c) 03/2008 Shawn Evjen                                    ;;;
;;;    Routine built on personal time for personal use to expediate tedious ;;;
;;;    task. Revisions to improve code and expand program for specific      ;;;
;;;    requests also completed on personal time.                            ;;;
;;;                                                                         ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun c:Duct_Trans (/ osm scmd pt1 pt2 ang pt1x pt1y p1 p2 p3 p4 p5)
  (setq osm  (getvar "osmode")
 scmd (getvar "cmdecho")
  )
  (setvar "osmode" 1)
  (setvar "cmdecho" 0)
  (graphscr)
  (setq pt1 (getpoint "\nPick first point for duct transition:  "))
  (setvar "lastpoint" pt1)
  (setvar "osmode" 128)
  (setq pt2 (getpoint "\nPick point perpendicular to duct:  "))
  (setq ang (* 180 (/ (angle pt1 pt2) pi)))
  (setq sDist (fix (+ (distance pt1 pt2) 0.1)))
  (setq startWidth
  (getreal (strcat "\nStarting width of transition: <"
     (itoa sDist)
     "> "
    )
  )
  )
  (if (= startWidth nil)
    (setq startWidth sDist)
  )
  (setq endWidth (getreal (strcat "\nStarting width of transition: <"
      (itoa (fix (+ 2 startWidth)))
      "> "
     )
   )
  )
  (if (= endWidth nil)
    (setq endWidth (+ 2 startWidth))
  )
  (setq halfTrans (/ (- endWidth startWidth) 2))
  (setvar "osmode" (+ 16384 osm))
  (setq pt1x (car pt1))
  (setq pt1y (cadr pt1))
  (setq p1 (list pt1x pt1y))
  (setq p2 (list (+ pt1x startWidth) pt1y))
  (setq p3 (list (+ pt1x startWidth halfTrans) (+ pt1y 400)))
  (setq p4 (list (- pt1x halfTrans) (+ pt1y 400)))
  (if (< startWidth endWidth)
    (progn
      (setq p5 (list (+ pt1x (/ startWidth 2.0)) pt1y))
      (command "pline" p4 p1 p2 p3 p5 p4 p3 "")
    )
    (progn
      (setq p5 (list (+ pt1x (/ startWidth 2.0)) (+ pt1y 400)))
      (command "pline" p1 p2 p3 p4 p1 p5 p2 "")
    )
  )
  (command "rotate" (entlast) "" p1 ang)
  (setvar "cmdecho" scmd)
  (setvar "osmode" osm)
  (princ)
)
 
 
0 Likes
Message 5 of 5

devitg
Advisor
Advisor

Please upload your sample.dwg

0 Likes