Author Topic: Anyone know of any Doubleline/Multiline LISP?  (Read 11933 times)

0 Members and 1 Guest are viewing this topic.

StykFacE

  • Guest
Anyone know of any Doubleline/Multiline LISP?
« on: August 14, 2007, 04:46:10 PM »
Looking for some freebie LISP files that anyone has that do anything related to double line or multiline (not necessarily the command multiline, just a multiline feature). I'm wanting to look over some code for an upcoming project i'll be giving myself.... I'm in the commercial HVAC industry, and I have a nice double line LISP I picked up from someone for radius elbows and 90s ductwork, and it works for any type of piping, but I'm looking to do something with square/vained elbows and 90s ductwork.

I've created a few good LISP programs for myself already, but I'm no pro, so I tend to disect other's coding to accomplish my own programs. Had lots of help from the cadtutor.net guys as well for my own LISP programs i've made..... Thanks in advance for all who lend a helping *.LSP file for my redneck engineered AutoCAD program charities.... lol

- Tannar

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #1 on: August 14, 2007, 04:50:52 PM »
This may help.  It is a routine to draw a polyline arrow, with the width supplied by the user.  The newest version is on the last page.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

StykFacE

  • Guest
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #2 on: August 14, 2007, 05:50:13 PM »
Thanks for the contribution willey-chrome. that'll help a lot....  :wink:

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #3 on: August 15, 2007, 07:47:58 AM »
Let me zip up  :-o my HVAC stuff for you to beat on.  I don't do HVAC but It as a learning experiance.

BRB
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #4 on: August 15, 2007, 07:50:43 AM »
Try some of these.  Let me know what you think. As I said I don't do HVAC so I would like toknow how they work and how accurate they are.  If there is something I missed by al means let me know so that it can be added or changed.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

qjchen

  • Bull Frog
  • Posts: 285
  • Best wishes to all
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #5 on: August 15, 2007, 08:35:31 AM »
I have ever write a code like T.Willey's code, Function to draw changed-width double line, Certainly it is not as good as Willey's, but I hope it has a little  helpful to you:)

it is at here
http://www.xdcad.net/forum/showthread.php?s=&postid=2898151#post2898151

as follow
Code: [Select]
;;;=============================================
;;;Most of the following codes are writen by   ;
;;; CHEN QING JUN                              ;
;;; Civil engineering Department,              ;
;;; South China University of Technology       ;
;;; http://autolisper.googlepages.com          ;
;;; http://qjchen.googlepages.com              ;
;;; Purpose:Draw different width double line   ;
;;; 2006.07.02                                 ;
;;; Version:0.1                                ;
;;; ============================================

;;;Main function
(defun c:test (/ p1 plist w1 w1a w2 w2a w1lst w2lst anglist seglist
seg1list seg2list)
 (setq w1 2
w1a 10
w2 8
w2a 15
  )
  (setq w1lst (makew w1 w1a 100))
  (setq w2lst (makew w2 w2a 100))
  (setq plist (getpointlst w1lst w2lst))
  (setq anglist (mapcar
  '(lambda (x y)
     (angle x y)
   )
  (1ton_1 plist)
  (cdr plist)
)
  )
  (setq seglist (mapcar
  '(lambda (x y)
     (cons x (list y))
   )
  (1ton_1 plist)
  (cdr plist)
)
  )
  (setq w1lst (makew w1 w1a (length seglist)))
  (setq w2lst (makew w2 w2a (length seglist)))
  (setq seg1list (segxlist seglist anglist 1 w1lst))
  (setq seg2list (segxlist seglist anglist (- 1) w2lst))
  (setq seg1list (intlst seg1list))
  (setq seg2list (intlst seg2list))
  (entmakepolyline seg1list)
  (entmakepolyline seg2list)
)
;;;getpointlist
(defun getpointlst (w1lst w2lst / plist p1 p i)
  (setq p1 (getpoint))
  (setq plist (append
plist
(list p1)
      )
  )
  (setq i 0)
  (while (setq p (getpoint p1))
    (grdraw p1 p 9)
    (tempgrdraw p1 p i w1lst w2lst)
    (setq plist (append
  plist
  (list p)
)
    )
    (setq p1 p)
    (setq i (1+ i))
  )
  plist
)
;;;tempdraw
(defun tempgrdraw (p1 p2 n lst1 lst2 / ang)
  (setq ang (angle p1 p2))
  (grdraw (polar p1 (+ ang (* pi 0.5)) (1- (nth (* n 2) lst1)))
  (polar p2 (+ ang (* pi 0.5)) (1- (nth (1+ (* n 2)) lst1))) 251
  )
  (grdraw (polar p1 (+ ang (* pi 1.5)) (1- (nth (* n 2) lst2)))
          (polar p2 (+ ang (* pi 1.5)) (1- (nth (1+ (* n 2)) lst2))) 251
  )
)

;; get the 1 to (n-1) element of a list
(defun 1ton_1 (lst)
  (reverse (cdr (reverse lst)))
)
;;;to get the offset segment of two side line
(defun segxlist (lst lst1 direction wlst / i res xa xb x1a x1b)
  (setq i 0)
  (if (= direction 1)
    (setq ang (* pi 0.5))
    (setq ang (* pi 1.5))
  )
  (foreach x lst
    (setq xa (car x)
  xb (cadr x)
    )
    (setq x1a (polar xa (+ ang (nth i lst1)) (nth (* i 2) wlst)))
    (setq x1b (polar xb (+ ang (nth i lst1)) (nth (1+ (* i 2)) wlst)))
    (setq res (append
res
(list x1a x1b)
      )
    )
    (setq i (1+ i))
  )
  res
)
;;;;find the inter intersections of a list of points
(defun intlst (lst / i res p1 p2 p3 p4)
  (setq i 0)
  (setq res (list (car lst)))
  (repeat (- (/ (length lst) 2) 1)
    (setq p1 (nth i lst))
    (setq i (1+ i))
    (setq p2 (nth i lst))
    (setq i (1+ i))
    (setq p3 (nth i lst))
    (setq p4 (nth (1+ i) lst))
    (setq res (append
res
(list (inter p1 p2 p3 p4))
      )
    )
  )
  (setq res (append
      res
      (list (last lst))
    )
  )
  res
)
(defun inter (a b c d / res)
  (if (equal b c)
    b
    (inters
      a
      b
      c
      d
      nil
    )
  )
)
;;;function of entmake lwpolyline,by ElpanovEvgeniy at
;www.theswamp.org
(defun entmakepolyline (lst)
  (entmakex (append
      (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 .

"AcDbPolyline")
    (cons 90 (length lst)) '(70 . 0) ;;;1 is closed
      ) ;_  list
      (mapcar '(lambda (x)
   (cons 10 x)
)
lst
      )
    ) ;_  append
  )
)
;;;;make width list
(defun makew (w1 w2 n / res i)
  (setq i 1)
  (repeat n
    (if (odd i)
      (setq res (append
  res
  (list w1 w2)
)
      )
      (setq res (append
  res
  (list w2 w1)
)
      )
    )
    (setq i (1+ i))
  )
  res
)
;;;judge whether a number is an odd number
(defun odd (x)
  (/= (/ x 2) (* 0.5 x))
)
http://qjchen.mjtd.com
My blog http://chenqj.blogspot.com (Chinese, can be translate into English)

StykFacE

  • Guest
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #6 on: August 15, 2007, 09:02:58 AM »
Try some of these.  Let me know what you think. As I said I don't do HVAC so I would like toknow how they work and how accurate they are.  If there is something I missed by al means let me know so that it can be added or changed.


some of that stuff is non-usable in a commercial environment, but then again some of those HVAC Lisp files are freakin' awesome... like the FLEX feature... I think I might have to just add that into my everyday routine.

yuanqiu, thanks for the contribution as well....

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #7 on: August 15, 2007, 09:40:20 AM »
The flexduct lisp is one of my favs.  I looked everywhere and couldn't find anything close.  I found a linetype that worked nice with pline but it had its draw backs.  This one seems to work pretty nice.

Thanks

Which ones aren't for commercial.  (I'm HVAC illiterate, although my father-in-law works for Trane  :roll: )
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Maverick®

  • Seagull
  • Posts: 14778
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #8 on: August 15, 2007, 09:51:16 AM »
(I'm HVAC illiterate, although my father-in-law works for Trane  :roll: )

OT.  We have built a lot of houses for Trane employees.  Trane's headquarters is here in the city I'm in.



But I'm HVAC illiterate too.  Among other things...   :-D

LE

  • Guest
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #9 on: August 15, 2007, 10:28:39 AM »
look at autowalls command here - can be an alternative - but it is a fas file:

http://www.theswamp.org/index.php?topic=7180.msg88472#msg88472

the program was made to generate walls from a selection of lines.

a preview:

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #10 on: August 15, 2007, 10:33:09 AM »
Here is a wall lisp someone in here helped with it (sorry I don't remember who)
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

StykFacE

  • Guest
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #11 on: August 15, 2007, 10:39:16 AM »
Which ones aren't for commercial.  (I'm HVAC illiterate, although my father-in-law works for Trane  :roll: )

What I mean by that is basically for efficiency. For Example, the Lisp that makes the supply diffuser is a nice one, but it takes 5 questions to get you to ONE GRILLE. that's best to have in a library of blocks, or Tool Palettes for easy access/inserting, especially with Layer Control, and multiple points for snap guides. Of course, this is the best bet for vanilla CAD, not for the nice programs such as AutoDesk MEP or Revit. :wink:

but i've never seen a flex Lisp out there quite like that one, it's extremely nice.

LE, Thanks for the contribution as well.  :kewl:

GDF

  • Water Moccasin
  • Posts: 2081
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #12 on: August 15, 2007, 10:44:07 AM »
AutoCAD's dline.lsp routine.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #13 on: August 15, 2007, 12:39:52 PM »

What I mean by that is basically for efficiency. For Example, the Lisp that makes the supply diffuser is a nice one, but it takes 5 questions to get you to ONE GRILLE. that's best to have in a library of blocks, or Tool Palettes for easy access/inserting, especially with Layer Control, and multiple points for snap guides.

I totally agree with that, Once I got started I just couldn't stop  :ugly: . I am going to eventally add some dialog interface to them which will make programs like the diffusers much easier to use, not to mention quicker.  Some of these will aslo be added to a pull down to make them quicker with less questioning.

Did you see any thing that may have been missing from the suite?  Is there something that I need to add / tweak?

Any input I can get would be great.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

StykFacE

  • Guest
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #14 on: August 15, 2007, 01:51:38 PM »
Did you see any thing that may have been missing from the suite?  Is there something that I need to add / tweak?

Any input I can get would be great.


The suite is great. If you want some input from someone in the industry, then add a few more items to the list, such as:

- Smoke/Motor Sensor
- Fire Damper
- Fire & Smoke Damper
- Sidewall Grill
- Square-to-round Transition (<---- this one would be a popular one)
- Thermostat

Those would be easy to code, plus they are a huge portion of HVAC design. Hope this helps  :wink:
« Last Edit: August 15, 2007, 01:52:47 PM by StykFacE »

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #15 on: August 15, 2007, 02:11:39 PM »

- Smoke/Motor Sensor  Do you have an example ?
- Fire Damper This should be in CreateDamper.lsp ?
- Fire & Smoke Damper  Do you have an example ?
- Sidewall Grill  I actually have this partly coded just haven't finished it yet
- Square-to-round Transition (<---- this one would be a popular one)  This is in CreateTransition.lsp
- Thermostat  Is this normally a block?  I have a block for it but I could easily create a routine for this

Those would be easy to code, plus they are a huge portion of HVAC design. Hope this helps  :wink:

 Some of the other things that I have in the works

Baseboard heater
Duct access panel
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

StykFacE

  • Guest
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #16 on: August 15, 2007, 02:31:44 PM »
Here's a few for ya...

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Anyone know of any Doubleline/Multiline LISP?
« Reply #17 on: August 18, 2007, 02:05:31 PM »
Here is a wall lisp someone in here helped with it (sorry I don't remember who)
oohhhh I like :lol:
That is a keeper.
Nice wall clean up and bonus points on layer control.

Sweet.
Thanks Tim
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans