Adding a preset unit to DIMS

Discussion in 'AutoCAD' started by gregy, Mar 4, 2004.

  1. gregy

    gregy Guest

    Is there a way to add say 6" to all the dims in a drawing? I just want to override the default values and update them.
     
    gregy, Mar 4, 2004
    #1
  2. gregy

    ECCAD Guest

    Greg,
    In a recent NG thread, we did that. The instance was a 'block' inserted with an attribute, and we extracted them, modifying the value by adding 6". If I read the post correctly, you want to change all the Dims (do you mean MTEXT / TEXT values ?),
    if so, I can post a sampler.

    Bob
     
    ECCAD, Mar 4, 2004
    #2
  3. gregy

    gregy Guest

    These are regular dimensions that have the default <> values. Now I need to override some values to add 6" to them. ie. The object is 1'-0" long now and I dont want to edit the object just "force" the dimension to say 1'-6". There are a lot of dims so I dont want to edit them 1 at a time.

    Thanks.
     
    gregy, Mar 4, 2004
    #3
  4. gregy

    Jeff Mishler Guest

    Here's one that will let you select which ones to modify. Typing "all"
    will get all of them. Enter the amount to add to the actual measurement,
    a negative will be substracted. Only dim's with the default text are
    edited.

    HTH,
    Jeff

    (defun c:dim_add (/ num ss count ent)
    (vl-load-com)
    (setq num (getreal "\nEnter number to add to dimensions: "))
    (if (setq ss (ssget '((0 . "*DIM*"))))
    (progn
    (setq count -1)
    (while (< (setq count (1+ count))(sslength ss))
    (setq ent (vlax-ename->vla-object (ssname ss count)))
    (if (= (vla-get-textoverride ent) "")
    (progn
    (vla-put-textoverride ent
    (strcat (vla-get-TextPrefix ent)
    (rtos (+ (vla-get-measurement ent) num))
    (vla-get-TextSuffix ent)
    )
    )
    )
    )
    )
    )
    )
    (princ)
    )


    need to override some values to add 6" to them. ie. The object is
    1'-0" long now and I dont want to edit the object just "force" the
    dimension to say 1'-6". There are a lot of dims so I dont want to edit
    them 1 at a time.
     
    Jeff Mishler, Mar 4, 2004
    #4
  5. gregy

    gregy Guest

    Works GREAT! Thanks a ton Jeff!

    Greg
     
    gregy, Mar 5, 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.