+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
  1. #1
    Forum Newbie
    Discipline
    Civil
    Using
    AutoCAD 2016
    Join Date
    May 2018
    Location
    Good old London
    Posts
    8

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

    Registered forum members do not see this ad.

    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!

  2. #2
    Forum Deity
    Using
    AutoCAD 2002
    Join Date
    Sep 2006
    Location
    East Sussex, U.K.
    Posts
    4,131

    Default

    Quote Originally Posted by cricket View Post
    .......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!!

  3. #3
    Quantum Mechanic
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    10,502

    Default

    Search here under my name pretty sure I did post a compare as built not that long ago.
    A man who never made mistakes never made anything

  4. #4
    Forum Newbie
    Discipline
    Civil
    Using
    AutoCAD 2016
    Join Date
    May 2018
    Location
    Good old London
    Posts
    8

    Default

    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.

  5. #5
    Forum Newbie
    Discipline
    Civil
    Using
    AutoCAD 2016
    Join Date
    May 2018
    Location
    Good old London
    Posts
    8

    Default

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

  6. #6
    Forum Newbie
    Discipline
    Civil
    Using
    AutoCAD 2016
    Join Date
    May 2018
    Location
    Good old London
    Posts
    8

    Default

    [IMG]file:///C:/Users/ssajid/Desktop/liner%20wall%20example.jpg[/IMG]

  7. #7
    Full Member
    Discipline
    Surveying
    dlanorh's Discipline Details
    Occupation
    Geospatial Engineer
    Discipline
    Surveying
    Using
    AutoCAD 2012
    Join Date
    Aug 2017
    Location
    UK/Bundesrepublik Deutschland
    Posts
    72

    Default

    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
    Code:
    (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
    Last edited by dlanorh; 18th May 2018 at 10:34 am. Reason: spelling

  8. #8
    Forum Newbie
    Discipline
    Civil
    Using
    AutoCAD 2016
    Join Date
    May 2018
    Location
    Good old London
    Posts
    8

    Default

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

  9. #9
    Forum Newbie
    Discipline
    Civil
    Using
    AutoCAD 2016
    Join Date
    May 2018
    Location
    Good old London
    Posts
    8

    Default

    Quote Originally Posted by dlanorh View Post
    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
    Code:
    (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!

  10. #10
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2015
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,177

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by cricket View Post
    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.

Similar Threads

  1. create a point in vertical distance from a line
    By prodromosm in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 23rd May 2017, 03:16 am
  2. Add a point at specific distance from the end of line/poly/spl that was clicked on?
    By vanowm in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 3
    Last Post: 16th May 2017, 03:36 am
  3. Replies: 2
    Last Post: 24th Jan 2016, 05:19 am
  4. Replies: 10
    Last Post: 9th Jun 2011, 04:57 pm
  5. [VBA/Autocad]The shortest distance between two lines
    By lubracali in forum .NET, ObjectARX & VBA
    Replies: 7
    Last Post: 8th Feb 2011, 03:29 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts