Author Topic: Top 10 MUST HAVE Lisp Routines...  (Read 29092 times)

0 Members and 1 Guest are viewing this topic.

Big G

  • Bull Frog
  • Posts: 415
Top 10 MUST HAVE Lisp Routines...
« on: May 01, 2007, 09:59:33 PM »
Read a thread recently on Top 10 Firefox Extensions, thought this would be a good one.
I thought i seen the light at the end of the tunnel. But it was just someone with a torch bringing me more work.
"You have to accept that somedays youre the pigeon and  somedays youre the statue"

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #1 on: May 01, 2007, 10:49:42 PM »
Dellayer by Me! I wrote this sometime in the last 15% of the last century (long before Bonus/Express tools) and I still use it most every day.

I quit posting it long ago since ET's is more robust, but I still prefer it for it's simplicity.
« Last Edit: May 01, 2007, 10:51:39 PM by Jeff_M »

LE

  • Guest
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #2 on: May 02, 2007, 12:09:00 AM »
In my Top Ten list the one in the top is DP.LSP - (to read the distance between two parallel lines)

It is a very simple and old lisp, from the early days at cadence or in the Harry's Hot Tips... don't remember.

I use it every day, every time... for at least the past 20 years...

CADaver

  • Guest
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #3 on: May 02, 2007, 12:42:48 AM »
DVP.lsp I posted here a couple of years ago that allows quick DVIEW slices of 3D models.

Strucmad

  • Guest
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #4 on: May 02, 2007, 12:48:48 AM »
I'm fairly new to the lisp thing but dlf.lsp Ive found very handy.
- deleting layer filters -  they really blow file sizes out

Didge

  • Bull Frog
  • Posts: 211
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #5 on: May 02, 2007, 04:59:44 AM »
An interesting thread Big G, after careful consideration my top 10 ranked according to time savings would be:

1. MULTI-SECTION - a terrain & pipework longsection generator. Basically I draw a pipe route on a digital map using a polyline, select it and voila, a series of drawings each showing a plan (aligned to the pipe-route) and a corresponding long section beneath. This little baby can generate a dozen A1 drawings within a minute.  :-)

2. MAP CONVERSION - this one automatically reconstructs missing symbology in digital map data imported from a proprietry GIS system. This one doesn't sound very interesting but it saves many hours of tedious manual editting.

3. TERRAIN MODELLING - this is a combination of numerous 3D ground modelling routines such as TIN creation, breaklines, surface drapes & burrying etc.

4. RESAMPLE OBJECT - this routine effectively traces over existing objects using a user-defined number of vertices. I use this to remove excessive polyline vertices and to convert arcs, circles & ellipses to polylines.

5. REVERSE OBJECT - Does what it says on the tin.

6. BATCH LISP PROCESSING - this little app will allow me to run any lisp routine on a whole folder of drawings, including sub-folders if desired.

7. AUTO MATERIAL ASSIGNMENT - this one allows me to select a pre-dined material (concrete, asphalt etc) from a drop-down list box and then apply these by object, layer or by a bounding polyline.

8. DRAW ORDER BY LAYER

9. COPY OBJECTS TO LAYER

10. ANI-MATE - this is a sweet little animation routine, it's been around for a decade now and looks suspiciously similar to the one introduced in Acad2007.  :|

Think Slow......

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #6 on: May 02, 2007, 09:06:06 AM »
A routine I wrote to apply external Layer States to the current drawing or individual xrefs.  Invaluable if you have company layer standards.  I noticed 2008 (2007?) has "double click editing" in the CUI.  I've had that since 2000i!!   
James Buzbee
Windows 8

ronjonp

  • Needs a day job
  • Posts: 7527
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #7 on: May 02, 2007, 09:16:12 AM »
_layfrz.....I'm kinda lost without that one :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #8 on: May 02, 2007, 09:40:34 AM »
ENDIT.LSP
Quote
Features:
Layer filter deletion
Purge unused items (layers, blocks, linetypes, etc.)
Saves drawing

Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

ronjonp

  • Needs a day job
  • Posts: 7527
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #9 on: May 02, 2007, 10:07:34 AM »
ENDIT.LSP
Quote
Features:
Layer filter deletion
Purge unused items (layers, blocks, linetypes, etc.)
Saves drawing



I use that one daily Keith :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #10 on: May 02, 2007, 10:25:53 AM »
I am glad someone besides me gets some use from it ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #11 on: May 02, 2007, 11:13:13 AM »
My own 'ed'.  Works on attributes and text.  My 'CopyLayers' that I've posted here before.  And my simple 'pua' routine which used the comamnds purge and audit, just so I don't have to answer the prompts.  One I like when I have to use it is the one I wrote that will match an xrefs (with in a file) layers to the original file of the xrefs.
Tim

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

Please think about donating if this post helped you.

LE

  • Guest
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #12 on: May 02, 2007, 11:29:34 AM »
Here are the only autolisp routines names or shortnames I use on a daily basis and in there are included my top 10.
Quote
(mapcar '(lambda (lsp)
(load lsp nil))
(list
"brk"
"df"
"di" #8 distance at command line between two points
"dp" #1 distance at command line between two paralell lines
"ee" #7 quick erase
"era"
"f0"
"fc" #2 fillet by window crossing
"hl"
"go"
"jp"
"k[2]"
"lay"
"le" #3 line from nearpoint to endpoint
"lee"
"lint"
"lm"
"ln"
"lp" #9 line from nearpoint to perppoint
"ls" #4 layer set command line
"m0"
"mp"
"n" #10 osnaps toggle
"i" #5 zoom in
"rc"
"uc" #6 turn off the ucsicon
"xw"
))

terrycadd

  • Guest
Top 10 MUST HAVE Lisp Routines...
« Reply #13 on: May 02, 2007, 11:51:36 AM »
The poll here at work came up with 2 of our favorites.
One for actual work and the other just for fun.

 :kewl:  c:DS - Dimension Styles creates and sets our dimstyles
by just selecting the desired scale.
http://web2.airmail.net/terrycad/LISP/DimStyles.lsp
http://web2.airmail.net/terrycad/LISP/DimStyles.dcl
http://web2.airmail.net/terrycad/LISP/Dcl_Tiles.lsp (also required)
http://web2.airmail.net/terrycad/LISP/GetIcon.lsp (also required)

 :-D  c:AM - AutoCAD Messenger for sending Windows messages back
and forth without going through the company email system.
http://web2.airmail.net/terrycad/LISP/Messenger.lsp
http://web2.airmail.net/terrycad/LISP/Messenger.dcl

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #14 on: May 02, 2007, 12:46:01 PM »
Well I would have to say:

IL = Isolate Layer(s)
OA = UnIsolates layer(s) Obviously used in cunjuction
Some of the first lisps I wrote in R14 From macros.
EA = Single line attribute edit
XLH = Xline hoizontal on a non-plot layer
XLV = Xline vertical on a non-plot layer

These are the most used (at least once a day).  There are others that I use but these are the mose used
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

efernal

  • Bull Frog
  • Posts: 206
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #15 on: May 02, 2007, 01:27:41 PM »
Code: [Select]
;; mine is one that, after i have selectet objects, writes a code like above...
;; e.fernal

(IF (NULL (TBLSEARCH "BLOCK" "CHANGE_IF_NECESSARY"))
  (PROGN
    (ENTMAKE '((0 . "BLOCK") (2 . "CHANGE_IF_NECESSARY") (70 . 0) (10 0.0 0.0 0.0))
    )
    (ENTMAKE '((0 . "CIRCLE")
               (100 . "AcDbEntity")
               (67 . 0)
               (8 . "0")
               (100 . "AcDbCircle")
               (10 32.7391 54.8242 0.0)
               (40 . 19.2041)
               (210 0.0 0.0 1.0)
              )
    )
    (ENTMAKE '((0 . "LINE")
               (100 . "AcDbEntity")
               (67 . 0)
               (8 . "0")
               (100 . "AcDbLine")
               (10 14.3361 60.3962 0.0)
               (11 28.6723 -3.73585 0.0)
               (210 0.0 0.0 1.0)
              )
    )
    (ENTMAKE '((0 . "LINE")
               (100 . "AcDbEntity")
               (67 . 0)
               (8 . "0")
               (100 . "AcDbLine")
               (10 28.6723 -3.73585 0.0)
               (11 40.5152 56.0377 0.0)
               (210 0.0 0.0 1.0)
              )
    )
    (ENTMAKE '((0 . "LINE")
               (100 . "AcDbEntity")
               (67 . 0)
               (8 . "0")
               (100 . "AcDbLine")
               (10 40.5152 56.0377 0.0)
               (11 52.9814 -3.73585 0.0)
               (210 0.0 0.0 1.0)
              )
    )
    (ENTMAKE '((0 . "LINE")
               (100 . "AcDbEntity")
               (67 . 0)
               (8 . "0")
               (100 . "AcDbLine")
               (10 0.0 0.0 0.0)
               (11 14.3361 60.3962 0.0)
               (210 0.0 0.0 1.0)
              )
    )
    (ENTMAKE '((0 . "LINE")
               (100 . "AcDbEntity")
               (67 . 0)
               (8 . "0")
               (100 . "AcDbLine")
               (10 -24.3091 77.2075 0.0)
               (11 0.0 0.0 0.0)
               (210 0.0 0.0 1.0)
              )
    )
    (ENTMAKE '((0 . "CIRCLE")
               (100 . "AcDbEntity")
               (67 . 0)
               (8 . "0")
               (100 . "AcDbCircle")
               (10 13.4211 32.5117 0.0)
               (40 . 16.9081)
               (210 0.0 0.0 1.0)
              )
    )
    (ENTMAKE '((0 . "ENDBLK")))
  )
  nil
)



e.fernal

deegeecees

  • Guest
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #16 on: May 02, 2007, 02:26:22 PM »
1. ET's Layer Isolate (working in 3d constantly, this is used the most)
2. Layutil.lsp (my own creation, all my layer setups, utilities, etc., still a W.I.P.)
3. CABs' PlotTabs082306.LSP (couldn't goof-off w/o this one)
4. batch_anything.lsp (another of mine, self explanatory)
5. acad200(?)doc.lsp

Just the ones used the most.

Dinosaur

  • Guest
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #17 on: May 02, 2007, 03:36:38 PM »
I used to have several routines for dealing with single pieces of dtext (pre r12 days).  Two of these are still getting regular use: "djm" yields a middle justified piece of dtext (current style, layer and other properties) at the pick point a any angle I specify - great for little area notes or material callouts and "cx" will let me change any text string in multiple dtext objects to a new string.  I also keep "ofc" that will offset most entities a specified distance and place the results on the current layer.  This was added ootb a few releases back but I like mine better and "ppl" which will draw a line from a picked point perpendicular to a chosen line.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #18 on: May 02, 2007, 03:40:31 PM »
LayerFilterDelete was a must at the old company I worked for.
another regular was one for a rotated rectangle which Stig wrote,
theres many more including one huge time-saver written by Kerry Brown which helped me move cross-sections into place and change the layering to suit our standards
Thanks for explaining the word "many" to me, it means a lot.

Tom

  • Guest
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #19 on: May 02, 2007, 05:30:19 PM »
While not a lisp Chucks Hotkeys are one routine used everyday
Kerry's Xplate for 3D solid square & rectangles is also handy
Alot of simple 3 key commands for automating everyday things
eg
;;----- draw line from x to y using snaps
(defun c:lee  ()
    (command "_line" "_endp" pause "_endp" pause "")
    (princ)
    )
(defun c:lei  ()
    (command "_line" "_endp" pause "_int" pause "")
    (princ)
    )
(defun c:lie  ()
    (command "_line" "_int" pause "_endp" pause "")
    (princ)
    )

Derwin

  • Guest
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #20 on: May 02, 2007, 10:16:54 PM »
'LM'           LineMid:       enter length, enter axis, pick midpoint for new line.
'LTT'          LineTanTan  line from tan to tan
'COPYAD'    CopyAccumulatedDisplacement. pick objects, pick axis, 1st offset, 2nd, 3rd, etc.
'QX'           SaveFlattenedDXF: outputs a 2D dxf without AcadDB rubbish adding N Kb.
'OA' + 'SA'  OpenAs + SaveAs: takes just a company acronym and builds automagic filenames.
'JU'            justify, re-orient lower left corner to 5,5.

all mine.

Didge

  • Bull Frog
  • Posts: 211
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #21 on: May 03, 2007, 08:21:26 AM »
Quote
c:AM - AutoCAD Messenger for sending Windows messages back
and forth without going through the company email system.

Thank-you very muchly Terry - what a great little app.

You've raised a fair few smiles (and un-repeatable messages) this end.  :-)
Think Slow......

terrycadd

  • Guest
Top 10 MUST HAVE Lisp Routines...
« Reply #22 on: May 03, 2007, 10:09:00 AM »
Its funny here in that, the boss was out of the loop of included recipients, as we thought he wouldn’t like the idea. He finally found out about it by one of the drafters, who suggested he try Terry’s AM routine to send quick messages other than wait for us to open up our emails.  He loves it now, and uses it a lot for short messages like: [I need your time sheets by noon.], [When you get back from lunch, let’s go over your project.]

However, that’s not what we use it for.  Ours is sometimes on the lighter side to help pass the day.

GDF

  • Water Moccasin
  • Posts: 2081
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #23 on: May 03, 2007, 02:32:43 PM »
I quess mine would be my setup routine for: units, insunits, lunits, textstyle, dimstyles, dimscalle, ltscale...
"all in one" thru a dialog box interface.

;;;ARCH#UNIT is set to "Ci" = IMPERIAL Decimal
;;;ARCH#UNIT is set to "Mm" = METRIC Millimeter
;;;ARCH#UNIT is set to "Cm" = METRIC Centimeter
;;;ARCH#UNIT is set to "Ar" = IMPERIAL Architectural
;;;ARCH#UNIT is set to "Me" = METRIC Meter   
;;;ARCH#UNIT is set to "En" = IMPERIAL Engineering
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #24 on: May 03, 2007, 02:39:05 PM »
Then I would say the BEST overall routine would be Tim Willeys's Xref2Block.lsp routine.
Life would be miserable without this one. Thanks Tim.
« Last Edit: May 03, 2007, 02:41:53 PM by Gary Fowler »
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #25 on: May 03, 2007, 02:46:17 PM »
One more time...

BrowseForFolder.lsp routine is also one of my favorites, by Tony Tanzillo.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Top 10 MUST HAVE Lisp Routines...
« Reply #26 on: May 03, 2007, 02:47:34 PM »
Then I would say the BEST overall routine would be Tim Willeys's Xref2Block.lsp routine.
Life would be miserable without this one. Thanks Tim.
Glad you still find it useful Gary.

One more time...

BrowseForFolder.lsp routine is also one of my favorites, by Tony Tanzillo.
x2.  I use it so much in most of my routines.
Tim

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

Please think about donating if this post helped you.