How to remove an element from a list?

  • Thread starter Thread starter TCEBob
  • Start date Start date
T

TCEBob

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
 
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


TCEBob said:
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
 
Joe, you know I scanned all the way thru the vls and my glazing eyes missed that
one. Thanks much!

rs
 
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
 
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
 
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,

"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
 
Back
Top