Author Topic: dimension prefix delete  (Read 8674 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
dimension prefix delete
« 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

daron

  • Guest
dimension prefix delete
« Reply #1 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.

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
dimension prefix delete
« Reply #2 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)
  )
TheSwamp.org  (serving the CAD community since 2003)

SMadsen

  • Guest
dimension prefix delete
« Reply #3 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.

ELOQUINTET

  • Guest
dimension prefix delete
« Reply #4 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

ELOQUINTET

  • Guest
dimension prefix delete
« Reply #5 on: October 30, 2003, 04:00:12 PM »
mark works great i love you man :lol:

dan

daron

  • Guest
dimension prefix delete
« Reply #6 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.

Dent Cermak

  • Guest
dimension prefix delete
« Reply #7 on: October 30, 2003, 04:55:19 PM »
Both of them.   :oops:

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
dimension prefix delete
« Reply #8 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.
TheSwamp.org  (serving the CAD community since 2003)