Author Topic: Too few arguments  (Read 9584 times)

0 Members and 1 Guest are viewing this topic.

POCKETS

  • Guest
Too few arguments
« on: May 13, 2009, 01:30:22 PM »
CAB,

I apologize for bothering you again but this problem will not go AWAY!  At the command line, when I try to use PL2Cloud or Flexduct, I get "To few arguments".  Two great programs and I can't use them.  Any ideas?
Pockets

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Too few arguments
« Reply #1 on: May 13, 2009, 01:48:34 PM »
In the error function add ' (vl-bt) ', and then post what is returned to the command line.  This may help Alan more.
Tim

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

Please think about donating if this post helped you.

POCKETS

  • Guest
Re: Too few arguments
« Reply #2 on: May 13, 2009, 02:01:19 PM »
Mr. Willey,
I don't understand what you are requesting.  When it comes to lisp, what I know could be put in a thimble and a bulldozer driven in behind.
Pockets

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Too few arguments
« Reply #3 on: May 13, 2009, 02:12:19 PM »
If the code you are using looks like this

Code: [Select]
;;;=======================[ FlexDuct.lsp ]==============================
;;; Author: Copyright© 2007 Charles Alan Butler
;;; Contact or Updates  @  www.TheSwamp.org
;;; Version:  1.5   October 9,2007
;;; Purpose: Create Flex Duct from a centerline that the user picks
;;;    Centerline may be anything vla-curve will handle
;;; Sub_Routines:     
;;;    makePline which creates a LW Polyline
;;; Restrictions: UCS is supported
;;;    Duct Layer is hard coded, see var Flexlayer
[color=red];;;    No error handler at this time[/color]
;;; Known Issues:
;;;    Tight curves cause pline jacket distortion
;;;    Added warning when this is about to occur
;;; Returns:  none
;;;=====================================================================
;;;   THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED     ;
;;;   WARRANTY.  ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR  ;
;;;   PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.            ;
;;;                                                                    ;
;;;  You are hereby granted permission to use, copy and modify this    ;
;;;  software without charge, provided you do so exclusively for       ;
;;;  your own use or for use by others in your organization in the     ;
;;;  performance of their normal duties, and provided further that     ;
;;;  the above copyright notice appears in all copies and both that    ;
;;;  copyright notice and the limited warranty and restricted rights   ;
;;;  notice below appear in all supporting documentation.              ;
;;;=====================================================================

(defun c:Flex (/         cl-ent    ribWidth  RibShort  RibLong   collar
               dist      steps     ribFlag   pt        curAng    curDer
               RibPtLst1 RibPtLst2 p1        p2        doc       space
               cflag     cl-len    ribRadius tmp       NewPline  FlexLayer
               pl1       pl2       cnt       errflag   InsulThick
              )

Then add ( whats in red below ) to the code.
Code: [Select]
;;;=======================[ FlexDuct.lsp ]==============================
;;; Author: Copyright© 2007 Charles Alan Butler
;;; Contact or Updates  @  www.TheSwamp.org
;;; Version:  1.5   October 9,2007
;;; Purpose: Create Flex Duct from a centerline that the user picks
;;;    Centerline may be anything vla-curve will handle
;;; Sub_Routines:     
;;;    makePline which creates a LW Polyline
;;; Restrictions: UCS is supported
;;;    Duct Layer is hard coded, see var Flexlayer
;;;    No error handler at this time
;;; Known Issues:
;;;    Tight curves cause pline jacket distortion
;;;    Added warning when this is about to occur
;;; Returns:  none
;;;=====================================================================
;;;   THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED     ;
;;;   WARRANTY.  ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR  ;
;;;   PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.            ;
;;;                                                                    ;
;;;  You are hereby granted permission to use, copy and modify this    ;
;;;  software without charge, provided you do so exclusively for       ;
;;;  your own use or for use by others in your organization in the     ;
;;;  performance of their normal duties, and provided further that     ;
;;;  the above copyright notice appears in all copies and both that    ;
;;;  copyright notice and the limited warranty and restricted rights   ;
;;;  notice below appear in all supporting documentation.              ;
;;;=====================================================================

(defun c:Flex (/         cl-ent    ribWidth  RibShort  RibLong   collar
               dist      steps     ribFlag   pt        curAng    curDer
               RibPtLst1 RibPtLst2 p1        p2        doc       space
               cflag     cl-len    ribRadius tmp       NewPline  FlexLayer
               pl1       pl2       cnt       errflag   InsulThick [color=red]*error*[/color]
              )
             [color=red](defun *error* (msg) (vl-bt))[/color]

And in the Pl2Cloud routine, in this area
Code: [Select]
  (defun *error* (msg)
    (if
      (not
        (member
          msg
          '("console break" "Function cancelled" "quit / exit abort" "")
        )
      )
       (princ (strcat "\nError: " msg))
    ) ; if
    (setvar "Plinewid" oldplw)
    (setvar "blipmode" userbm) ;reset blipmode
    (setvar "CMDECHO" usercmd)
    (setvar "osmode" useros)
    (setq pl2cloudglobal (put_saved_vars)
          userbm  nil
          oldplw  nil
          usercmd nil
          useros  nil
    )
    (princ)
  ) ;end error function

Add to it like so

Code: [Select]
  (defun *error* (msg)
    (if
      (not
        (member
          msg
          '("console break" "Function cancelled" "quit / exit abort" "")
        )
      )
       (princ (strcat "\nError: " msg))
    ) ; if
    (setvar "Plinewid" oldplw)
    (setvar "blipmode" userbm) ;reset blipmode
    (setvar "CMDECHO" usercmd)
    (setvar "osmode" useros)
    (setq pl2cloudglobal (put_saved_vars)
          userbm  nil
          oldplw  nil
          usercmd nil
          useros  nil
    )
[color=red]    (vl-bt)[/color]
    (princ)
  ) ;end error function

This should help point stuff out.
Tim

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

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Too few arguments
« Reply #4 on: May 13, 2009, 03:08:54 PM »
Thanks Tim...

Pockets the last error handler posted by Tim is the one in Pl2cloud lisp.
Be sure to keep using version 27b & post the command line output after the error occurs.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

POCKETS

  • Guest
Re: Too few arguments
« Reply #5 on: May 13, 2009, 03:28:42 PM »
This is what came up on the command line

Duct diameter is set to 2.0
Select center of flex duct [PLINE] [Diameter] Enter to quitBacktrace:
[0.49] (VL-BT)
[1.45] (*ERROR* "too few arguments")
[2.40] (_call-err-hook #<SUBR @06059fdc *ERROR*> "too few arguments")
[3.34] (sys-error "too few arguments")
:ERROR-BREAK.29 nil
[4.26] (TRANS (0.0 -10.7469 0.0) 0 1)
[5.19] (C:FLEX)
[6.15] (#<SUBR @0605a104 -rts_top->)
[7.12] (#<SUBR @02452334 veval-str-body> "(C:FLEX)" T #<FILE internal>)
:CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)
:ARQ-SUBR-CALLBACK.3 (nil 0)

POCKETS

  • Guest
Re: Too few arguments
« Reply #6 on: May 13, 2009, 03:30:50 PM »
This is what comes up for pl2cloud

Command: pl2cloud

***  Debug Mode ON.  ***
Main Routine Started...
Global Vars Set...
Checking for DCL...
DCL File found...
Opening DCL File...
Pick Polyline to trace cloud:
>>> Make Cloud Sub
((-1 . <Entity name: 41ada168>) (0 . "LWPOLYLINE") (330 . <Entity name:
41afbcc8>) (5 . "129D") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0")
(100 . "AcDbPolyline") (90 . 2) (70 . 0) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10
11.0591 2.8774) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 11.0591 12.2889) (40 .
0.0) (41 . 0.0) (42 . 0.0) (210 0.0 0.0 1.0))
  Check point 1
  Check point 2
<Entity name: 41ada168>
0.0
0.495342
9.41149
1.0
Error: too few arguments

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Too few arguments
« Reply #7 on: May 13, 2009, 03:57:33 PM »
Thanks for the update.
In the routine pl2cloud27b find these lines:
Code: [Select]
    (princ)
  ) ;end error function

and add this:
Code: [Select]
    (vl-bt) ; Add this line
    (princ)
  ) ;end error function


Then test again & post results.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Too few arguments
« Reply #8 on: May 13, 2009, 04:12:07 PM »
Strange but this line looks OK to me.
Anyone see the cause of the error?
Code: [Select]
[4.26] (TRANS (0.0 -10.7469 0.0) 0 1)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Too few arguments
« Reply #9 on: May 13, 2009, 04:18:23 PM »
Only if the ' trans ' function got re-defined??

Edit:  Here is what is called, maybe the same on other comps.
Code: [Select]
#<SUBR @0a43f808 TRANS>
Tim

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

Please think about donating if this post helped you.

POCKETS

  • Guest
Re: Too few arguments
« Reply #10 on: May 13, 2009, 04:27:00 PM »
T

***  Debug Mode ON.  ***
Main Routine Started...
Global Vars Set...
Checking for DCL...
DCL File found...
Opening DCL File...
Pick Polyline to trace cloud:
>>> Make Cloud Sub
((-1 . <Entity name: 402d58d0>) (0 . "LWPOLYLINE") (330 . <Entity name:
402d0cf8>) (5 . "362") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0")
(100 . "AcDbPolyline") (90 . 4) (70 . 1) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10
22.6612 8.91265) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 31.3409 8.91265) (40 .
0.0) (41 . 0.0) (42 . 0.0) (10 31.3409 13.8397) (40 . 0.0) (41 . 0.0) (42 .
0.0) (10 22.6612 13.8397) (40 . 0.0) (41 . 0.0) (42 . 0.0) (210 0.0 0.0 1.0))
  Check point 1
  Check point 2
<Entity name: 402d58d0>
0.0
0.494794
27.2137
4.0
Error: too few arguments
Backtrace:
[0.64] (VL-BT)
[1.60] (*ERROR* "too few arguments")
[2.55] (_call-err-hook #<SUBR @0616cab4 *ERROR*> "too few arguments")
[3.49] (sys-error "too few arguments")
:ERROR-BREAK.44 nil
[4.41] (TRANS (22.6612 8.91265 0.0) 0 1)
[5.34] (MAKECLOUD ((-1 . <Entity name: 402d58d0>) (0 . "LWPOLYLINE") (330 .
<Entity name: 402d0cf8>) (5 . "362") (100 . "AcDbEntity") (67 . 0) (410 .
"Model") (8 . "0") (100 . "AcDbPolyline") (90 . 4) (70 . 1) (43 . 0.0) (38 .
0.0) (39 . 0.0) (10 22.6612 8.91265) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10
31.3409 8.91265) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 31.3409 13.8397) (40 .
0.0) (41 . 0.0) (42 . 0.0) (10 22.6612 13.8397) (40 . 0.0) (41 . 0.0) (42 .
0.0) (210 0.0 0.0 1.0)) nil)
[6.28] (DO_PICK_METHOD)
[7.24] (RUN_DIALOG "pl2cloud.dcl")
[8.19] (C:PL2CLOUD)
[9.15] (#<SUBR @0616d154 -rts_top->)
[10.12] (#<SUBR @02442334 veval-str-body> "(C:PL2CLOUD)" T #<FILE internal>)
:CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)
:ARQ-SUBR-CALLBACK.3 (nil 0)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Too few arguments
« Reply #11 on: May 13, 2009, 04:33:34 PM »
What happens when you enter this at the command line?
(trans '( 1 1 0) 0 1)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

POCKETS

  • Guest
Re: Too few arguments
« Reply #12 on: May 13, 2009, 04:40:35 PM »
It says "too few arguments"

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Too few arguments
« Reply #13 on: May 13, 2009, 04:45:20 PM »
Type ' !trans ' at the command line, and post back.
Tim

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

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Too few arguments
« Reply #14 on: May 13, 2009, 04:50:12 PM »
Well it could be a bug in your ACAD or some routine has hijacked the TRANS function. :-o
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.