Jump to content
Costinbos77

Problems with text overlapping

Recommended Posts

Costinbos77

Hi there,

 

When reporting in Autocad, a file with points of the form: name, north, east, height, code, ... etc.

if distances between points are small, texts name and height point, overlap. How to detect and how to avoid these overlaps.

 

Texts overlapping.jpg

Edited by Costinbos77

Share this post


Link to post
Share on other sites
notview

Select all the text and change the text height into smaller..

Share this post


Link to post
Share on other sites
Costinbos77

This is not a solution, I need to be writing with specific height.

Edited by Costinbos77

Share this post


Link to post
Share on other sites
MSasu

You may try to write a routine to check for those overlaps and adjust the labels alignment accordingly - check the TEXTBOX function for this. Also, I know that Lee Mac had a nice assortment of functions for intersections between items, so may try to adapt one of those.

Share this post


Link to post
Share on other sites
Organic

I've searched previously for solutions to this exact problem and was never able to find one that does even a half decent job. I find it just has to be done manually by someone (which might take 2 days if you have 3000 points with annotation etc). Make sure you try to configure your survey/civil software output as much as you can to reduce the workload of the drafter who has to tidy up the output so the text entities do not overlap.

Share this post


Link to post
Share on other sites
BIGAL

This problem is not new I wont say how old I am but 30+ years doing this, if its out of CIV3d then you can only play with the limitation of the point styles do you really need to display all the info ? You can rotate a single points label this may help but is still manual I may write a change pt label angle by picking multi pts I figured out how on another post but the original author stopped asking for help so I stopped also.

Share this post


Link to post
Share on other sites
miha

Hello,

has anyone already solved the problem?

Share this post


Link to post
Share on other sites
Costinbos77

We can ask BigAl to share his starting idea and to continue from there .

 

My idea is to :

1. arrange the points list by E or N E1 < E2 < ... < En ;

2. calculate the distance between closest points and if it is smaller then text dimension , then rotate the last one with 180° , or change the justify of text .

But is maybe 50% right , after 1 iteration . 

 

Maybe after few iterations , will be better .

 

See what 'Organic' said .

Points in AutoCAD.jpg

 

I am using a manual tool to move / arrange the texts / attributes around the point  and if it is necessary , to make the attributes invisible .

 

Edited by Costinbos77

Share this post


Link to post
Share on other sites
BIGAL

The term fuzzy logic comes into play, some software does this but not Civ3D, the problem is you move or rotate 1 then it hits another, so need idea 3 and go to leader moving away, like constinboss77 for years have just lived with it and played with the text when needed. It is not just points and hts etc but station control tbms etc set to readable and see what happens when between a layout and the next rotate ucs 90, so roads plotted horizontal on every sheet, had to find an average spot so could read on say 2 layouts.

Share this post


Link to post
Share on other sites
Costinbos77

Yes , at the end is not really a problem . 

Points in AutoCAD 31.jpg

1. Leader solution can be considered if it is enough space around to play ;

 

2. or , if it is really to busy , hide the text and keep the point symbol ;

Points in AutoCAD 32.jpg

But , I am doing this only in manual way  (point by point ) . Unfortunately , not all the tasks can be solved automatically

 

The problem is the scale of points is not correlated with the density of survey , because usually , the distance on the paper at any scale between 2 point is  20 mm .

And in this example , this rule was omitted . 

 

But , i don't know if 'miha' is asking exactly for this problem or a general overlay  between texts on a drawing .

 

Edited by Costinbos77

Share this post


Link to post
Share on other sites
hosneyalaa

HI

Try this LISP

 

;;; https://www.cadtutor.net/forum/topic/69621-replace-user-specified-value-in-any-attribute-with-lisp/
(vl-load-com)

;; Get Attribute Values  -  Lee Mac
;; Returns an association list of attributes present in the supplied block.
;; blk - [ent] Block (Insert) Entity Name
;; Returns: [lst] Association list of ((<tag> . <value>) ... )
;; http://www.lee-mac.com/attributefunctions.html#algetattributevaluerc
(defun LM:getattributevalues ( blk / enx )
    (if (and (setq blk (entnext blk)) (= "ATTRIB" (cdr (assoc 0 (setq enx (entget blk))))))
        (cons
            (cons
                (cdr (assoc 2 enx))
                (cdr (assoc 1 (reverse enx)))
            )
            (LM:getattributevalues blk)
        )
    )
)


(defun c:test ( / from to ss i atts blk a tag val newval)
   ;;(setq from "AZERTY")
  ;;(setq to "QUERTY")
  (setq ss (ssget (list (cons 0 "INSERT") )))
  (setq i 0)
  (setq ix 0)
  (repeat (sslength ss)
    (setq blk (ssname ss i))
     (setq pt (cdr (assoc 10 (entget blk))))
    (setq atts (LM:getattributevalues blk))
    (foreach a atts
;;;      (setq A (car atts))
;;;      (setq tag (car a))
      (setq val (cdr a))
      
      (entmakex (list (cons 0 "TEXT")
                  (cons 10  (list (car pt) (- (cadr pt)  ix)))
          (cons 62 3)
                  (cons 40 0.05)
         (cons 8 "01-text")
                 (cons 1  val))

)
      (setq ix (+ ix 0.1))
    )
    (setq ix 0)
    (setq i (+ i 1))
  )
  (princ)
)
 

Share this post


Link to post
Share on other sites
BIGAL

hosneyalaa the post is about overlapping text a common problem with field surveys for Civil design when displaying information about a point.

Edited by BIGAL
  • Thanks 1

Share this post


Link to post
Share on other sites
Costinbos77

Hi hosneyalaa ,

 

the post is not for extracting / converting Attributes to Texts , is to avoid this overlay of Attributes / Texts .

  • Thanks 1

Share this post


Link to post
Share on other sites
rlx

you all make it sound like its a bad thing not all things can be done automatically but think about this : who still needs you when everything can be done automatically 😁

Share this post


Link to post
Share on other sites
Costinbos77

Good point of view rlx , 

 

but my problem is , i need to work more to compensate this deficiency . This topic is just a faze on a task is not the final product .

 

Anyway , it is a lot of work even we are using this automatic processes (by AutoLisp / Visual Lisp / arx / .net) .

 

Thanks for encouragement !

Share this post


Link to post
Share on other sites
rlx

I understand Costinbos77. I never worked with Civ3D so I'm not sure if you have any control how these points are placed. But maybe another approach could be to put all points back in a list , delete them and use a lisp routine to place them back , but this time the routine can check for a free parking spot before the point is placed. Just thinking aloud... good luck with finding a solution

Share this post


Link to post
Share on other sites
Costinbos77

I am not working with Civil3D as well , but BigAl said :

 

On 2/11/2020 at 3:54 AM, BIGAL said:

The term fuzzy logic comes into play, some software does this but not Civ3D, the problem is you move or rotate 1 then it hits another, ....

 

So , back to work .

 

Edited by Costinbos77

Share this post


Link to post
Share on other sites
BIGAL

Hi rlx "check for a free parking spot" one of the problems is that once you start moving the text it loses its relationship with the point, when its generated its say 1 right and 1 up from a point, so if you start moving the text around suddenly the value now seems to refer to another point, when working with z's this can have consequences. If moving need almost a leader approach.

 

My $0.05 turn them all off and what I did was to click critical points and write the Z next to it, this was mainly for road and surface gradings where you had to match an existing point level. So I would end up with very few labels. I have write a CIV3d COGO and a ACAD point as they are different method to get Z. I put on a layer so can turn off etc. Can post if wanted.

 

Lastly some software matches the decimal for the point location so over top of point.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...