Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Error message when Dialog Box opens - error to few arguments

  1. #11
    I could stop if I wanted to pnorman's Avatar
    Join Date
    2005-02
    Location
    Calgary
    Posts
    203
    Login to Give a bone
    0

    Default Re: Error message when Dialog Box opens - error to few arguments

    Quote Originally Posted by Lions60
    ok I understad everything up until filf (nth (atoi *data_ff*) ff#). When i run the program and select 2 for the value it returns 0 and when i select 4 it returns 2. Is that function what controls the return value.
    The value of variable *data_ff* (the golbal var) will be either "0" or "1". This corresponds to the first or second element in your list ff. I created the list ff# just so that I could easily get a value for filf that was an integer, 2 or 4 inches. So (nth (atoi *data_ff*) ff#) retrieves the first or second element form list ff# depending on the value of *data_ff*

    list ff = ("2"" "4"")
    list ff# = (2 4)

    I wasn't sure if atoi would work on list ff as above but I have now tested it and it does so you can do without the list ff#
    so change
    (setq ff '("2\"" "4\"")
    ff# '(2 4)
    )
    to
    (setq ff '("2\"" "4\""))
    and
    filf (nth (atoi *data_ff*) ff#)
    to
    filf (atoi (nth (atoi *data_ff*) ff))

    see attached
    Attached Files Attached Files

  2. #12
    I could stop if I wanted to
    Join Date
    2006-07
    Posts
    233
    Login to Give a bone
    0

    Default Re: Error message when Dialog Box opens - error to few arguments

    Thanks very much. I have taken the error checking and other things you added to my program and put them in some other i have been working on. They now run smoother and there is no more messaging popping up in the command line. I appreciate all you have done.

  3. #13
    I could stop if I wanted to pnorman's Avatar
    Join Date
    2005-02
    Location
    Calgary
    Posts
    203
    Login to Give a bone
    0

    Default Re: Error message when Dialog Box opens - error to few arguments

    Quote Originally Posted by Lions60
    Thanks very much. I have taken the error checking and other things you added to my program and put them in some other i have been working on. They now run smoother and there is no more messaging popping up in the command line. I appreciate all you have done.
    You're welcome.

    Here is a bit more for you to chew on!

    Regards
    Phill
    Attached Files Attached Files

Page 2 of 2 FirstFirst 12

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. error: too many arguments??
    By tedg in forum AutoLISP
    Replies: 3
    Last Post: 2010-08-31, 02:58 AM
  3. Replies: 8
    Last Post: 2009-10-27, 12:03 PM
  4. error: too many arguments Using IF Function
    By ccruz in forum AutoLISP
    Replies: 1
    Last Post: 2009-08-06, 09:31 PM
  5. Help fix a routine - Error: too few arguments
    By cadd4la in forum AutoLISP
    Replies: 3
    Last Post: 2006-01-10, 06:06 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
  •