I want to write a routine to toggle the background mask for a multi-line attribute on and off based on whether the attribute has a value or is just an empty string. (The problem is that an empty string still has a background mask which covers up whatever it's on top of.)
I can add a background mask with this code:
(setq entlist (entget (car (nentsel "Select Attribute: "))))
(setq entlist (append entlist (list (cons 90 3) (cons 63 256) (cons 45 1.15) (cons 441 0))))
(entmod entlist)
I figured I could then remove the background mask of a selected attribute by adding every element of its entget list to a new entget list except for the DXF 63, 45 & 441 dotted pairs and setting the DXF 90 dotted pair to 2. Even though this new list is identical to the entget list for an attribute without a background mask (I checked this using UltraCompare), the entmod fails.
If anyone has any ideas I would really appreciate it.