[lisp] entmod and Table
I've got a table (possibly imported). Text style for each cell is redefined and in output of entget there is a pair (7 . "style1") for each cell.
I try to change text style in cells using code like this
(setq enty (entget (car (entsel))) newent nil newstyle "style2" ) (foreach elem enty (if (= (car elem) 7) (setq elem (cons 7 newstyle)) ) (setq newent (append newent (list elem))) ) (entmod newent)
Finally newent contain same data as enty with replaced pairs (7 . "style2"). But entmod don't modify the table in drawing.
What do I do wrong?
Comments
-
I can confirm this issue. You cannot use entmod here. But the vla-setcelltextstyle function works just fine.
0 -
Unfortunately attempt to use (vla-setcelltextstyle) on Linux leads to "error : no function definition VLA-SETCELLTEXTSTYLE"
0 -
I see that this function is not yet included in the 'FAST-COM' implementation. So it is only available in the Windows version. It may be wise to send in a feature request.
This workaround may be worth trying:
- Change the SAVEROUNDTRIP setting to 0 (zero).
- Create a temporary DXF file:
(command "_.dxfout" fileName "_entities" ...)
. - Modify the file programmatically. Note that each table has an attached block definition that also must be modified.
- Insert the DXF and explode the block.
- Erase the original table.
0