Author Topic: New user to 2008 from 2002 - lisp question  (Read 4141 times)

0 Members and 1 Guest are viewing this topic.

rktect3j

  • Guest
New user to 2008 from 2002 - lisp question
« on: June 13, 2007, 02:21:03 PM »
I tried to load a lisp routine but it just wont work.  I am hoping this has nothing to do with that .cui thingy as I don't know squat about it.  I went to tools, autolisp, load application.  Found the lisp, placed it in the suitcase and loaded it.  closed and reopened autocad and typed in the dos command and in return I got "unknown command"

Should be simple, right?

ronjonp

  • Needs a day job
  • Posts: 7533
Re: New user to 2008 from 2002 - lisp question
« Reply #1 on: June 13, 2007, 02:24:10 PM »
Drag it into your screen and see if it works....if it does then you startup suite has issues.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

rktect3j

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #2 on: June 13, 2007, 02:34:43 PM »
That don't make a lick of sense, so I did it anyways.  Still nothing happened.  It's just a simple routine that puts the command zoom and extents together with a ZE command.

deegeecees

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #3 on: June 13, 2007, 02:37:16 PM »
Could you post the Lisp File?

rktect3j

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #4 on: June 13, 2007, 02:38:43 PM »
;**********************************ZE.LSP***************************************
; Written by:
; Date:
;
; This function will zoom the drawing to the "Virtual Screen" size.
;

(defun l:ZE ()
   (setvar "cmdecho" 0)
   (command "'ZOOM" "W" (getvar "VSMIN") (getvar "VSMAX"))
(prin1)
)
;*******************************END ZE.LSP*************************************

rktect3j

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #5 on: June 13, 2007, 02:39:55 PM »
I don't write these things but I do enjoy using them.  This is one I use all the time and it should have been super simple compared to the rest of the ones I want to load.

LE

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #6 on: June 13, 2007, 02:41:05 PM »
Change the I:ZE to C:ZE

also, give a try to a double click(on the scroll button) on the screen and see if you get the zoom extents.
« Last Edit: June 13, 2007, 02:54:45 PM by LE »

rktect3j

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #7 on: June 13, 2007, 02:51:30 PM »
Well, now its even odder since it does something it shouldn't be doing.  If I type "z" enter and then "e" enter I will get zoom extents.  Now when i type "ZE" enter I zoom way farther back then the actual extents.  :ugly:  :pissed:

rktect3j

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #8 on: June 13, 2007, 02:54:06 PM »
;**********************************ZE.LSP***************************************
; Written by:
; Date:
;
; This function will zoom the drawing to the "Virtual Screen" size.
;

(defun l:ZE ()
   (setvar "cmdecho" 0)
   (command "'ZOOM" "W" (getvar "VSMIN") (getvar "VSMAX"))
(prin1)
)
;*******************************END ZE.LSP*************************************
Should this read (command "'zoom" "e".... instead of "w"?

LE

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #9 on: June 13, 2007, 02:55:53 PM »
(defun C:ZE ()
   (setvar "cmdecho" 0)
   (command "'ZOOM" "W" (getvar "VSMIN") (getvar "VSMAX"))
(prin1)
)


and load the above code again, and try ZE

rktect3j

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #10 on: June 13, 2007, 02:58:31 PM »
(defun C:ZE ()
   (setvar "cmdecho" 0)
   (command "'ZOOM" "W" (getvar "VSMIN") (getvar "VSMAX"))
(prin1)
)


and load the above code again, and try ZE


I did the change to C:ZE and got what seems to be a zoom to somewhere beyond extents???  So I thought maybe the "w" should maybe be "e"???

LE

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #11 on: June 13, 2007, 02:59:29 PM »
You need to load the lisp again.... that's why is not working.

LE

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #12 on: June 13, 2007, 03:01:12 PM »
Or copy the lisp code from the first "(" to the last ")" and paste it in your command line.... HTH

rktect3j

  • Guest
Re: New user to 2008 from 2002 - lisp question
« Reply #13 on: June 13, 2007, 03:13:12 PM »
It's working now.  Thanks.