Jump to content

I need help getting the shortest distance from a point to a slanted line #AsBuilt


Recommended Posts

Posted

Good Morning,

 

I am pretty new to AutoCad, and would appreciate if anyone out there could help.

 

I understand how LISP files work, and have been making use of these LISP files to create as-built drawings on the construction site that I am working at;

 

For example, when the engineers on site give me measurements that they have taken via their EDM for the elevation of a concrete slab after it has been poured, I make use of a LISP file to convert these points into excel form; hence I can undertake a few calculations on each individual point, and then, eventually, make use of another LISP file to take the new Excel points into the Cad Drawing. Once I am in the CAD Drawing, I make use of another lisp file to add a prefix to multiple points via select similar etc etc etc....

 

However, I am facing a small problem. I have to measure the difference between the actual position position of a slanted concrete wall in comparison to the design position. To do this, I overlay the points given to me by the engineers onto drawings provided to me by design engineers;

 

I can do this via the Aligned Dimension tool, however this is a really pain staking, eye tearing activity, especially if you have 100s of points! I would appreciate if anyone out there could assist me!

Posted
.......when the engineers on site give me measurements that they have taken via their EDM.......

 

However, I am facing a small problem. I have to measure the difference between the actual position position of a slanted concrete wall in comparison to the design position. To do this, I overlay the points given to me by the engineers onto drawings provided to me by design engineers;

 

I can do this via the Aligned Dimension tool, however this is a really pain staking, eye tearing activity, especially if you have 100s of points! I would appreciate if anyone out there could assist me!

 

It seems that the engineers could be giving you a much easier time. The construction was presumably designed on a coordinated layout, and built to this coordinate system. Why are your engineers not giving you measurements in the same coordinate system? Then the comparison is just a matter of inserting the as-built drawing into the design drawing, without any of your "really painstaking, eye tearing activity" trying to align them. The alignment is done automatically by the coordinates. You must educate the engineers!!

Posted

Search here under my name pretty sure I did post a compare as built not that long ago.

Posted

I really appreciate your reply! This was my first post on this forum. Basically, I feel that I could have explained better...

 

I need to create an as-built drawing of a liner wall. This liner wall is slanted (as shown on screenshot attached), and so, rotating the drawing is not a feasible option. The engineers are not at fault lol, its just that the liner wall is just a bit awkward. I could just do each point individually in order to determine the actual position of the liner wall compared to design, but this will take me ages, and so, I really hope there is a quicker solution out there!

 

Once again, thanks for the reply.

Posted

Thank you very much for the reply BIGAL. I will definitely check.

Posted (edited)

Below is a short routine to find the shortest distance between a point and a line.

 

 

The osnap settings dialog will popup first to allow setting of the relevant osnap mode for the points. You will then be asked to select a line. This can be a polyline.

 

 

The lisp will then repeatedly ask for a point and display the shortest distance to the line.

 

 

To exit and rerun press ESC

(vl-load-com)

(defun c:shortest ( / *error* cmde o_lin pt c_pt )

 (defun *error* ( msg )
       (if (and c_doc (= 8 (logand 8 (getvar 'UNDOCTL)))) (vla-endundomark c_doc))
       (if (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*")) (princ (strcat "\nAn Error : " msg " occurred.")))
       (if cmde (setvar 'cmdecho cmde))
       (princ)
   );_end_*error*_defun
   
 (command "dsettings")
 (if (/= (getvar 'cmdecho) 0) (progn (setq cmde (getvar 'cmdecho)) (setvar 'cmdecho 0))) 
 (setq o_lin (vlax-ename->vla-object (car (entsel "\nSelect Line for Shortest Distance TO : "))))
 (while (setq pt (getpoint "\nSelect Point for Shortest Distance FROM : "))
   (setq c_pt (vlax-curve-getclosestpointto o_lin pt))
   (setq dist (distance pt c_pt))
   (princ (strcat "\Shortest Distance = " (rtos dist 2 3)))
 );_end_while
);_end_defun  

Edited by dlanorh
spelling
  • Thanks 1
Posted

Im so bad at this forums stuff....I don't even know how to delete my post.. I attempted to upload the image haha

Posted
Below is a short routine to find the shortest distance between a point and a line.

 

 

The osnap settings dialog will popup first to allow setting or relevant osnap mode for the points. You will then be asked to select a line. This can be a polyline.

 

 

The lisp will then repeatedly ask for a point and display the shortest distance to the line.

 

 

To exit and rerun press ESC

(vl-load-com)

(defun c:shortest ( / *error* cmde o_lin pt c_pt )

 (defun *error* ( msg )
       (if (and c_doc (= 8 (logand 8 (getvar 'UNDOCTL)))) (vla-endundomark c_doc))
       (if (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*")) (princ (strcat "\nAn Error : " msg " occurred.")))
       (if cmde (setvar 'cmdecho cmde))
       (princ)
   );_end_*error*_defun
   
 (command "dsettings")
 (if (/= (getvar 'cmdecho) 0) (progn (setq cmde (getvar 'cmdecho)) (setvar 'cmdecho 0))) 
 (setq o_lin (vlax-ename->vla-object (car (entsel "\nSelect Line for Shortest Distance TO : "))))
 (while (setq pt (getpoint "\nSelect Point for Shortest Distance FROM : "))
   (setq c_pt (vlax-curve-getclosestpointto o_lin pt))
   (setq dist (distance pt c_pt))
   (princ (strcat "\Shortest Distance = " (rtos dist 2 3)))
 );_end_while
);_end_defun  

 

 

Thanks. Will try this. Appreciate this!

Posted
Im so bad at this forums stuff....I don't even know how to delete my post.. I attempted to upload the image haha

 

Hi,

Its not your mistake but you need to reach 10 posts to be able to delete or modify I believe.

Try to hit the button on the right side hand bellow 'Go Advance' then you will feel free working from there. :)

Posted
Hi,

Its not your mistake but you need to reach 10 posts to be able to delete or modify I believe.

Try to hit the button on the right side hand bellow 'Go Advance' then you will feel free working from there. :)

 

Ohh Thank YOu

Posted
liner wall example.jpgliner wall example.jpg
It seems that the engineers could be giving you a much easier time. The construction was presumably designed on a coordinated layout, and built to this coordinate system. Why are your engineers not giving you measurements in the same coordinate system? Then the comparison is just a matter of inserting the as-built drawing into the design drawing, without any of your "really painstaking, eye tearing activity" trying to align them. The alignment is done automatically by the coordinates. You must educate the engineers!!
Posted

I am afraid my eyesight isn't that sharp to see the details. It looks to me to be almost a contiguous piled wall, with an internal wall.

 

If you plot the as-built points, then you take the distance perpendicular to the theoretical line. There is no aligning to be done as the coordinate system is the same for both cases.

Posted
I am afraid my eyesight isn't that sharp to see the details.

LOL your eyesight is okey. The quality of image is too bad

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