Changing all dimension entites to a certain dimstyle

Discussion in 'AutoCAD' started by John Carr, May 13, 2004.

  1. John Carr

    John Carr Guest

    I have been looking through messages in this group to find a program to
    change all dimension & leader entities to our standard dimension style. The
    lisp code below changes "SLDDIMSTYLE1" to the current dimstyle (which works)
    but there are sometime up to 10 different styles.

    Can someone modify my attempts or point me in the right direction to select
    all dimension entites

    (setq dst_data (entget (tblobjname "DIMSTYLE" "SLDDIMSTYLE1")))
    (entmod (subst '(40 . 10.0) (assoc 40 dst_data) dst_data))

    Thanks
    John
     
    John Carr, May 13, 2004
    #1
  2. John Carr

    bob.at Guest

    John,

    to step throu all dimensions in the dimstyle table you must use a loop:

    (setq dst_data (tblnext "DIMSTYLE" T))
    (while dst_data
    (entmod (subst '(40 . 10.0) (assoc 40 dst_data) dst_data))
    (setq dst_data (tblnext "DIMSTYLE"))
    )

    But your entmode only changes the DIMSCALE to 10!

    bob.at
     
    bob.at, May 13, 2004
    #2
  3. John Carr

    John Carr Guest

    Thanks for the reply, how to I change all DIMENSION and LEADER entities to
    our standard dimension style which is "le_standard"

    Thanks again
    John
     
    John Carr, May 13, 2004
    #3
  4. John Carr

    Paul_M Guest

    ??
    your question it already answerd -->> (entmod (subst '(40 . 10.0) (assoc 40
    dst_data) dst_data))
     
    Paul_M, May 13, 2004
    #4
  5. John Carr

    Doug Broad Guest

    1. set the desired dimstyle current via ddim or dim style
    2. dim update all exit
     
    Doug Broad, May 13, 2004
    #5
  6. John Carr

    Jamie Duncan Guest

    Or using null:

    (while (setq dst_data (tblnext "DIMSTYLE" (null dst_data)))
    (entmod (subst '(40 . 10.0) (assoc 40 dst_data) dst_data))
    )


    Jamie Duncan
     
    Jamie Duncan, May 13, 2004
    #6
  7. John Carr

    bob.at Guest

    There is no moment in my life where I cant learn something new!
    ... very nice method to do this while loop, thanks Jamie

    bob.at
     
    bob.at, May 13, 2004
    #7
  8. John Carr

    Jamie Duncan Guest

    well yeah,

    but that is too easy!


    Jamie Duncan
     
    Jamie Duncan, May 13, 2004
    #8
  9. John Carr

    Doug Broad Guest

    <grin>
     
    Doug Broad, May 14, 2004
    #9
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.