TheSwamp

CAD Forums => CAD General => Topic started by: ELOQUINTET on October 30, 2003, 02:45:45 PM

Title: dimension prefix delete
Post by: ELOQUINTET on October 30, 2003, 02:45:45 PM
hey all i have a drawing who's dimstyle units are set to fractional with an inch suffix added so it reads 60" rather than 5'-0". the problem is when i do angular dimensions i get 60 degrees". can someone help me with a lisp that will delete a dimension's suffix by clicking it. or maybe suggest something else. thanks

dan
Title: dimension prefix delete
Post by: daron on October 30, 2003, 03:00:26 PM
Would two different dimstyles be the answer? It's all I could come up with. ...Or changing it manually for each dimension.
Title: dimension prefix delete
Post by: Mark on October 30, 2003, 03:06:11 PM
this is kinda quick-n-dirty but..........
Code: [Select]
(defun MST-entsel-obj (msg / ent obj)
  (vl-catch-all-apply
    (function
      (lambda ()
        (and
          (equal (type msg) 'STR)
          (setq ent (entsel msg))
          (setq obj (vlax-ename->vla-object (car ent)))
          ); and
        )
      )
    )
  obj
  ); defun

(defun MST-release (obj /)
  (if
    (= (type obj) 'VLA-OBJECT)
    (if (not (vlax-object-released-p obj))
      (vlax-release-object obj)
      )
    )
  )

(defun c:remove-suffix (/ dim-al)

  (setq dim-al (MST-entsel-obj "\nSelect A Dimension Line..."))
  (if dim-al
    (progn
      (vlax-put-property dim-al 'TextSuffix "")
      (MST-release dim-al)
      )
    )
  (princ)
  )
Title: dimension prefix delete
Post by: SMadsen on October 30, 2003, 03:22:23 PM
One could also create an angular child of the dimstyle .. but somehow it seems that pre-/suffix's are locked for angular children?? Never knew that.
It can be changed afterwards by modifying code 3 in the table entry, though.
Title: dimension prefix delete
Post by: ELOQUINTET on October 30, 2003, 03:46:50 PM
i know i could create another dimstyle and change it maually but i don't want to do either just want to be able to click on the angular dim and have the inch disappear. haven't tried yours yet mark but i'll let you know how it goes. thanks everyone. ps-is it just me or am i the only one posting anything here. thanks guys

dan
Title: dimension prefix delete
Post by: ELOQUINTET on October 30, 2003, 04:00:12 PM
mark works great i love you man :lol:

dan
Title: dimension prefix delete
Post by: daron on October 30, 2003, 04:39:15 PM
Quote from: eloquintet
is it just me or am i the only one posting anything here. thanks guys

dan


We're waiting for you to invite all your friends.
Title: dimension prefix delete
Post by: Dent Cermak on October 30, 2003, 04:55:19 PM
Both of them.   :oops:
Title: dimension prefix delete
Post by: Mark on October 30, 2003, 05:05:57 PM
Quote from: eloquintet
mark works great i love you man :lol:
dan

ah shucks ...........  

you're welcome Dan.