vanowm Posted September 20, 2015 Posted September 20, 2015 Hello. I just noticed something strange, in all documentations it says that tag string in ATTDEF cannot contain spaces, however once created I can add spaces via properties window. How can I achieve the same within autolisp? I've tried entmod, it would not accept spaces: (SETQ test (ENTGET (ENTMAKEX (LIST '(0 . "ATTDEF") ;Entity type '(1 . "Value text can have spaces") ;value '(2 . "Tag_text_cannot_have_spaces") ;tag '(3 . "Prompt text can have spaces") ;prompt '(10 0 0 0) ;Text first base point '(40 . 6) ;Text height '(70 . 0) ;Attribute flag ) ) ) ) (PRINT test) (SETQ test (ENTMOD (SUBST (CONS 2 "tag with spaces") (ASSOC 2 test) test))) (PRINT test) Also, is there a settings that makes newly created attdef tag in upper case? Thank you. Quote
BlackBox Posted September 20, 2015 Posted September 20, 2015 Same issue with Attribute populated via Sheet Set Manager (SSM) Fields - adding spaces before / after within the SSM Property is ignored (even stripped), but manually editing the Attribute value to add spaces before / after SSM Field value works. Grrr Quote
vanowm Posted September 20, 2015 Author Posted September 20, 2015 Seems like vlax-put-property works fine with changing ATTDEF tag to lower case with spaces: (SETQ test (ENTMAKEX (LIST '(0 . "ATTDEF") ;Entity type '(1 . "Value text can have spaces") ;value '(2 . "Tag_text_cannot_have_spaces") ;tag '(3 . "Prompt text can have spaces") ;prompt '(10 0 0 0) ;Text first base point '(40 . 6) ;Text height '(70 . 0) ;Attribute flag ) ) ) (PRINT (ENTGET test)) (ENTMOD (SUBST (CONS 2 "tag with spaces via entmod") (ASSOC 2 (ENTGET test)) (ENTGET test))) (PRINT (entget test)) (vlax-put-property (vlax-ename->vla-object test) 'TagString "tag with spaces via vlax-put-property") (print (entget test)) Quote
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.