CAD Forums > CAD General

dimension prefix delete

(1/2) > >>

ELOQUINTET:
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

daron:
Would two different dimstyles be the answer? It's all I could come up with. ...Or changing it manually for each dimension.

Mark:
this is kinda quick-n-dirty but..........

--- Code: ---(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)
  )

--- End code ---

SMadsen:
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.

ELOQUINTET:
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

Navigation

[0] Message Index

[#] Next page

Go to full version