Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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))

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...