Author Topic: Field in MTEXT, bug or something wrong  (Read 1229 times)

0 Members and 1 Guest are viewing this topic.

Vandyck

  • Newt
  • Posts: 24
Field in MTEXT, bug or something wrong
« on: September 20, 2014, 11:30:31 AM »
I'm trying to append a Field at the end of mtext string.

When in the mtext string there is a sub string with the same value of the Field, the second time that I append the

Field, the sub string became a Field!!!

try this:
create  mtext like this: "1 xxx yyy zzz"

then set a lisp variable to "xxx" :
(setq test "xxx")

run this code 2 time:
(setq te(car(entsel)))
(setq tx(vla-FieldCode (vlax-ename->vla-object te)))
(vla-put-textstring (vlax-ename->vla-object te) (strcat tx " " "%<\\AcVar.17.0 Lisp.test>%"))

the second time, the first "xxx", becames a Field :-O

(tested with AutoCAD 2013)