Author Topic: Lisp Problems in 2010  (Read 7408 times)

0 Members and 1 Guest are viewing this topic.

Luke

  • Guest
Lisp Problems in 2010
« on: September 09, 2009, 03:20:14 PM »
This code was written with a ton of assistance from ronjonp & CAB... http://www.theswamp.org/index.php?topic=20863.0

The intent is to go into any of my drawings and with 1 click of a button it will print all my 8-1/2 x 11 title blocks.

Worked just fine in 2006 but now will not with 2010.

Error I get is
Quote
; error: no function definition: nil

Any help is appreciated.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lisp Problems in 2010
« Reply #1 on: September 09, 2009, 03:32:21 PM »
is your Default Windows System Printer.pc3 exist ?
Keep smile...

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #2 on: September 09, 2009, 03:36:10 PM »
Yes it is.  

None of the lisps work, regardless of printer.  I think it is a problem with the code before the command "-plot"
« Last Edit: September 09, 2009, 03:40:40 PM by Luke »

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lisp Problems in 2010
« Reply #3 on: September 09, 2009, 03:37:50 PM »
Yes it is. 

None of them lisps work, regardless of printer.  I think it is a problem with the code before the command "-plot"

strange...the code work fine for me..
Keep smile...

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #4 on: September 09, 2009, 03:40:07 PM »
in 2010?

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lisp Problems in 2010
« Reply #5 on: September 09, 2009, 03:54:16 PM »
yes...

In fact...the problem is on the script routine..not the code above
« Last Edit: September 09, 2009, 04:02:02 PM by Andrea »
Keep smile...

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #6 on: September 09, 2009, 04:05:43 PM »
OK so in 2006 I setup all the machines in the office and went through the routine a million times. 

Maybe now in 2010 I'm forgetting a simple step???

1) I pointed my support path to look at the folder where the LCC_Autoplots.lsp file is saved
2) I appload the LCC_Autoplots.lsp file
3) I insert the title block
4) I click the button with the applicable macro or enter at the command line
Code: [Select]
autoplotdell17100811model
and i get on the command line ; error: no function definition: nil

Anybody see something I'm missing?
Is it working for everybody else in 2010?

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lisp Problems in 2010
« Reply #7 on: September 09, 2009, 04:23:32 PM »
OK so in 2006 I setup all the machines in the office and went through the routine a million times. 

Maybe now in 2010 I'm forgetting a simple step???

1) I pointed my support path to look at the folder where the LCC_Autoplots.lsp file is saved
2) I appload the LCC_Autoplots.lsp file
3) I insert the title block
4) I click the button with the applicable macro or enter at the command line
Code: [Select]
autoplotdell17100811model
and i get on the command line ; error: no function definition: nil

Anybody see something I'm missing?
Is it working for everybody else in 2010?

did you try (c:autoplotdell17100811model) ??
Keep smile...

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #8 on: September 09, 2009, 04:33:52 PM »
Yes I did try that.

That is the macro that is on my custom button and I also tried it on the command line.

Every time I get

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Lisp Problems in 2010
« Reply #9 on: September 09, 2009, 04:46:04 PM »
Define a new error function ( code below ) in the drawing, and then try the command, and then copy/paste the command line info into your next post.  This should give people more info.

Code: [Select]
(defun *error* (msg) (vl-bt))
Tim

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

Please think about donating if this post helped you.

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #10 on: September 09, 2009, 04:52:32 PM »
Command: autoplotdell17100811model
; error: no function definition: nil

Command:
Command: (defun *error* (msg) (vl-bt))
*ERROR*

Command: autoplotdell17100811model
Backtrace:
[0.63] (VL-BT)
[1.59] (*ERROR* "no function definition: nil")
[2.54] (_call-err-hook #<SUBR @0ec56564 *ERROR*> "no function definition: nil")
[3.48] (sys-error "no function definition: nil")
:ERROR-BREAK.43 nil
[4.40] (#<SUBR @0c7745b4 null-fun-hk> <Entity name: 7ee92210>)
[5.36] (nil <Entity name: 7ee92210>)
[6.31] (mapcar nil (<Entity name: 7ee92210>))
[7.25] (MAPCAR VLAX-ENAME->VLA-OBJECT (<Entity name: 7ee92210>))
[8.19] (C:AUTOPLOTDELL17100811MODEL)
[9.15] (#<SUBR @0ec5671c -rts_top->)
[10.12] (#<SUBR @0c77435c veval-str-body> "(C:AUTOPLOTDELL17100811MODEL)" T
#<FILE internal>)
:CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)
:ARQ-SUBR-CALLBACK.3 (nil 0)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Lisp Problems in 2010
« Reply #11 on: September 09, 2009, 04:58:22 PM »
just a quick glance but it looks to me like VLAX-ENAME->VLA-OBJECT should be quoted, i.e. 'VLAX-ENAME->VLA-OBJECT
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #12 on: September 10, 2009, 08:25:11 AM »
Quote
'VLAX-ENAME->VLA-OBJECT
is quoted

The lisp is attached at the beginning on the thread.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lisp Problems in 2010
« Reply #13 on: September 10, 2009, 08:37:50 AM »
(vl-load-com)

??
Keep smile...

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #14 on: September 10, 2009, 08:43:20 AM »
Andrea I'm not sure what you are asking or suggesting.

I have tried to write lisps and just can not get them.

This code was all written by ronjonp & CAB over a year ago.

Again this lisp work in 2006 but not in 2010.
« Last Edit: September 10, 2009, 08:52:32 AM by Luke »

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lisp Problems in 2010
« Reply #15 on: September 10, 2009, 09:11:08 AM »
what happend when you try this...
Code: [Select]
(eval vla-getboundingbox)
Keep smile...

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #16 on: September 10, 2009, 09:14:48 AM »

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lisp Problems in 2010
« Reply #17 on: September 10, 2009, 09:25:08 AM »
a HA !!!

run (vl-load-com)
before using your lisp.

;-)
Keep smile...

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #18 on: September 10, 2009, 09:39:52 AM »
That did it.  Thank you.

Any idea why they ran in 2006 without it?

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lisp Problems in 2010
« Reply #19 on: September 10, 2009, 09:54:12 AM »
maybe your (vl-load-com) its loaded at the startup or in some lisp or in acad.lsp/acaddoc.lsp...
to be sure....when VL function is used...put the code at the command start.

eg:
Code: [Select]
(defun c:mylisp ()
(vl-load-com)
...
)
Keep smile...

Luke

  • Guest
Re: Lisp Problems in 2010
« Reply #20 on: September 10, 2009, 10:01:22 AM »
I put it in my acad.lsp so I hopefully will not have to worry about it again.

Thanks again for your help!

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Lisp Problems in 2010
« Reply #21 on: September 10, 2009, 10:03:55 AM »
I put it in my acad.lsp so I hopefully will not have to worry about it again.

Thanks again for your help!

it's a pleasure Luke.  :kewl:
Keep smile...

GDF

  • Water Moccasin
  • Posts: 2081
Re: Lisp Problems in 2010
« Reply #22 on: September 10, 2009, 12:09:39 PM »
I put it in my acad.lsp so I hopefully will not have to worry about it again.

Thanks again for your help!

;;; Following is a list of AutoCAD, Express Tools, and user-defined files in
;;; the order they are loaded when you first start the program. Go to AutoCAD
;;; Help and search for "support file loading" (including quotes) and the
;;; top result is "Order of support file loading" which nets the following:
;;;      <File For:>       <Use By:>
;;;      acad2000.lsp       AutoCAD
;;;      acad.rx          User
;;;      acad.lsp       User
;;;      acad2000doc.lsp       AutoCAD
;;;      acetutil.fas       Express Tools
;;;      acaddoc.lsp       User
;;;      mymenu.mnc       User
;;;      mymenu.mnl       User
;;;      acad.mnc       AutoCAD
;;;      acad.mnl       AutoCAD
;;;      acetmain.mnc       Express Tools
;;;      acetmain.mnl       Express Tools
;;;      s::startup       User
;;; Note: If the user-defined function S::STARTUP is included in the acad.lsp or
;;; acaddoc.lsp file or a MNL file, the function is called when you enter a new
;;; drawing or open an existing drawing. Thus, you can include a definition of
;;; S::STARTUP in the LISP startup file to perform any setup operations. For more
;;; information about the s::startup function, refer to the Customization Guide.
;;;
;;; It should be noted that Autodesk's website is misleading about the load order.
;;; The menus load in the order they were initially loaded in, and *not* always
;;; the user menu first. The only way the user menu loads first is if all menus
;;; were removed and the user's menu was loaded first, then the other menus
;;; subsequently. In most cases people tend to leave Acad's menu there, then
;;; Express Tools (if installed), and then finally the user's menu.
;;; This can be verified by watching the menu load prompts:
;;; AutoCAD menu utilities loaded.
;;;
;;; Key files to needed to run this program:
;;; (1.) The "ACAD.lsp" file sets the path for the arch program along with the saved autocad
;;;     environment settings for a clean restore to generic autocad when the arch program
;;;     is unloaded. This is the only file that must be located at each workstation within
;;;     the autocad support directory. It only loads at AutoCAD startup.
;;; (2.) The "ACADDOC.lsp" loads the "ARCH_INITIALIZE.fas" file.
;;; (3.) The "ARCH_INITIALIZE.fas" initialize the setup.
;;; (4.) Custom settings are controled by the "custom_xxx.lsp" file.
;;; (5.) The "ARCH.mnc" loads the "ARCH.mnl" file automatically which contains many
;;;     misc functions required to operate this program.
;;; (6.) The "ARCH_SUBROUTINES.fas" contains all of the subfunctions.
;;; (7.) All bitmaps for the toolbars are compiled in the "ARCH.dll" which is loaded
;;;     automatically.
;;; (8.) The "ARCH.dcl" file must be located in the acad support file search path
;;;     it contains all of the dialog box widgets for the arch program.
;;;     @include "..\\ARCH.dcl"
;;;
;;;
;;; General Rule is to NOT edit the acad200Xdoc.lsp file because it is an Autocad file
;;; that CAN and WILL be replaced if you install patches. I would suggest using the
;;; acaddoc.lsp for the code. Following is a list of AutoCAD, Express Tools, and
;;; user-defined files in the order they are loaded when you first start the program.
;;;
;;; File         For use by:    
;;; acad200X.lsp AutoCAD    
;;; acad.rx         User    
;;; acad.lsp User    
;;; acad200Xdoc.lsp AutoCAD    
;;; acetutil.fas Express Tools    
;;; acaddoc.lsp User    
;;; mymenu.mnc User    
;;; mymenu.mnl User    
;;; acad.mnc AutoCAD    
;;; acad.mnl AutoCAD    
;;; acetmain.mnc Express Tools    
;;; acetmain.mnl Express Tools    
;;; s::startup User
;;;
;;; To make sure you are pulling the correct acaddoc.lsp copy and paste the following
;;; line to the command line (findfile "acaddoc.lsp") You should get the path returned
;;; and if it is not where you think the file is installed you have more than one file.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64