matching text style

Discussion in 'AutoCAD' started by rgraper, Apr 16, 2004.

  1. rgraper

    rgraper Guest

    I have several text styles on my drawing. Is there a way to quickly switch between the styles by picking an item with the desired style? Perhaps a lisp routine?

    Robert
     
    rgraper, Apr 16, 2004
    #1
  2. Ever use the matchprop command?

    between the styles by picking an item with the desired style? Perhaps a lisp
    routine?
     
    Allen Johnson, Apr 16, 2004
    #2
  3. rgraper

    Rudy Tovar Guest

    Try and see if you can write it first...it's quite easy...

    clues:
    Start with 'entsel' return data,assoc 7, then strip,car,cdr,
    value,setvar,textstyle.

    WHALA!!!
    --

    AUTODESK
    Authorized Developer
    www.Cadentity.com
    MASi


    between the styles by picking an item with the desired style? Perhaps a lisp
    routine?
     
    Rudy Tovar, Apr 16, 2004
    #3
  4. ; this is an very old my routine

    (defun C:STYLEAUT ( / ent ent_type ent_styl)
    (while (null ent)
    (setq ent (car (entsel
    "\nSelezionare il testo o l'attributo con lo stile desiderato: "
    )))
    (setq
    ent_type (cdr (assoc 0 (entget ent)))
    ent_styl (cdr (assoc 7 (entget ent)))
    )
    (if ent
    (if (and (/= ent_type "TEXT") (/= ent_type "MTEXT") (/= ent_type
    "ATTDEF"))
    (progn
    (alert
    (strcat "L'entita' non e' un testo o un attributo ma e': "
    ent_type ". ")
    )
    (setq ent nil)
    )
    (progn
    (prompt (strcat "\nStile di testo corrente: " ent_styl ". "))
    (command "_.DTEXT" "_STYLE" ent_styl)
    )
    )
    )
    )
    (princ)
    )

    --
    ________________________________________________

    Marc'Antonio Alessi (TV) Italy
    (strcat "NOT a " (substr (ver) 8 4) " guru.")

    O.S. = XP Pro 2002 Ita - Sp.1
    AutoCAD = 2004 Ita - Sp.1a
    ________________________________________________
     
    Marc'Antonio Alessi, Apr 17, 2004
    #4
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.