Results 1 to 9 of 9

Thread: *error* function bad argument type: stringp nil - from Pull-down menu macro

  1. #1
    Member csiress's Avatar
    Join Date
    2005-06
    Location
    Orlando, Fl
    Posts
    28
    Login to Give a bone
    0

    Default *error* function bad argument type: stringp nil - from Pull-down menu macro

    I have created a pull down menu with this line in it.

    ID_CAS2 LISP [HATCH FIX]^C^C(setenv "MaxHatch" "1000000")

    However, this error occurs: error: An error has occurred inside the
    *error* functionbad argument type: stringp nil

    I am pretty certain that it's the quotation marks around MaxHatch and 1000000.

    How do I fix this? I really don't want to type (setenv "MaxHatch" "1000000") in the command prompt.

    Thank you for your help.

    Craig II
    <><

  2. #2
    The Silent Type Mike.Perry's Avatar
    Join Date
    2000-11
    Posts
    13,656
    Login to Give a bone
    0

    Default Re: *error* function bad argument type: stringp nil - from Pull-down menu macro

    Hi Craig

    Please note I have *moved* this thread from the AutoCAD Tips & Tricks forum to this one, as I feel this particular forum is a more appropriate place for such a topic.

    Thanks, Mike

    Forum Manager

  3. #3
    The Silent Type Mike.Perry's Avatar
    Join Date
    2000-11
    Posts
    13,656
    Login to Give a bone
    0

    Default Re: *error* function bad argument type: stringp nil - from Pull-down menu macro

    Quote Originally Posted by csiress
    I have created a pull down menu with this line in it.

    ID_CAS2 LISP [HATCH FIX]^C^C(setenv "MaxHatch" "1000000")

    However, this error occurs: error: An error has occurred inside the
    *error* functionbad argument type: stringp nil

    I am pretty certain that it's the quotation marks around MaxHatch and 1000000.

    How do I fix this? I really don't want to type (setenv "MaxHatch" "1000000") in the command prompt.
    Hi

    Works for me.

    I Copied and Pasted...

    Code:
    ID_CAS2 LISP [HATCH FIX]^C^C(setenv "MaxHatch" "1000000")
    into a Custom menu file.

    Reloaded the Custom menu file.

    Clicked "HATCH FIX" from the Custom menu pull-down area.

    Environment variable MaxHatch was correctly set to 1000000 ( without any errors reported ).

    Is it possible to post an example menu file ( as an attachment ), that demonstrates the behaviour you see at your end...

    Have a good one, Mike

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,804
    Login to Give a bone
    0

    Default Re: *error* function bad argument type: stringp nil - from Pull-down menu macro

    Quote Originally Posted by csiress
    I have created a pull down menu with this line in it.

    ID_CAS2 LISP [HATCH FIX]^C^C(setenv "MaxHatch" "1000000")

    However, this error occurs: error: An error has occurred inside the
    *error* functionbad argument type: stringp nil
    The error you quoted *error* functionbad argument type: stringp nil occurs because nil was passed to a lisp function expecting a string. It has nothing to do with your menu macro.

    When does this error occur? When the menu is loaded? Check the MNL file.
    If your menu is "custom.mnl", inspect "custom.mnl" for a lisp coding error.
    R.K. McSwain | CAD Panacea |

  5. #5
    Member csiress's Avatar
    Join Date
    2005-06
    Location
    Orlando, Fl
    Posts
    28
    Login to Give a bone
    0

    Smile Re: *error* function bad argument type: stringp nil - from Pull-down menu macro

    Thank you for your help. I had placed the string in the MNS and that was causing the error. I placed the string in the MNU and reloaded and it worked without any issues.

    Again thank you.

    Craig II
    <><

  6. #6
    Member
    Join Date
    2011-08
    Location
    Auburn, CA
    Posts
    18
    Login to Give a bone
    0

    Default Re: *error* function bad argument type: stringp nil - from Pull-down menu macro

    I get something very similar but it happens every time I load CAD. This is what I get:
    ; error: bad argument type: stringp nil
    It doesn't seem to cause any issues but it shows every time I load.

  7. #7
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,100
    Login to Give a bone
    0

    Default Re: *error* function bad argument type: stringp nil - from Pull-down menu macro

    Kevin, when it displays at startup, it means there is a problem routine or function within one of your autolisp startup files.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  8. #8
    Member
    Join Date
    2011-08
    Location
    Auburn, CA
    Posts
    18
    Login to Give a bone
    0

    Default Re: *error* function bad argument type: stringp nil - from Pull-down menu macro

    OK Opie here is the list of commands prior to the error:


    AcroPlot Command Loaded

    AutoCAD menu utilities loaded.
    Loading AcroPlot Commands
    AcroPlot Commands Loaded

    Command: _RIBBON

    Command: COMMANDLINE

    Command: TOOLPALETTES

    Command: properties

    Command: SHEETSET

    Command: Layer

    Command: EXTERNALREFERENCES

    Command:
    Command: ; error: bad argument type: stringp nil

  9. #9
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,804
    Login to Give a bone
    0

    Wink Re: *error* function bad argument type: stringp nil - from Pull-down menu macro

    Quote Originally Posted by LogoKevn View Post
    OK Opie here is the list of commands prior to the error:
    We cannot diagnose with just that info.
    Look at your startup LSP files, such as "acad.lsp", "acaddoc.lsp", "*.mnl" (where * is the name of any menu loaded), etc. Remove them from being loaded one at a time, until the problem goes away.

    More info here.
    R.K. McSwain | CAD Panacea |

Similar Threads

  1. VBALOAD error: bad argument type: stringp nil
    By jpaulsen in forum AutoLISP
    Replies: 5
    Last Post: 2011-11-09, 05:52 PM
  2. Replies: 7
    Last Post: 2010-02-05, 10:33 AM
  3. Replies: 4
    Last Post: 2009-05-22, 05:21 AM
  4. Replies: 8
    Last Post: 2007-01-03, 02:32 PM
  5. Replies: 6
    Last Post: 2006-12-07, 11:42 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
  •