Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Edit MTEXT attribute value using lisp issue

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
adsylva
1664 Views, 5 Replies

Edit MTEXT attribute value using lisp issue

I'm having issues with updating an MTEXT attributes value using lisp.

 

If I insert my block (this is a titleblock) and run my lisp routine the MTEXT attribute updates fine.  Once I edit the MTEXT attribute with the MTEXT editor, and then run my lisp routine again, the MTEXT attribute will not update anymore.  All the single line (DTEXT) attributes update fine.  The lisp routine I created has worked for years...this is the first time I've tried it with an MTEXT attribute.

 

Has anyone run into this?

 

 

 

 

Tags (2)
5 REPLIES 5
Message 2 of 6
Lee_Mac
in reply to: adsylva

What method are you using to edit the attribute value in AutoLISP?

 

Simply modifying the ActiveX textstring property for the Attribute Reference should work with both single-line & multiline attributes.

 

Lee

Message 3 of 6
adsylva
in reply to: Lee_Mac

Here is a bit of the code I use

(setq e (subst (cons 1 val) (assoc 1 e) e))
(entmod e)
(entupd blk)


Thanks,
Andrew
Message 4 of 6
Lee_Mac
in reply to: adsylva

As a quick fix, try:

 

(entmod (subst (cons 1 val) (assoc 1 (reverse e)) e))

 

Message 5 of 6
adsylva
in reply to: Lee_Mac

That worked.

 

Thanks very much!

 

Andrew

Message 6 of 6
Lee_Mac
in reply to: adsylva

You're welcome Andrew Smiley Happy

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost