How to remove an element from a list?

Discussion in 'AutoCAD' started by TCEBob, Jul 31, 2004.

  1. TCEBob

    TCEBob Guest

    In particular an entity list. If I try to change a text object to the appearance of an mtext object, it may be that the text object
    has an association 51, which is the oblique angle. Mtext objects have no oblique angle so I must remove the association 51 from the
    text object. (I can't set it to 0 because that will override the style.)

    I tried substituting a dummy, like (555 . 0), but entmod won't buy it. I suppose I could repeat a previous association but that
    sounds lame.

    rs
     
    TCEBob, Jul 31, 2004
    #1
  2. TCEBob

    Joe Burke Guest

    Bob,

    Command: (setq remove (assoc 51 entlst))
    (51 . 0.0)

    Command: (vl-remove remove entlst)
    ((-1 . <Entity name: 7ef6cc78>) (0 . "TEXT") (330 . <Entity name: 7ef67c10>) (5
    .. "DEAF") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "xref") (100 .
    "AcDbText") (10 30.555 118.345 0.0) (40 . 1.0) (1 . "STL ANGLE") (50 . 0.0) (41
    .. 0.7) (7 . "ArchD") (71 . 0) (72 . 0) (11 0.0 0.0 0.0) (210 0.0 0.0 1.0) (100
    .. "AcDbText") (73 . 0))

    Joe Burke


    an mtext object, it may be that the text object
    angle so I must remove the association 51 from the
    could repeat a previous association but that
     
    Joe Burke, Jul 31, 2004
    #2
  3. TCEBob

    TCEBob Guest

    Joe, you know I scanned all the way thru the vls and my glazing eyes missed that
    one. Thanks much!

    rs
     
    TCEBob, Aug 1, 2004
    #3
  4. TCEBob

    TCEBob Guest

    Bummer. vl-remove works fine. But the fine print in dxf says 51
    Oblique angle (optional; default = 0)


    So now I have to go look at the style table.

    Oh, well, beats going out on Saturday night and having fun.

    rs
     
    TCEBob, Aug 1, 2004
    #4
  5. TCEBob

    Joe Burke Guest

    Hi Bob,

    You're welcome.

    I'm not exactly sure what you trying to do. Maybe if you explain a bit more, or post
    your code, someone can help.

    Joe Burke
     
    Joe Burke, Aug 1, 2004
    #5
  6. TCEBob

    John Uhden Guest

    Yes you can alter the width and obliquing angle of MTEXT.
    You might enjoy the attached. I certainly did.
    You could change the approach to use a selection set.
     
    John Uhden, Aug 1, 2004
    #6
  7. TCEBob

    TCEBob Guest

    John,

    "A few embellishments," indeed!

    I can see that you did have fun with it. Haven't actually loaded it and put it
    to work but I will this evening.

    I was considering wading in with formatting strings. But I'll change my
    statement: "You can't oblique mtext using dxf codes."

    Thanks for the code -- and the lesson. I had started to use a selection set but
    removed those lines for publication and so I could use the routine right away.
    The while loop works pretty well, though.

    rs
     
    TCEBob, Aug 1, 2004
    #7
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.