Results 1 to 2 of 2

Thread: too few arguments

  1. #1
    Member
    Join Date
    2014-11
    Posts
    21
    Login to Give a bone
    0

    Default too few arguments

    why are there too few arguments
    Code:
    (if
        (or
          (and
    	(= option "Y") (= option1 "E")
    	(= option "Yes") (= option1 "E"))   
          (progn
          (setq toprad (- rad (* scx 0.6134)))
         (setq cnht (* scx 0.6134))
         (setq endct (polar pos 0.0 cnht ))
         (command "_cone" pos toprad "T" rad "A" endct "" )
         (setq cne (ssget "L"))
         (command "_slice" cyl "" "yz" endct pos1)
          (command "_union" cyl cne "")
           )
         (progn
    	(setq toprad (- rad (* scx 0.6134)))
         (setq cnht (* scx 0.6134))
         (setq endct (polar pos 0.0 cnht ))
         (command "_cone" pos toprad "T" rad "A" endct "" )
         (setq cne (ssget "L"))
         (command "_slice" cyl "" "yz" endct pos1)
          (command "_subtrack" cyl cne "")
    	)
          )
        )
    Last edited by rkmcswain; 2019-04-01 at 12:20 PM. Reason: added [CODE] tags

  2. #2
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: too few arguments

    1st step force option to be "YES" if your doing a shortcut and other code then check there and make "Y" or "YES" one or the other.

    Also use (entlast) to get last entity created rather than ssget "L" you would need to use ssname to get the 0 entity from cne to use it.

    SUBTRACT spelling problem

    Code:
    ; fix yes or y
    (if
    (and (= option "Y") (= option1 "E"))
    (progn
    (setq toprad (- rad (* scx 0.6134)))
    (setq cnht (* scx 0.6134))
    (setq endct (polar pos 0.0 cnht ))
    (command "_cone" pos toprad "T" rad "A" endct "" )
    (setq cne (entlast))
    (command "_slice" cyl "" "yz" endct pos1)
    (command "_union" cyl cne "")
    )
    (progn
    (setq toprad (- rad (* scx 0.6134)))
    (setq cnht (* scx 0.6134))
    (setq endct (polar pos 0.0 cnht ))
    (command "_cone" pos toprad "T" rad "A" endct "" )
    (setq cne (entlast))
    (command "_slice" cyl "" "yz" endct pos1)
    (command "_subtract" cyl cne "")
    )
    )
    Image my version of ask questions. ASk for code. its a library routine.
    Attached Images Attached Images

Similar Threads

  1. Too few arguments, can someone check please?
    By mrsusan in forum AutoLISP
    Replies: 18
    Last Post: 2011-10-21, 12:00 PM
  2. error: too many arguments??
    By tedg in forum AutoLISP
    Replies: 3
    Last Post: 2010-08-31, 02:58 AM
  3. arguments
    By d_m_hopper in forum AutoLISP
    Replies: 4
    Last Post: 2007-08-24, 03:03 PM
  4. Help fix a routine - Error: too few arguments
    By cadd4la in forum AutoLISP
    Replies: 3
    Last Post: 2006-01-10, 06:06 PM
  5. too few arguments on compile
    By voigtmark in forum AutoLISP
    Replies: 3
    Last Post: 2005-10-28, 06:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •