Dimstyle changing the associated text style

Discussion in 'AutoCAD' started by Marcel Goulet, Jul 26, 2004.

  1. Hi,

    I need, using lisp, to change the text style associate to a dimstyle.

    I don't find the good dxf code.

    Thanks
     
    Marcel Goulet, Jul 26, 2004
    #1
  2. Marcel Goulet

    Tom Smith Guest

    Code 340 is a pointer to the style table listing of the text style.
     
    Tom Smith, Jul 26, 2004
    #2
  3. Marcel Goulet

    ECCAD Guest

    Here is a routine by Eric Schneider -
    (defun chg_dimstyle (newstyle / entdat SS1)
    (if
    (and
    (tblsearch "dimstyle" newstyle)
    (setq SS1 (ssget "x" (list '(-4 . "<AND")'(0 . "DIMENSION")'(-4 .
    "<NOT")(cons 3 newstyle)'(-4 . "NOT>")'(-4 . "AND>"))))
    )
    (while (ssname SS1 0)
    (setq entdat (entget (ssname SS1 0))
    SS1 (ssdel (cdr (assoc -1 (entget (ssname SS1 0)))) SS1)
    )
    (entmod (subst (cons 3 newstyle)(assoc 3 entdat) entdat))
    )
    (princ "\nDimension style does not exist or no dimensions need to be
    modified.")
    )
    (princ)
    )


    Bob
     
    ECCAD, Jul 26, 2004
    #3
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.