this happen to my routine

Discussion in 'AutoCAD' started by caduser, Dec 23, 2003.

  1. caduser

    caduser Guest

    Unterminated Complex Entity
    *Invalid*
     
    caduser, Dec 23, 2003
    #1
  2. caduser

    randy benson Guest

    You have provided insufficient data to diagnose your problem, except to say
    that likely, your routine is failing to complete an entmake of an insert;
    could you maybe post the routine?
     
    randy benson, Dec 23, 2003
    #2
  3. caduser

    caduser Guest

    (defun C:ddat (/ year month day)
    (setvar "cmdecho" 0)
    (setq scl (getvar "dimtxt"))
    (setq sc (/ scl 2))
    (setq pt1 (getpoint "Insert point.."))
    (setq date (getvar "CDATE")
    date (rtos date 2 4)
    year (substr date 3 2)
    month (substr date 5 2)
    day (substr date 7 2)
    )
    (setq date (strcat day "/" month "/" year))
    (command "INSERT" "sdate" pt1 sc sc 0 date)
    (princ)
    )

    --
    Design/Engineering Dept.
     
    caduser, Dec 23, 2003
    #3
  4. caduser

    Paul Turvill Guest

    "Unterminated Complex Entity" could mean there's something wrong with your
    block named "sdate" ... otherwise, your code looks like it should work.
    ___
     
    Paul Turvill, Dec 23, 2003
    #4
  5. caduser

    caduser Guest

    (setvar "attdia" 0)

    --
    Design/Engineering Dept.
     
    caduser, Dec 24, 2003
    #5
  6. caduser

    ECCAD Guest

    Code looks good.
    When I get this message, it is usually caused by a (nil), either in the pt1, sc, or the block i'm inserting has more attributes than I thought it did. (2 maybe?). Re-block with (1) attrib.
    Var sc could be nil. If (= sc nil)(setq sc "0.125")
    Also check / set sc to string value (rtos sc).
    Other than that I don't have a clue.
    Bob
     
    ECCAD, Dec 24, 2003
    #6
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.