Jump to content

Recommended Posts

Posted
Thanks all :thumbsup:

Yes Jack, overlapping polylines and lines is the main issue.

 

Ahh, now I think I understand.

Is there a good reason for the overlapping geometry, perhaps the solution would be as simple as cleaning up geometry. (in my work I would not see overlapping geometry)

or

Maybe someone could write a routine to place points at the endpoints of all geometry and place those points on a layer to easily hide when not needed.

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

  • ReMark

    9

  • f700es

    4

  • Jack_O'neill

    4

  • jrn

    4

Posted
(In best Darth Vader voice from Ep. 3)

 

 

Noooooooooooooooooooooooooooooo!

VI

(shakes fist in air about Lucas)

Posted

I'd clean up the mess using the OVERKILL command (Express Tools) then I'd give the creator of the drawing a good slap in the back of the head just on principle.

Posted
Thanks all :thumbsup:

Yes Jack, overlapping polylines and lines is the main issue.

What I coud use is to to select a specific line or polyline and by some function highlight the endpoints until pressing esc. or something...

Why?... To distinguish specific points from other endpoints on overlapping lines WHILE drawing additional lines and polylines (of course with use of osnaps).

 

Ok, now we're getting somewhere. If all these overlapping bits are necessary, and not the result of sloppy drafting techniques, then the logical way to handle it would be to put them on different layers. That would allow you to freeze the ones you don't need to work with at the moment. If it is just a collection of clutter, then yes, use the "overkill" command and follow the other suggestions above for avoiding the creation of such clutter in the future.

 

I see a lot of that sort of stuff, and have wondered if there are cad programs out there that automatically join overlapping lines. I've never seen one that does, but my exposure is somewhat limited. I see lots of drafters though that will copy a line from somewhere to a new location. The copied line is too short, so instead of stretching it over, or extending it or whatever, he draws a new line from the endpoint to where it needs to go, or worse, copies again so that the two lines overlap. It would have taken less time and effort to draw a new line the right length in the first place than to copy and edit. The only explanation I could come up with was that maybe a different system fixes that mess automatically.

 

Drawing like that makes filesizes unnecessarily large, it makes dimensioning a nightmare, and will make hatches (troublesome in Autocad on the best day) go crazy.

Posted

The only fix is to do it right in the first place. Drawing lines such that one overlaps the other is just plain sloppy workmanship in my opinion. Harsh? Yes. But we all ought to have higher standards if we want to call ourselves professionals.

 

That concludes our public service announcement. Now back to our regular programming.

Posted

All the overlapping are necessary and may not even be changed in this process.

 

The overlapping lines are part of a three dimensional basis drawing, created on site, with help from a total station (advanced theodolite). This survey / basis drawing is used in multiple files (as xref) by several colleagues on a interdisciplinary level.

In the specific drawing where I wish to have the function called for, is created a 2D Section/Elevation with Bldg Section Line. Upon this is drawn the actual construction drawing that will in the end be handed over to the craftsmen. It's in this last part the function could be helpfull. But if it isn't there, well...

 

(I came here seeking knowledge, not opinions ;) - but off course I respect your standpoints. I wish I had the opportunity to invite you to see the building projects i'm involved in. It's not rocket science, but it's not come il faut and absolutely quite advance though.)

Posted

What method was used to "flatten" the drawing in the first place? Could there be a solution that does not create overlapping lines?

Posted
All the overlapping are necessary and may not even be changed in this process.

 

The overlapping lines are part of a three dimensional basis drawing, created on site, with help from a total station (advanced theodolite). This survey / basis drawing is used in multiple files (as xref) by several colleagues on a interdisciplinary level.

In the specific drawing where I wish to have the function called for, is created a 2D Section/Elevation with Bldg Section Line. Upon this is drawn the actual construction drawing that will in the end be handed over to the craftsmen. It's in this last part the function could be helpfull. But if it isn't there, well...

 

(I came here seeking knowledge, not opinions ;) - but off course I respect your standpoints. I wish I had the opportunity to invite you to see the building projects i'm involved in. It's not rocket science, but it's not come il faut and absolutely quite advance though.)

 

You get more knowledge and better quality opinions when you give a complete description of your problem early on. Here we are 26 posts into the discussion and you are just now explaining why all of the suggestions given won't work. Had you simply said that you wanted to be able to see the endpoints because the geometry overlaps, and that it was necessary for it do so and you couldn't change that, the discussion would have taken a completely different track. Somebody would have probably asked why you couldn't change it, but that is to be expected. Out of 100 people who would ask the same question you did in your first post, I'd bet 99 of them are suffering from the things we guessed at for you. The cure for not seeing endpoint for those 99 people is to not allow bad drafting practices to create the problem in the first place. Its the old problem of the guy that goes to the doctor because his thumb hurts. Doc gives him a pain pill and sends him on his way. Couple days later he comes back complaining that the pain pill didn't work, his thumb still hurts. Several visits later they finally get down to the problem...they guy is a roofer and keeps hitting his thumb with a hammer. The answer was not in medicine, it's "don't hit your thumb, dummy".

 

Now that you've made it clear that the overlapping geometry is by design and necessary, here's a suggestion for you. I can't do this as I'm no programmer, but some of the guys here are quite good with lisp programming. Perhaps one of them could write you a routine that would create a new layer with a unique color (so yo can see it easily) and that will go through and draw small circles or some other shape at each endpoint it finds. You would need to provide the person creating this with the color you want and the size of the circle, as well as a name for the layer. Then, when you've finished whatever else it is you need to do, you can freeze all the other layers and erase all those circles at one time. Could even be a second routine that would that and remove the unique layer.

 

Would that work for you?

Posted

Now that the problem is fully described (I think), I would be surprised if there is not already a LISP out there somewhere that someone has written for this process as it sounds logical.

But I've never had a need myself and don't have a clue what keywords would produce the best search results.

I'm not a LISPer, but it doesn't sound like it should be too difficult. Maybe it would be enough incentive to start LISPing?

There are several types of Points (nodes would be used as OSNAP) that are avialable in AutoCAD.

  • 12 years later...
Posted

I also am looking for a way to quickly identify the endpoints of lines. This because I want to create a new polyline around existing multiple polylines. The process would be much faster if I could identify them without having to wait until my mouse gets close to the end. Also there are often two endpoints close together, or a polyline with many segments, or segments which are almost (but not quite) in line with one another. It would make the selection of end points quicker.... and more accurate. Aught to be a setting one can turn off. Working in autocad 2024. I am more than aware of the existence of the snap functions...

Posted (edited)

spacer.png

 

 

(defun c:l ( / )
  (foo)
  (command "_.line")
)

(defun c:pl ( / )
  (foo)
  (command "_.pline")
)


(defun foo ( / point_size ss ssl i ent obj ent_type pt coordlist cdl)
  (setq screen_h (getvar 'viewsize))
  (setq screen_size (getvar 'screensize))
  (setq screen_ratio (/ (car screen_size) (cadr screen_size)))
  (setq screen_w (* screen_h screen_ratio))
  (setq screen_cen (getvar 'viewctr))
  (setq screen_ll (list (- (car screen_cen) (/ screen_w 2)) (- (cadr screen_cen) (/ screen_h 2))))
  (setq screen_ur (list (+ (car screen_cen) (/ screen_w 2)) (+ (cadr screen_cen) (/ screen_h 2))))

  (setq point_size (/ screen_h 20))
  (setq ss (ssget "_C" screen_ll screen_ur '((0 . "*LINE"))))
  (setq ssl (sslength ss))
  (setq i 0)
  (repeat ssl
    (setq ent (ssname ss i))
    (setq obj (vlax-ename->vla-object ent))
    (setq ent_type (vlax-get-property obj 'entityname))
    (cond 
      ((= ent_type "AcDbLine")
        (setq pt (vlax-safearray->list (vlax-variant-value (vlax-get-property obj 'startpoint))))
        (grvecsrec (list (car pt) (cadr pt)) point_size 1)
        (setq pt (vlax-safearray->list (vlax-variant-value (vlax-get-property obj 'endpoint))))
        (grvecsrec (list (car pt) (cadr pt)) point_size 1)
      )
      ((= ent_type "AcDbPolyline")
        (setq coordlist (vlax-safearray->list (vlax-variant-value (vlax-get-property obj 'Coordinates))))
        (setq cdl (length coordlist))
        (repeat (/ cdl 2)
          (setq pt (list (car coordlist) (cadr coordlist)))
          (grvecsrec pt point_size 1)
          (setq coordlist (cddr coordlist))
        )
      )
    )
    (setq i (+ i 1))
  )
  (princ)
)

(defun grvecsrec ( cen size col / )
  (grdraw (polar cen (/ pi 4) (/ size 2)) (polar cen (/ (* 3 pi) 4) (/ size 2)) col)
  (grdraw (polar cen (/ (* 3 pi) 4) (/ size 2)) (polar cen (/ (* 5 pi) 4) (/ size 2)) col)
  (grdraw (polar cen (/ (* 5 pi) 4) (/ size 2)) (polar cen (/ (* 7 pi) 4) (/ size 2)) col)
  (grdraw (polar cen (/ (* 7 pi) 4) (/ size 2)) (polar cen (/ pi 4) (/ size 2)) col)
)

 

 

I don't know if I understand English well.

Edited by exceed

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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