• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    *Nienberg, Mark

    GLUE lisp routine

    250 Views, 9 Replies
    11-13-2000 04:20 PM
    There was a lisp routine named GLUE.lsp that came with SoftDesk 8 that we
    used to use all the time. In fact, the routine is still installed as part
    of the "Details" install under Architectural Desktop 2. Unfortunately, it
    doesn't work anymore. It goes into an endless initialization loop when
    started.

    Is there an alternative to this or a way to fix it? We use it primarily to
    convert multiple line segments into a single line, but it used to work with
    text, arcs, etc. Thanks,

    Mark Nienberg
    Please use plain text.
    *Tovar, Rudy

    Re: GLUE lisp routine

    11-13-2000 04:46 PM in reply to: *Nienberg, Mark
    I believe that was a clean up lines utility.

    I don't have it but you could wait for another reply.

    --
    rudy@cadentity.com
    Practical Utilities for Productive Solutions

    Mark Nienberg wrote in message
    news:smileyvery-happy:2CF06ACE8C45D9EC65E534BB3DB3AE0@in.WebX.SaUCah8kaAW...
    > There was a lisp routine named GLUE.lsp that came with SoftDesk 8 that we
    > used to use all the time. In fact, the routine is still installed as part
    > of the "Details" install under Architectural Desktop 2. Unfortunately, it
    > doesn't work anymore. It goes into an endless initialization loop when
    > started.
    >
    > Is there an alternative to this or a way to fix it? We use it primarily
    to
    > convert multiple line segments into a single line, but it used to work
    with
    > text, arcs, etc. Thanks,
    >
    > Mark Nienberg
    >
    Please use plain text.
    *Chico_Don

    Re: GLUE lisp routine

    11-13-2000 06:27 PM in reply to: *Nienberg, Mark
    What does it do?

    Don

    "Mark Nienberg" wrote in message
    news:smileyvery-happy:2CF06ACE8C45D9EC65E534BB3DB3AE0@in.WebX.SaUCah8kaAW...
    > There was a lisp routine named GLUE.lsp that came with SoftDesk 8 that we
    > used to use all the time. In fact, the routine is still installed as part
    > of the "Details" install under Architectural Desktop 2. Unfortunately, it
    > doesn't work anymore. It goes into an endless initialization loop when
    > started.
    >
    > Is there an alternative to this or a way to fix it? We use it primarily
    to
    > convert multiple line segments into a single line, but it used to work
    with
    > text, arcs, etc. Thanks,
    >
    > Mark Nienberg
    >
    Please use plain text.
    *IBM

    Re: GLUE lisp routine

    11-13-2000 06:53 PM in reply to: *Nienberg, Mark
    is this is what you are talking about (old as dirt)

    ;GLUE.LSP
    ;
    ;Draws a single line between the two most-distant points of two
    ;user-selected lines. Erases the two user-selected lines. Assigns
    ;to the new line the same properties of Layer, Color, Linetype, and
    ;Thickness as those of the first user-selected line.
    ;
    ;For AutoCAD Release 10
    ;
    ;Written 02/19/1989 Brad Zehring Autodesk, Inc. Training Department
    ;
    (defun C:GLUE (/ l1 l2 e1 e2 dl ml temp p pt1 pt2
    old_flatland old_cmdecho)
    (setq old_flatland (getvar "flatland"))
    (setq old_cmdecho (getvar "cmdecho"))
    (setvar "flatland" 0)
    (setvar "cmdecho" 0)
    (setq l1 (entsel "\nSelect first line: "))
    (if l1 (redraw (car l1) 3))
    (setq l2 (entsel "\nSelect second line: "))
    (if l2 (redraw (car l2) 3))
    (if
    (or (eq l1 nil) (eq l2 nil))
    (prompt "\nRequires two lines. *Invalid*")
    (progn
    (if
    (not
    (and
    (eq "LINE" (cdr (assoc 0 (setq e1 (entget (car l1))))))
    (eq "LINE" (cdr (assoc 0 (setq e2 (entget (car l2))))))
    )
    )
    (prompt "\nRequires two lines. *Invalid*")
    (progn
    (setq dl nil)
    (setq dl
    (cons
    (list (distance (cdr (assoc 10 e1)) (cdr (assoc 10 e2))) 11)
    dl
    )
    )
    (setq dl
    (cons
    (list (distance (cdr (assoc 10 e1)) (cdr (assoc 11 e2))) 12)
    dl
    )
    )
    (setq dl
    (cons
    (list (distance (cdr (assoc 11 e1)) (cdr (assoc 10 e2))) 21)
    dl
    )
    )
    (setq dl
    (cons
    (list (distance (cdr (assoc 11 e1)) (cdr (assoc 11 e2))) 22)
    dl
    )
    )
    (setq ml nil temp dl)
    (repeat 4
    (setq ml (cons (car (car temp)) ml))
    (setq temp (cdr temp))
    )
    (setq p (car (cdr (assoc (eval (cons 'MAX ml)) dl))))
    (cond
    ((= p 11)
    (setq pt1 (cdr (assoc 10 e1)))
    (setq pt2 (cdr (assoc 10 e2)))
    )
    ((= p 12)
    (setq pt1 (cdr (assoc 10 e1)))
    (setq pt2 (cdr (assoc 11 e2)))
    )
    ((= p 21)
    (setq pt1 (cdr (assoc 11 e1)))
    (setq pt2 (cdr (assoc 10 e2)))
    )
    ((= p 22)
    (setq pt1 (cdr (assoc 11 e1)))
    (setq pt2 (cdr (assoc 11 e2)))
    )
    (t)
    )
    (command ".line" pt1 pt2 "")
    (command ".chprop" (entlast) ""
    "LA" (cdr (assoc 8 e1))
    "C" (if
    (null (cdr (assoc 62 e1)))
    ""
    (cdr (assoc 62 e1))
    )
    "LT" (if
    (null (cdr (assoc 6 e1)))
    ""
    (cdr (assoc 6 e1))
    )
    "T" (if
    (null (cdr (assoc 39 e1)))
    ""
    (cdr (assoc 39 e1))
    )
    ""
    )
    (command ".erase" l1 l2 "")
    (redraw (entlast) 1)
    )
    )
    )
    )
    (setvar "flatland" old_flatland)
    (setvar "cmdecho" old_cmdecho)
    (prin1)
    )

    "Mark Nienberg" wrote in message
    news:smileyvery-happy:2CF06ACE8C45D9EC65E534BB3DB3AE0@in.WebX.SaUCah8kaAW...
    > There was a lisp routine named GLUE.lsp that came with SoftDesk 8 that we
    > used to use all the time. In fact, the routine is still installed as part
    > of the "Details" install under Architectural Desktop 2. Unfortunately, it
    > doesn't work anymore. It goes into an endless initialization loop when
    > started.
    >
    > Is there an alternative to this or a way to fix it? We use it primarily
    to
    > convert multiple line segments into a single line, but it used to work
    with
    > text, arcs, etc. Thanks,
    >
    > Mark Nienberg
    >
    Please use plain text.
    *Ng, Peter

    Re: GLUE lisp routine

    11-13-2000 08:52 PM in reply to: *Nienberg, Mark
    Mark,

    Attached is a lisp to 'glue' text together. It doesnt do all in one as your
    old one, but might help you out.

    Peter

    "Mark Nienberg" wrote in message
    news:smileyvery-happy:2CF06ACE8C45D9EC65E534BB3DB3AE0@in.WebX.SaUCah8kaAW...
    > There was a lisp routine named GLUE.lsp that came with SoftDesk 8 that we
    > used to use all the time. In fact, the routine is still installed as part
    > of the "Details" install under Architectural Desktop 2. Unfortunately, it
    > doesn't work anymore. It goes into an endless initialization loop when
    > started.
    >
    > Is there an alternative to this or a way to fix it? We use it primarily
    to
    > convert multiple line segments into a single line, but it used to work
    with
    > text, arcs, etc. Thanks,
    >
    > Mark Nienberg
    >
    Please use plain text.
    *Harper, Chip

    Re: GLUE lisp routine

    11-14-2000 04:13 AM in reply to: *Nienberg, Mark
    Is this what you are looking for?

    ;
    ; This routine joins two lines, two arcs, two 3dfaces, or two text items
    ; together. If arcs are selected, they must share a common center point and
    radius.
    ; For lines there is no such restriction. Two lines of different angles can
    be
    ; joined. The program loops to allow several pairs of objects to be joined.
    ;
    ; When gluing text together, the text value of the second selected text
    ; item is added on to the first. A space is inserted between text items.

    Posted to Customer Files

    "Mark Nienberg" wrote in message
    news:smileyvery-happy:2CF06ACE8C45D9EC65E534BB3DB3AE0@in.WebX.SaUCah8kaAW...
    > There was a lisp routine named GLUE.lsp that came with SoftDesk 8 that we
    > used to use all the time. In fact, the routine is still installed as part
    > of the "Details" install under Architectural Desktop 2. Unfortunately, it
    > doesn't work anymore. It goes into an endless initialization loop when
    > started.
    >
    > Is there an alternative to this or a way to fix it? We use it primarily
    to
    > convert multiple line segments into a single line, but it used to work
    with
    > text, arcs, etc. Thanks,
    >
    > Mark Nienberg
    >
    Please use plain text.
    *Nienberg, Mark

    Re:

    11-15-2000 05:51 PM in reply to: *Nienberg, Mark
    Thats it! Thanks.
    Mark Nienberg

    "Chip Harper" wrote in message
    news:B935D869FE791EFF9A62C498C00BEAA9@in.WebX.SaUCah8kaAW...
    > Is this what you are looking for?
    >
    > ;
    > ; This routine joins two lines, two arcs, two 3dfaces, or two text items
    > ; together. If arcs are selected, they must share a common center point
    and
    > radius.
    > ; For lines there is no such restriction. Two lines of different angles
    can
    > be
    > ; joined. The program loops to allow several pairs of objects to be
    joined.
    > ;
    > ; When gluing text together, the text value of the second selected text
    > ; item is added on to the first. A space is inserted between text items.
    >
    > Posted to Customer Files
    >
    > "Mark Nienberg" wrote in message
    > news:smileyvery-happy:2CF06ACE8C45D9EC65E534BB3DB3AE0@in.WebX.SaUCah8kaAW...
    > > There was a lisp routine named GLUE.lsp that came with SoftDesk 8 that
    we
    > > used to use all the time. In fact, the routine is still installed as
    part
    > > of the "Details" install under Architectural Desktop 2. Unfortunately,
    it
    > > doesn't work anymore. It goes into an endless initialization loop when
    > > started.
    > >
    > > Is there an alternative to this or a way to fix it? We use it primarily
    > to
    > > convert multiple line segments into a single line, but it used to work
    > with
    > > text, arcs, etc. Thanks,
    > >
    > > Mark Nienberg
    > >
    >
    Please use plain text.
    New Member
    Posts: 1
    Registered: ‎01-21-2013

    Re: GLUE lisp routine

    01-21-2013 09:14 AM in reply to: *Nienberg, Mark

    Gentlemen;

     

     

    I’m an old timer (dinosaur) whom used the glue lisp routine.

     

    presently I use AutoCAD lt 2002

     

    I have been reading this blog specifically to try and understand how I may "download" or copy/ paste this routine into my lt 2002 program?

     

    Have you any suggestions?

     

    Thank you in advance.

    don

    Please use plain text.
    Distinguished Contributor
    Posts: 108
    Registered: ‎10-02-2007

    Re: GLUE lisp routine

    01-21-2013 12:32 PM in reply to: *Nienberg, Mark

    try OVERKILL... it does more

    Please use plain text.
    *Pro
    M_Hensley
    Posts: 1,574
    Registered: ‎12-11-2003

    Re: GLUE lisp routine

    01-22-2013 04:06 AM in reply to: dondavisjr

    Unfortunately LT does not allow you to use lisp programs.

    Please use plain text.