text style

Discussion in 'AutoCAD' started by Michele, Feb 18, 2004.

  1. Michele

    Michele Guest

    how can I select all texts to change the text styles throught lisp?
     
    Michele, Feb 18, 2004
    #1
  2. Michele

    Rudy Tovar Guest

    Vanilla LISP
    ;========
    (setq ss (ssget "x" '((0 . "TEXT"))))

    (setq cn 0)
    (while (setq ename (ssname ss cn))
    (setq d (entget ename)
    d (subst (cons 7 <style>) (assoc 7 d) d)
    )
    (entmod d)
    (setq cn (1+ cn))
    )

    ActiveX
    ;=====
    (setq ss (ssget "x" '((0 . "TEXT"))))

    (setq cn 0)
    (while (setq ename (vlax-ename->vla-object (ssname ss cn)))
    (vla-put-stylename ename <style>)
    (setq cn (1+ cn))
    )
    --

    AUTODESK
    Authorized Developer
    www.Cadentity.com
    MASi
     
    Rudy Tovar, Feb 18, 2004
    #2
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.