Author Topic: How to avoid overlap in dim text?  (Read 1221 times)

0 Members and 1 Guest are viewing this topic.

HasanCAD

  • Swamp Rat
  • Posts: 1421
How to avoid overlap in dim text?
« on: October 26, 2015, 02:25:22 PM »
Hi all
I Modified LEE code to match my needs but in some cases the text overlapped.
is there a way to avoid this overlap?
Code - Auto/Visual Lisp: [Select]
  1. (while (and (setq p22 (getpoint "\nPick Column Corner Point: "))
  2.                   (setq p1 (getpoint "\nPick Axes Crossing Point: "))
  3.                   (setq p2 (getcorner p22 "\nPick opposite Corner Point: ")))
  4.         (setq uFlag (not (vla-StartUndoMark doc)))
  5.  
  6.         (mapcar '(lambda ( a b ) (apply (function vla-AddDimRotated)
  7.                      (append (list spc)
  8.                              (mapcar (function vlax-3D-point) a)
  9.                              b
  10.                      ))
  11.                    )
  12.                 (list
  13.                   (list (setq  p3 (list (car p1) (cadr p2) (caddr p1))) p2 (polar p3 (angle p1 p3) (* Dwgscl 5)))
  14.                   (list p2      (setq  p4 (list (car p2) (cadr p1) (caddr p1))) (polar p4 (angle p1 p4) (* Dwgscl 5)))
  15.                   (list (setq  p5 (list (car p22) (cadr p2) (caddr p22))) (list (car p1) (cadr p2) (caddr p22)) (polar p5 (angle p22 p5) (* Dwgscl 5)))
  16.                   (list (list (car p2) (cadr p1) (caddr p1)) (setq  p6 (list (car p2) (cadr p22) (caddr p22)))  (polar p6 (angle p22 p6) (* Dwgscl 5)))
  17.                   (list (setq  p7 (list (car p22) (cadr p2) (caddr p22))) p2 (polar p7 (angle p22 p7) (* Dwgscl 10)))
  18.                   (list p2      (setq p8 (list (car p2) (cadr p22) (caddr p22))) (polar p8 (angle p22 p8) (* Dwgscl 10)))
  19.                   )
  20.                 (list
  21.                   '(0.)
  22.                   (list (/ pi 2.))
  23.                   '(0.)
  24.                   (list (/ pi 2.))
  25.                   '(0.)
  26.                   (list (/ pi 2.))
  27.                   )
  28.                 )
  29.         (setq uFlag (vla-EndUndoMark doc)))

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: How to avoid overlap in dim text?
« Reply #1 on: October 27, 2015, 04:33:29 AM »
Use a different dimstyle (change DIMTIX) and pay attention to the order of the dimpoints.
The order of the dimpoints controls whether the text is moved to the left or to the right.

HasanCAD

  • Swamp Rat
  • Posts: 1421
Re: How to avoid overlap in dim text?
« Reply #2 on: October 27, 2015, 07:10:31 AM »
Is there a way to get text coordinate?

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: How to avoid overlap in dim text?
« Reply #3 on: October 27, 2015, 07:21:32 AM »
Check groupcode 11 or the TextPosition property.