hosneyalaa Posted April 4, 2021 Share Posted April 4, 2021 HI ALL I HAVE (NAME ELEMENT AND TEXT ) FROM READING CSV FILE (setq f (open FilePath "r")) (setq ln (read-line f)) (setq ln ("57" "<Entity name: 2cedba90>") ) I WANT TO GIVE ME How do I get rid of ''" "<Entity name: 2cedba90>" >>>>TO >>> <Entity name: 2cedba90> (setq obj (vlax-ename->vla-object <Entity name: 2cedba90> ) (vlax-put obj 'textstring "57") THANKS FOR ALL Quote Link to comment Share on other sites More sharing options...
Stefan BMR Posted April 4, 2021 Share Posted April 4, 2021 ENAMES are not constant over different acad sessions, so even restoring them from text (which is impossible) would be useless. Instead, you should save the handle of the entity as text and restore it with (handent <handle>). _$ e <Entity name: 21f6b3c3a00> _$ (setq h (cdr (assoc 5 (entget e)))) "180408" _$ (handent h) <Entity name: 21f6b3c3a00> 1 Quote Link to comment Share on other sites More sharing options...
Steven P Posted April 4, 2021 Share Posted April 4, 2021 If you are reading it from a CDV file, it should be just a text string? So Help: vl-string-trim (AutoLISP) (autodesk.com) should do the trick. 1 Quote Link to comment Share on other sites More sharing options...
hosneyalaa Posted April 4, 2021 Author Share Posted April 4, 2021 (edited) Stefan BMR THANK YOU IT IS GOOD IDEA THANK YOU Edited April 4, 2021 by hosneyalaa Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.