Jump to content

Your favorite lisp


Nobull84

Recommended Posts

  • Replies 37
  • Created
  • Last Reply

Top Posters In This Topic

  • Tharwat

    4

  • paulmcz

    3

  • Rob-GB

    3

  • Nobull84

    3

  • 2 weeks later...
My favourite is my Stair lisp, because it was my first and I was given advice jointly by members here and over at the swamp.(some overlap of members is more than probable ;) ) It reminds me both of my accomplishment and the huge generosity of the members of these forums for which I am thankful.

Rob.

 

Hey Rob-GB! Could you be so kind and show a screenshot of the results of your stair lisp?

Link to comment
Share on other sites

  • 3 years later...

I use this daily:

;; Open folder current directory
(defun c:cd (/ _opendirectory)
 (defun _opendirectory	(path / sa)
   (if	(and (eq 'str (type path))
     (findfile (vl-string-right-trim "\\" path))
     (setq sa (vlax-create-object "Shell.Application"))
)
     (progn (vlax-invoke sa 'explore path) (vlax-release-object sa))
   )
   (princ)
 )
 (_opendirectory (getvar 'dwgprefix))
)

Link to comment
Share on other sites

I use this daily:

..

 

I used this one:

; To Display / Open the current / active dwg in explorer, to see where its located
(defun C:test ( / )
 (cond 
   ( (zerop (getvar 'dwgtitled)) (alert "\nThis drawing is not saved!") )
   ( (startapp (apply 'strcat (append '("explorer /select, ") (mapcar 'getvar '(dwgprefix dwgname)) '(", /e")))) )
 ); cond
 (princ)
); defun C:test

 

But I always forget how I named the .lsp file or the command definition so just write (getvar 'dwgprefix) to see on what dwg I'm working on.

Link to comment
Share on other sites

http://www.lee-mac.com/incrementalarray.html

Make sure you use the "The dynamic mode: incarrayd". This one ROCKS!

Use it ALOT and thanks Lee!

 

Judging by Lee's background - which is automating work for different companies,

even if you don't know what your favourite lisp is he would find a way to save you so much time and effort,

so even hiring additional work(ers) won't worth it. ;)

Link to comment
Share on other sites

Simplest is the best I think.

The ones I use daily are:

"ZA".... Zoom All wihch wouldn't take a genius to work out

A3P... A3 Plot send a plot to the A3 printer and PLOTPDF saves a PDF in the same folder as the drawing (these are my first 2 so the code probably isn't the best, but they work)

Link to comment
Share on other sites

(command "shell" (strcat "explorer \"" (getvar 'dwgprefix) "\""))

 

my fav is Doug Wilson's transpose = (apply 'mapcar (cons 'list lst))

Link to comment
Share on other sites

My new favorite

This toggle for a classic toolbar

 

 


; TOGGLE TOOLBAR CONTROL
(defun c:-TB-ins ()
   (if (null -tb-ins)
       (setq -TB-ins 0)
   )
   (setq -TB-ins (abs (- 1 -tb-ins)))
   (if (= -TB-ins 0)
       (COMMAND "-TOOLBAR" "CONTROL" "hide")  ; CONTROL: jouw custom toolbar
       (COMMAND "-TOOLBAR" "CONTROL" "show")  ; CONTROL: jouw custom toolbar
   )
)

 

 

https://drive.google.com/file/d/1ty_ARHfa1EAfzkwahX0CJv_dZrLhskIx/view

Link to comment
Share on other sites

  • 4 weeks later...

couple of goodies..

 

copy print settings from current layout sheet to all others (this has saved me huge amount of time!)

 

(defun c:CSTP  ( / Adoc Layts clyt)
     (setq aDoc  (vla-get-activedocument (vlax-get-acad-object))
           Layts (vla-get-layouts aDoc)
           clyt  (vla-get-activelayout aDoc))
     (foreach
            itm  (vl-remove (vla-get-name clyt) (layoutlist))
           (vla-copyfrom (vla-item Layts itm) clyt)
           )
     (princ)
     )

 

 

Quick Rotate - rotates selected objects 90degrees around centerpoint of object

With every click or enter pressed next rotation is made.

QR.lsp

Link to comment
Share on other sites

PLOTPDF saves a PDF in the same folder as the drawing

 

oh I've been looking for something like this forever! always thought autocad should have an option to do that..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...