See the top rated post in this thread. Click here

Results 1 to 4 of 4

Thread: Help fix a routine - Error: too few arguments

  1. #1
    I could stop if I wanted to cadd4la's Avatar
    Join Date
    2001-12
    Location
    Newport Beach, CA
    Posts
    399
    Login to Give a bone
    0

    Default Help fix a routine - Error: too few arguments

    Hello everyone,

    I came across this lisp, but for some unknown reason I getting this when I run it.

    Command: (LOAD "C:/A2K Custom/SFH.lsp") C:SFH
    Command: sfh
    ; error: too few arguments

    Code:
    (DEFUN C:SFH (/o:hpn);;<-Fills area w/ solid hatch.
    (SETVAR "CMDECHO" 0)
    (SETQ o:hpn (getvar "HPNAME"))
    (COMMAND ".-bhatch" "Properties" "solid" pause "")
    (SETVAR "hpname" o:hpn)
    (SETVAR "CMDECHO" 1)
    (princ)
    )
    I hope someone can fix the code for me.

    Kyle C.

  2. #2
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    1

    Default Re: Help fix a routine - Error: too few arguments

    You needed a space here (/<space>o:hpn)
    Code:
    ;;<-Fills area w/ solid hatch.
    (defun c:sfh (/ o:hpn)
      (setvar "CMDECHO" 0)
      (setq o:hpn (getvar "HPNAME"))
      (command ".-bhatch" "Properties" "solid" pause "")
      (setvar "hpname" o:hpn)
      (setvar "CMDECHO" 1)
      (princ)
    )

  3. #3
    I could stop if I wanted to cadd4la's Avatar
    Join Date
    2001-12
    Location
    Newport Beach, CA
    Posts
    399
    Login to Give a bone
    0

    Smile Re: Help fix a routine - Error: too few arguments

    CAB2k,

    Thank you for your help

    Kyle C.

  4. #4
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    0

    Default Re: Help fix a routine - Error: too few arguments

    You are quite welcome.

Similar Threads

  1. Error: too few arguments in a function
    By twitchyChuck in forum AutoLISP
    Replies: 6
    Last Post: 2013-06-07, 09:24 PM
  2. Replies: 7
    Last Post: 2012-12-11, 01:41 PM
  3. error: too many arguments??
    By tedg in forum AutoLISP
    Replies: 3
    Last Post: 2010-08-31, 02:58 AM
  4. error: too many arguments Using IF Function
    By ccruz in forum AutoLISP
    Replies: 1
    Last Post: 2009-08-06, 09:31 PM
  5. Replies: 12
    Last Post: 2006-12-07, 03:22 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
  •