Change width property of text

Discussion in 'AutoCAD' started by ajm, Aug 3, 2004.

  1. ajm

    ajm Guest

    How do you programmatically change the width property of a set of text objects after securing them in a list thus :
    (setq ss1 (ssget "X" '((0 . "TEXT") (-4 . "/=") (41 . 0.8)))) ;selects ALL text NOT 0.8 width factor

    T.I.A.
    Andrew McDonald
     
    ajm, Aug 3, 2004
    #1
  2. ajm

    Joe Burke Guest

    Andrew,

    You could use entmod, but this is easier... IMO.

    (setq cnt 0)
    (if ss1
    (repeat (sslength ss1)
    (setq obj (vlax-ename->vla-object (ssname ss1 cnt)))
    (vlax-put obj 'ScaleFactor 0.8) ;whatever
    (setq cnt (1+ cnt))
    )
    )
    (princ (strcat "\nNumber of objects modified: " (itoa cnt)))

    Joe Burke
    after securing them in a list thus :
     
    Joe Burke, Aug 3, 2004
    #2
  3. ajm

    OLD-CADaver Guest

    Just a note: If you're changing all the text to the same width, it is unnecessary to separate those that are from those that aren't unless you just want to know. Changing the width from 0.8 to 0.8 is unharmful.
     
    OLD-CADaver, Aug 3, 2004
    #3
  4. Unless you have a million pieces of text.

    unnecessary to separate those that are from those that aren't unless you
    just want to know. Changing the width from 0.8 to 0.8 is unharmful.
     
    Alan Henderson @ A'cad Solutions, Aug 3, 2004
    #4
  5. ajm

    OLD-CADaver Guest

    <<Unless you have a million pieces of text. >>

    Makes no difference if you have to wade through them all anyway to find those that aren't already 0.8 wide.
     
    OLD-CADaver, Aug 4, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.