Results 1 to 3 of 3

Thread: error in my code

  1. #1
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default error in my code

    Still trying to 'get' cond

    I took a code that worked and editted it to this, just can't get it to run!

    Anyone see my error? Please don't fix for me, I want to learn from my mistakes!

    Code:
    (defun c:ffd (/ inp) ;define command
    (/ inp )
        (initget "English Metric") ; ask for input
      (setq Inp (getkword "\nWhat are the units of measure? [English/Metric] <English>: "))
      (or Inp (setq Inp "English")
          )
      )
      
      
    (cond
    ((= inp "English")
    (load "C:\\home\\work\\dennis\\Lisp\\lisp routines\\flush floor duct pline hatch.LSP")
    (C:ffplh)
    )
    ((= inp "Metric")
    (load "C:\\home\\work\\dennis\\Lisp\\lisp routines\\metric lisp\\M flush floor duct pline hatch.LSP")
    (C:mffplh)
    )
    )

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: error in my code

    Look at the top of your code... the first two lines.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  3. #3
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default Re: error in my code

    Quote Originally Posted by RobertB View Post
    Look at the top of your code... the first two lines.
    deleted extra
    Code:
    (/ inp)
    removed
    Code:
    )
    after
    Code:
    (or Inp (setq Inp "English")
    added
    Code:
    )
    to end of code

    works fine now thanks Robert, an extra set of eyes never hurts

    Code:
    (defun c:ffd (/ inp) ;define command
    
        (initget "English Metric") ; ask for input
      (setq Inp (getkword "\nWhat are the units of measure? [English/Metric] <English>: "))
      (or Inp (setq Inp "English")
          )
      
      
    (cond
    ((= inp "English")
    (load "C:\\home\\work\\dennis\\Lisp\\lisp routines\\flush floor duct pline hatch.LSP")
    (C:ffplh)
    )
    ((= inp "Metric")
    (load "C:\\home\\work\\dennis\\Lisp\\lisp routines\\metric lisp\\M flush floor duct pline hatch.LSP")
    (C:mffplh)
    )
    )
      )

Similar Threads

  1. Replies: 1
    Last Post: 2012-11-12, 11:12 PM
  2. error code bypass?
    By andreasen_michael_jon in forum VBA/COM Interop
    Replies: 7
    Last Post: 2008-01-10, 08:35 PM
  3. Sample code Error
    By r.vetrano in forum Revit - API
    Replies: 2
    Last Post: 2007-07-09, 11:42 AM
  4. unknown error code 203
    By CASEYNEELS in forum AutoCAD Plotting
    Replies: 2
    Last Post: 2005-11-07, 11:02 PM
  5. ERROR CODE
    By LABELED1US in forum AutoCAD Map 3D - General
    Replies: 3
    Last Post: 2005-03-19, 03:57 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
  •