+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Senior Member
    Using
    Map 3D 2007
    Join Date
    May 2011
    Location
    autocad
    Posts
    134

    Default Find Coordinate of a point

    Registered forum members do not see this ad.

    Hi All,

    Please help me to find the coordinate of a point at a given distance before the first vertex of a polyline through autolisp.

    Hope its clear, if not please ask i'll attach a sample drawing.

    Thanks and Regards
    Aaryan.

  2. #2
    Forum Newbie
    Using
    Civil 3D 2008
    Join Date
    Dec 2009
    Posts
    2

    Default

    Type ID on the command line then select the point...

  3. #3
    Senior Member
    Using
    Map 3D 2007
    Join Date
    May 2011
    Location
    autocad
    Posts
    134

    Default

    Thanks kaizen for your reply, but i want to know it through autolisp.

    Below I've attached the drawing for the reference.
    Drawing5.dwg

    Regards
    Last edited by aaryan; 1st Sep 2012 at 11:20 am.

  4. #4
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,627

    Default

    Specify a point by function (getpoint) then retrieve the variable value with functions (car) , (cadr) and (caddr) .
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  5. #5
    Senior Member
    Using
    Map 3D 2007
    Join Date
    May 2011
    Location
    autocad
    Posts
    134

    Default

    Thanks Tharwat,
    I think I've not made it clear before. Please see my 3rd post in which i have attached a drawing for reference.

    Thanks again
    Regards

  6. #6
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,627

    Default

    Okay , if you want to specify a point on an entity , you can use the function (vlax-curve-getpointatdist <entity name> <distanse>) .
    if not , just read about the function polar e.g (polar <point> <angle> <distance>) .

    Tharwat
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  7. #7
    Senior Member
    Using
    Map 3D 2007
    Join Date
    May 2011
    Location
    autocad
    Posts
    134

    Default

    Thanks You So Much Tharwat.

  8. #8
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,729

    Default

    Here's another way:

    Code:
    (defun _getpoint ( ent dis / der )
        (setq der (vlax-curve-getfirstderiv ent (vlax-curve-getstartparam ent))
              dis (/ dis (distance '(0.0 0.0 0.0) der))
        )
        (mapcar '(lambda ( a b ) (- a (* dis b))) (vlax-curve-getstartpoint ent) der)
    )
    Code:
    (defun c:test ( / e )
        (if (setq e (car (entsel))) (_getpoint e 50.0))
    )
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  9. #9
    Senior Member
    Using
    Map 3D 2007
    Join Date
    May 2011
    Location
    autocad
    Posts
    134

    Default

    Registered forum members do not see this ad.

    Thank You So Much Lee Mac.

    Regards
    Aaryan

Similar Threads

  1. Show The X,Y coordinate for a point
    By TYGA in forum AutoCAD Beginners' Area
    Replies: 18
    Last Post: 18th Jan 2013, 08:48 pm
  2. Point coordinate on Polyline
    By aaryan in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 17th Jul 2012, 07:35 am
  3. coordinate point by DEG/MIN/SEC
    By e.mounir in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 7th Jun 2010, 01:28 pm
  4. find coordinate of a point at desired distanse of a polyline!!
    By kasra in forum AutoLISP, Visual LISP & DCL
    Replies: 8
    Last Post: 27th Apr 2010, 12:30 am
  5. List coordinate by select point group
    By jason tay in forum AutoLISP, Visual LISP & DCL
    Replies: 37
    Last Post: 27th Apr 2009, 12:36 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