What meaning it

Discussion in 'AutoCAD' started by Adesu, Aug 4, 2004.

  1. Adesu

    Adesu Guest

    ; error: bad argument type: lentityp nil

    lentityp nil = last entity type nil .......... >>>is it true or ???
     
    Adesu, Aug 4, 2004
    #1
  2. Adesu,

    this means that you passed an invalid value to a function that expects an ename - in this case you passed a variable with a nil value.
    Try this:

    (entget nil)
    ; error: bad argument type: lentityp nil

    (entget 1)
    ; error: bad argument type: lentityp 1

    entget "ADESU")
    ; error: bad argument type: lentityp "ADESU"

    etc...

    If you need to - you can check that you have the correct variable type with (= (type var) 'ENAME) before allowing your code to continue.

    Peter
     
    petersciganek, Aug 4, 2004
    #2
  3. Adesu

    Adesu Guest

    Hi petersciganek ,thanks a lot
    ename - in this case you passed a variable with a nil value.
    with (= (type var) 'ENAME) before allowing your code to continue.
     
    Adesu, Aug 23, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.