Problem with changing the value of an attribute

Discussion in 'AutoCAD' started by Marcel Janmaat, Apr 22, 2004.

  1. Im changing the value of an attribute this way

    (progn (setq el2 (subst (cons 1 ts1) (assoc 1 el2) el2)) (entmod el2)
    (entupd (cdar el2)))

    Sometimes it works an somtimes not. Can someone tell me why?

    The result of subst is okay but entmod and entupd doesn't seem te have
    affect on it.

    MJ
     
    Marcel Janmaat, Apr 22, 2004
    #1
  2. You are likely mixing ActiveX and vanilla AutoLISP (in A2k2 and earlier,
    have not verified in A2k4/5). Search a few years back in this ng on this
    topic for more details.


    --
    R. Robert Bell



    Im changing the value of an attribute this way

    (progn (setq el2 (subst (cons 1 ts1) (assoc 1 el2) el2)) (entmod el2)
    (entupd (cdar el2)))

    Sometimes it works an somtimes not. Can someone tell me why?

    The result of subst is okay but entmod and entupd doesn't seem te have
    affect on it.

    MJ
     
    R. Robert Bell, Apr 22, 2004
    #2
  3. Marcel Janmaat

    ECCAD Guest

    Try:
    (progn
    (entmod (setq el2 (subst (cons 1 ts1) (assoc 1 el2) el2)))
    (entupd el2)
    )

    Bob
     
    ECCAD, Apr 22, 2004
    #3
  4. Marcel Janmaat

    Jeff Mishler Guest

    Are the ones that don't update on locked layers?
     
    Jeff Mishler, Apr 22, 2004
    #4
  5. Marcel Janmaat

    bob.at Guest

    Marcel,

    give the following change a chance:

    (progn (setq el2 (subst (cons 1 ts1) (assoc 1 el2) el2)) (entmod el2)
    (entupd (cdr (assoc -1 el2)))

    bob.at
     
    bob.at, Apr 22, 2004
    #5
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.